Home > database >  trying to run flutter app for ios , I get errors related to firebase
trying to run flutter app for ios , I get errors related to firebase

Time:02-17

Running "flutter pub get" in salon_apps... Launching lib/main.dart on iPhone 13 in debug mode... Running pod install... Running Xcode build... Xcode build done. 20.3s Failed to build iOS app Error output from Xcode build: ↳ objc[23537]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1fe72bb78) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10cde02c8). One of the two will be used. Which one is undefined. objc[23537]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1fe72bbc8) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10cde0318). One of the two will be used. Which one is undefined. --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } { platform:iOS Simulator, id:AEEE8629-E5E5-4455-9D69-FE6A529C62A5, OS:15.2, name:iPad (9th generation) } { platform:iOS Simulator, id:7F791AA0-FF90-46BD-A93C-C267D272E340, OS:15.2, name:iPad Air (4th generation) } { platform:iOS Simulator, id:22DC11F5-FAFC-491B-92A3-BA492FF06F92, OS:15.2, name:iPad Pro (9.7-inch) } { platform:iOS Simulator, id:33A914C7-AD42-4AD7-9A8D-E8A64DA8835B, OS:15.2, name:iPad Pro (11-inch) (3rd generation) } { platform:iOS Simulator, id:85209AC3-C952-438C-A55D-B92758BBA03D, OS:15.2, name:iPad Pro (12.9-inch) (5th generation) } { platform:iOS Simulator, id:D1E1133B-AAF8-47B4-ACD2-54739768788E, OS:15.2, name:iPad mini (6th generation) } { platform:iOS Simulator, id:26AAA556-202C-4E6D-BA0F-79DC0FD44764, OS:15.2, name:iPhone 8 } { platform:iOS Simulator, id:98991B2A-4AE3-4578-94C5-30F8A3170FCD, OS:15.2, name:iPhone 8 Plus } { platform:iOS Simulator, id:A0B36DC0-A8C4-4E02-8D63-222A68EF67E2, OS:15.2, name:iPhone 11 } { platform:iOS Simulator, id:B50F8EE2-B8D6-4B9F-B876-2AB6F138497B, OS:15.2, name:iPhone 11 Pro } { platform:iOS Simulator, id:85F4C905-DFA6-4472-BEAE-6EF4B664EAF7, OS:15.2, name:iPhone 11 Pro Max } { platform:iOS Simulator, id:AC0426DD-EA39-4810-97E2-A77F1C21C0BB, OS:15.2, name:iPhone 12 } { platform:iOS Simulator, id:70380FBC-8673-424B-923D-C20FC872B6DC, OS:15.2, name:iPhone 12 Pro } { platform:iOS Simulator, id:B9CD3E5B-7E85-4C25-8799-905F8F5E9BA2, OS:15.2, name:iPhone 12 Pro Max } { platform:iOS Simulator, id:2DE367EF-044B-46F3-BEE2-EBDF40634661, OS:15.2, name:iPhone 12 mini } { platform:iOS Simulator, id:95294415-EEBF-4CE1-9A96-E14BC819F345, OS:15.2, name:iPhone 13 } { platform:iOS Simulator, id:15C90A9C-AAF3-462F-88D1-A36DAF6C1139, OS:15.2, name:iPhone 13 Pro } { platform:iOS Simulator, id:B2A6CE69-F3FF-4C4D-8296-E8D3AC23FD0F, OS:15.2, name:iPhone 13 Pro Max } { platform:iOS Simulator, id:5B06FEBA-5DC9-4ECE-8DFC-54FB86D370DE, OS:15.2, name:iPhone 13 mini } { platform:iOS Simulator, id:5E3087DA-2F07-4AD0-A9EE-E9A185B89260, OS:15.2, name:iPhone SE (2nd generation) } { platform:iOS Simulator, id:D1480C80-168C-4BB1-B20C-D11F8BE6AA10, OS:15.2, name:iPod touch (7th generation) } { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008103-001A30860A88801E } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } ** BUILD FAILED **

Xcode's output: ↳ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FlutterWebView.m:367:23: warning: 'mediaPlaybackRequiresUserAction' is deprecated: first deprecated in iOS 9.0 [-Wdeprecated-declarations] configuration.mediaPlaybackRequiresUserAction = true; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mediaTypesRequiringUserActionForPlayback In module 'WebKit' imported from /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FlutterWebView.h:6: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:216:28: note: 'mediaPlaybackRequiresUserAction' has been explicitly marked deprecated here @property (nonatomic) BOOL mediaPlaybackRequiresUserAction API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(8.0, 9.0)); ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FlutterWebView.m:374:23: warning: 'mediaPlaybackRequiresUserAction' is deprecated: first deprecated in iOS 9.0 [-Wdeprecated-declarations] configuration.mediaPlaybackRequiresUserAction = false; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mediaTypesRequiringUserActionForPlayback In module 'WebKit' imported from /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/FlutterWebView.h:6: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:216:28: note: 'mediaPlaybackRequiresUserAction' has been explicitly marked deprecated here @property (nonatomic) BOOL mediaPlaybackRequiresUserAction API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(8.0, 9.0)); ^ 2 warnings generated. 12 warnings generated. /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.7 22/ios/Classes/FLTImagePickerPlugin.m:149:20: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations] [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil) ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ 1 warning generated. /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:195:43: error: expected a type - (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:291:42: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings { ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:302:53: error: nullability specifier 'nonnull' conflicts with existing specifier 'nullable' didReceiveRegistrationToken:(nonnull NSString *)fcmToken { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:307:24: error: expected a type didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:122:7: warning: 'UIUserNotificationType' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] UIUserNotificationType notificationTypes = 0; ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:124:30: warning: 'UIUserNotificationTypeSound' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeSound; ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:127:30: warning: 'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeAlert; ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:130:30: warning: 'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeBadge; ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:133:7: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] UIUserNotificationSettings *settings = ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:134:39: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil]; ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:135:42: warning: 'registerUserNotificationSettings:' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:] [-Wdeprecated-declarations] [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:251:1: note: 'registerUserNotificationSettings:' has been explicitly marked deprecated here - (void)registerUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]", ios(8.0, 10.0)) API_UNAVAILABLE(tvos); ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:141:30: error: property 'shouldEstablishDirectChannel' not found on object of type 'FIRMessaging *' [FIRMessaging messaging].shouldEstablishDirectChannel = true; ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:160:7: error: use of undeclared identifier 'FIRInstanceID' [[FIRInstanceID instanceID] ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:171:7: error: use of undeclared identifier 'FIRInstanceID' [[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error) { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:196:52: error: property 'appData' not found on object of type '__strong id' [self didReceiveRemoteNotification:remoteMessage.appData]; ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:290:1: warning: implementing deprecated method [-Wdeprecated-implementations] - (void)application:(UIApplication )application ^ In module 'Flutter' imported from /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.h:5: /Users/aliab/Desktop/flutter4/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-x86_64-simulator/Flutter.framework/Headers/FlutterPlugin.h:74:1: note: method 'application:didRegisterUserNotificationSettings:' declared here - (void)application:(UIApplication)application ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:293:70: warning: 'UIUserNotificationTypeSound' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] @"sound" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeSound], ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:294:70: warning: 'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] @"badge" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeBadge], ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:295:70: warning: 'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] @"alert" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeAlert], ^ In module 'UIKit' imported from /Users/aliab/Desktop/salon_apps/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/aliab/Desktop/flutter4/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:308:63: error: property 'appData' not found on object of type '__strong id' [_channel invokeMethod:@"onMessage" arguments:remoteMessage.appData]; ^ 12 warnings and 8 errors generated. note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order /Users/aliab/Desktop/salon_apps/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'Flutter' from project 'Pods')

Could not build the application for the simulator. Error launching application on iPhone 13.

CodePudding user response:

Add platform :ios, '10.0' to the Podfile.

Recent versions of Firebase requires do not support iOS 8 and require a minimum of at least iOS 10. Without specifying the value, CocoaPods defaults to 8.0.

CodePudding user response:

You should add below script to podfile

     target.build_configurations.each do |config|
         config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
     end

Like below pic:

delete pods folder and run again

enter image description here

  • Related