I'm currently using the Facebook Login package for Flutter for a Flutter app that I'm developing and I'm having problems with building it in iOs.
I've followed all the steps in the guide and works fine in Android but when I try to run it in iOs simulator I have this output
Launching lib/main.dart on iPhone X in debug mode...
Running pod install...
Starting Xcode build...
Xcode build done. 3.0s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from /Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m:23:
In file included from /Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKAppEvents+Internal.h:19:
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:33:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
FOUNDATION_EXPORT NSNotificationName const FBSDKAppEventsLoggingResultNotification;
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:33:19: note: insert '_Nullable' if the pointer may be null
FOUNDATION_EXPORT NSNotificationName const FBSDKAppEventsLoggingResultNotification;
^
_Nullable
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:33:19: note: insert '_Nonnull' if the pointer should never be null
FOUNDATION_EXPORT NSNotificationName const FBSDKAppEventsLoggingResultNotification;
^
_Nonnull
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:700:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
+ (NSString *)getUserData;
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:700:13: note: insert '_Nullable' if the pointer may be null
+ (NSString *)getUserData;
^
_Nullable
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:700:13: note: insert '_Nonnull' if the pointer should never be null
+ (NSString *)getUserData;
^
_Nonnull
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:44: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:44: note: insert '_Nullable' if the pointer may be null
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
^
_Nullable
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:44: note: insert '_Nonnull' if the pointer should never be null
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
^
_Nonnull
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:66: warning: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:66: note: insert '_Nullable' if the block pointer may be null
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
^
_Nullable
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:714:66: note: insert '_Nonnull' if the block pointer should never be null
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
^
_Nonnull
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:726:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
+ (void)augmentHybridWKWebView:(WKWebView *)webView;
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:726:43: note: insert '_Nullable' if the pointer may be null
+ (void)augmentHybridWKWebView:(WKWebView *)webView;
^
_Nullable
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppEvents.h:726:43: note: insert '_Nonnull' if the pointer should never be null
+ (void)augmentHybridWKWebView:(WKWebView *)webView;
^
_Nonnull
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m:242:38: error: property 'subscriptionPeriod' not found on object of type 'SKProduct *'
BOOL isSubscription = (product.subscriptionPeriod != nil) && ((unsigned long)product.subscriptionPeriod.numberOfUnits > 0);
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m:242:92: error: property 'subscriptionPeriod' not found on object of type 'SKProduct *'
BOOL isSubscription = (product.subscriptionPeriod != nil) && ((unsigned long)product.subscriptionPeriod.numberOfUnits > 0);
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m:248:9: error: use of undeclared identifier 'SKProductSubscriptionPeriod'
SKProductSubscriptionPeriod *period = product.subscriptionPeriod;
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m:248:38: error: use of undeclared identifier 'period'
SKProductSubscriptionPeriod *period = product.subscriptionPeriod;
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m:248:55: error: property 'subscriptionPeriod' not found on object of type 'SKProduct *'
SKProductSubscriptionPeriod *period = product.subscriptionPeriod;
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m:250:17: error: use of undeclared identifier 'period'
switch (period.unit) {
^
/Users/javier/Documents/Android_Studio_Projects/squat_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/AppEvents/FBSDKPaymentObserver.m:256:76: error: use of undeclared identifier 'period'
NSString *p = [NSString stringWithFormat:@"P%lu%@", (unsigned long)period.numberOfUnits, unit];
^
5 warnings and 7 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone X.
I did flutter clean and pod update in the ios folder but keeps crashing. I don't know what's happening and if it's more a package problem than mine.
Here's the output of my flutter doctor -v
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.12.6 16G1036, locale en-ES)
• Flutter version 0.9.4 at /Users/javier/Documents/flutter
• Framework revision f37c235c32 (4 weeks ago), 2018-09-25 17:45:40 -0400
• Engine revision 74625aed32
• Dart version 2.1.0-dev.5.0.flutter-a2eb050044
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/javier/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.0, Build version 9A235
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 29.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] Connected devices (2 available)
• Mi A1 • 1f95603a0804 • android-arm64 • Android 8.1.0 (API 27)
• iPhone X • 32CD2ECE-8C12-4F3A-B768-E1568B9754A7 • ios • iOS 11.0 (simulator)
I'd appreciate if someone could help me finding the cause of this issue because I'm pretty lost right now.
Thanks in advance!