flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.7k stars 27.36k forks source link

A lot of deprecated warnings after updating MacOSX to Big Sur (cannot run in debug nor release mode) #75045

Closed zenkog closed 3 years ago

zenkog commented 3 years ago

Description I usually got these kind of problem and all goes away by updating Flutter and dependencies. But this time it doesn't. I got a lot of deprecated warnings. Here is what I have done:

  1. Upgrade all dependencies
  2. Make sure all versions are latest one: Flutter (Stable channel), Android studio, SDKs, Xcode
  3. Target version 10.12 in Podfile
  4. Flutter clean
  5. Delete Pods and Podfile and Podfile lock and reinstall all pods
  6. Pod repo update
  7. Turn off anti-virus
  8. Reset factory settings for Xcode:
    • Enter in terminal defaults delete com.apple.Xcode
    • Then delete the settings: rm -rf ~/Library/Application\ Support/Xcode
  9. Re-install Xcode.
  10. Deleted derived data and build

None of the above worked and I have struggled to fix this for the past 3 days now and still doesn't work. Really frustrating.

Steps to Reproduce

  1. Have a working code written from previous MacOSX that uses packages such as Firebase Firestore, audioplayers and image_picker.
  2. Then update MacOSX to Big Sur.
  3. Run flutter -run

Expected results: Working normally

Actual results: Got a lot of deprecated messages and build doesn't run

The attached file is the complete flutter -run --verbose and flutter -run flutter-run.pdf flutter-run-verbose.pdf

Logs **excerpt of `flutter -run` look at the attached file for more complete information** ``` Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+21/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 /proj/cm_app/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.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/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/audioplayers-0.17.3/ios/Classes/NotificationsHandler.swift:174:75: warning: 'init(image:)' was deprecated in iOS 10.0: Use -initWithBoundsSize:requestHandler: let albumArt: MPMediaItemArtwork = MPMediaItemArtwork.init(image: artworkImage) ^ 1 warning generated. /proj/cm_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/FBSDKBridgeAPIProtocolNativeV1.m:313:45: warning: 'UIPasteboardNameFind' is deprecated: first deprecated in iOS 10.0 - The Find pasteboard is no longer available. [-Wdeprecated-declarations] [pasteboardName isEqualToString:UIPasteboardNameFind]) { ^ In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPasteboard.h:17:30: note: 'UIPasteboardNameFind' has been explicitly marked deprecated here UIKIT_EXTERN NSString *const UIPasteboardNameFind API_UNAVAILABLE(tvos) API_UNAVAILABLE(watchos) API_DEPRECATED("The Find pasteboard is no longer available.", ios(3.0, 10.0)); ^ 1 warning generated. /proj/cm_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPI.m:200:56: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] BOOL opened = [[UIApplication sharedApplication] openURL:url]; ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ 1 warning generated. /proj/cm_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKAppLinkNavigation.m:123:55: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] } else if ([[UIApplication sharedApplication] openURL:appLinkAppURL]) { ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ /proj/cm_app/ios/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKAppLinkNavigation.m:138:55: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] } else if ([[UIApplication sharedApplication] openURL:appLinkBrowserURL]) { ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ 2 warnings generated. error: the following command failed with exit code 0 but produced no further output CompileC /Users/ZK/Library/Developer/Xcode/DerivedData/Runner-bsubfxanedknnkclbuddwhcdptsd/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/AppAuth.build/Objects-normal/arm64/OIDExternalUserAgentIOSCustomBrowser.o /proj/cm_app/ios/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOSCustomBrowser.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler error: the following command failed with exit code 0 but produced no further output CompileC /Users/ZK/Library/Developer/Xcode/DerivedData/Runner-bsubfxanedknnkclbuddwhcdptsd/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/AppAuth.build/Objects-normal/arm64/OIDExternalUserAgentIOS.o /proj/cm_app/ios/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOS.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:62:3: warning: 'ALAssetRepresentation' is deprecated: first deprecated in iOS 9 - Use PHImageRequestOptions with the PHImageManager from the Photos framework instead [-Wdeprecated-declarations] ALAssetRepresentation *_assetRepresentation; ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:20:12: note: 'ALAssetRepresentation' has been explicitly marked deprecated here @interface ALAssetRepresentation : NSObject { ^ /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:93:4: warning: 'ALAssetsLibrary' is deprecated: first deprecated in iOS 9 - Use PHPhotoLibrary from the Photos framework instead [-Wdeprecated-declarations] + (ALAssetsLibrary *)defaultAssetsLibrary { ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetsLibrary.h:78:12: note: 'ALAssetsLibrary' has been explicitly marked deprecated here @interface ALAssetsLibrary : NSObject { ^ /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:95:10: warning: 'ALAssetsLibrary' is deprecated: first deprecated in iOS 9 - Use PHPhotoLibrary from the Photos framework instead [-Wdeprecated-declarations] static ALAssetsLibrary *library = nil; ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetsLibrary.h:78:12: note: 'ALAssetsLibrary' has been explicitly marked deprecated here @interface ALAssetsLibrary : NSObject { ^ /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:459:78: warning: 'ALAsset' is deprecated: first deprecated in iOS 9 - Use PHAsset from the Photos framework instead [-Wdeprecated-declarations] [[FBSDKShareAPI defaultAssetsLibrary] assetForURL:videoURL resultBlock:^(ALAsset *asset) { ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAsset.h:40:12: note: 'ALAsset' has been explicitly marked deprecated here @interface ALAsset : NSObject { ^ /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:460:43: warning: 'defaultRepresentation' is deprecated: first deprecated in iOS 9 - Use PHImageRequestOptions with the PHImageManager from the Photos framework instead [-Wdeprecated-declarations] self->_assetRepresentation = [asset defaultRepresentation]; ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAsset.h:49:1: note: 'defaultRepresentation' has been explicitly marked deprecated here - (ALAssetRepresentation *)defaultRepresentation AL_DEPRECATED(4, "Use PHImageRequestOptions with the PHImageManager from the Photos framework instead"); ^ /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:461:64: warning: 'size' is deprecated: first deprecated in iOS 9 - Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead [-Wdeprecated-declarations] NSUInteger size = (NSUInteger)self->_assetRepresentation.size; ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:32:1: note: 'size' has been explicitly marked deprecated here - (long long)size AL_DEPRECATED(4, "Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead"); ^ /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:461:64: warning: 'size' is deprecated: first deprecated in iOS 9 - Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead [-Wdeprecated-declarations] NSUInteger size = (NSUInteger)self->_assetRepresentation.size; ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:32:1: note: 'size' has been explicitly marked deprecated here - (long long)size AL_DEPRECATED(4, "Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead"); ^ /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:459:43: warning: 'assetForURL:resultBlock:failureBlock:' is deprecated: first deprecated in iOS 9 - Use fetchAssetsWithLocalIdentifiers:options: on PHAsset to fetch assets by local identifier (or to lookup PHAssets by a previously known ALAssetPropertyAssetURL use fetchAssetsWithALAssetURLs:options:) from the Photos framework instead [-Wdeprecated-declarations] [[FBSDKShareAPI defaultAssetsLibrary] assetForURL:videoURL resultBlock:^(ALAsset *asset) { ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetsLibrary.h:93:1: note: 'assetForURL:resultBlock:failureBlock:' has been explicitly marked deprecated here - (void)assetForURL:(NSURL *)assetURL resultBlock:(ALAssetsLibraryAssetForURLResultBlock)resultBlock failureBlock:(ALAssetsLibraryAccessFailureBlock)failureBlock AL_DEPRECATED(4, "Use fetchAssetsWithLocalIdentifiers:options: on PHAsset to fetch assets by local identifier (or to lookup PHAssets by a previously known ALAssetPropertyAssetURL use fetchAssetsWithALAssetURLs:options:) from the Photos framework instead"); ^ /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:833:55: warning: 'getBytes:fromOffset:length:error:' is deprecated: first deprecated in iOS 9 - Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead [-Wdeprecated-declarations] NSUInteger bufferedLength = [_assetRepresentation getBytes:data.mutableBytes fromOffset:startOffset length:chunkSize error:&error]; ^ In module 'AssetsLibrary' imported from /proj/cm_app/ios/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m:24: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/AssetsLibrary.framework/Headers/ALAssetRepresentation.h:38:1: note: 'getBytes:fromOffset:length:error:' has been explicitly marked deprecated here - (NSUInteger)getBytes:(uint8_t *)buffer fromOffset:(long long)offset length:(NSUInteger)length error:(NSError **)error AL_DEPRECATED(4, "Use requestImageDataForAsset:options:resultHandler: on PHImageManager to request image data for a PHAsset from the Photos framework instead"); ^ 9 warnings generated. /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/social_share_plugin-0.3.1+1/ios/Classes/SocialSharePlugin.m:74:50: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] [[UIApplication sharedApplication] openURL:[NSURL URLWithString:instagramLink]]; ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/social_share_plugin/social_share_plugin-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/social_share_plugin-0.3.1+1/ios/Classes/SocialSharePlugin.m:88:50: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbLink]]; ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/social_share_plugin/social_share_plugin-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/social_share_plugin-0.3.1+1/ios/Classes/SocialSharePlugin.m:102:50: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbLink]]; ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/social_share_plugin/social_share_plugin-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/social_share_plugin-0.3.1+1/ios/Classes/SocialSharePlugin.m:116:50: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] [[UIApplication sharedApplication] openURL:[NSURL URLWithString:twitterLink]]; ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/social_share_plugin/social_share_plugin-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/social_share_plugin-0.3.1+1/ios/Classes/SocialSharePlugin.m:173:22: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] [application openURL:shareUrl]; ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/social_share_plugin/social_share_plugin-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ 5 warnings generated. /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_analytics-7.0.1/ios/Classes/FLTFirebaseAnalyticsPlugin.m:49:19: warning: 'setScreenName:screenClass:' is deprecated: Use +[FIRAnalytics logEventWithName:kFIREventScreenView parameters:] instead. [-Wdeprecated-declarations] [FIRAnalytics setScreenName:screenName screenClass:screenClassOverride]; ^ In module 'FirebaseAnalytics' imported from /proj/cm_app/ios/Pods/Headers/Public/Firebase/Firebase.h:22: /proj/cm_app/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h:128:5: note: 'setScreenName:screenClass:' has been explicitly marked deprecated here DEPRECATED_MSG_ATTRIBUTE( ^ In module 'UIKit' imported from /proj/cm_app/ios/Pods/Target Support Files/firebase_analytics/firebase_analytics-prefix.pch:2: In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8: In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/AvailabilityMacros.h:183:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE' #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) ^ 1 warning generated. /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_admob-0.11.0+1/ios/Classes/FLTRewardedVideoAdWrapper.m:80:37: warning: 'GADRewardBasedVideoAd' is deprecated: Use GADRewardedAd instead. Google AdMob publishers, follow instructions here: https://googlemobileadssdk.page.link/admob-ios-rewarded-migration. Google Ad Manager publishers, follow instructions here: https://googlemobileadssdk.page.link/admanager-ios-rewarded-migration. [-Wdeprecated-declarations] - (void)rewardBasedVideoAd:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd ^ In module 'GoogleMobileAds' imported from /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_admob-0.11.0+1/ios/Classes/FLTRewardedVideoAdWrapper.h:6: /proj/cm_app/build/ios/Debug-iphoneos/XCFrameworkIntermediates/GoogleMobileAds/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h:17:1: note: 'GADRewardBasedVideoAd' has been explicitly marked deprecated here GAD_DEPRECATED_MSG_ATTRIBUTE( ^ In module 'GoogleMobileAds' imported from /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_admob-0.11.0+1/ios/Classes/FLTRewardedVideoAdWrapper.h:6: /proj/cm_app/build/ios/Debug-iphoneos/XCFrameworkIntermediates/GoogleMobileAds/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h:25:56: note: expanded from macro 'GAD_DEPRECATED_MSG_ATTRIBUTE' #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) ^ /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_admob-0.11.0+1/ios/Classes/FLTRewardedVideoAdWrapper.m:87:37: warning: 'GADRewardBasedVideoAd' is deprecated: Use GADRewardedAd instead. Google AdMob publishers, follow instructions here: https://googlemobileadssdk.page.link/admob-ios-rewarded-migration. Google Ad Manager publishers, follow instructions here: https://googlemobileadssdk.page.link/admanager-ios-rewarded-migration. [-Wdeprecated-declarations] - (void)rewardBasedVideoAd:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd ^ In module 'GoogleMobileAds' imported from /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_admob-0.11.0+1/ios/Classes/FLTRewardedVideoAdWrapper.h:6: /proj/cm_app/build/ios/Debug-iphoneos/XCFrameworkIntermediates/GoogleMobileAds/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h:17:1: note: 'GADRewardBasedVideoAd' has been explicitly marked deprecated here GAD_DEPRECATED_MSG_ATTRIBUTE( ^ In module 'GoogleMobileAds' imported from /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/firebase_admob-0.11.0+1/ios/Classes/FLTRewardedVideoAdWrapper.h:6: /proj/cm_app/build/ios/Debug-iphoneos/XCFrameworkIntermediates/GoogleMobileAds/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h:25:56: note: expanded from macro 'GAD_DEPRECATED_MSG_ATTRIBUTE' #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) <...truncated...> 1 warning generated. /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.4/lib/src/smart_refresher.dart:434:9: Error: No named parameter with the name 'keyboardDismissBehavior'. keyboardDismissBehavior: ^^^^^^^^^^^^^^^^^^^^^^^ /Users/ZK/development/flutter/packages/flutter/lib/src/widgets/scroll_view.dart:588:9: Context: Found this candidate, but the arguments don't match. const CustomScrollView({ ^^^^^^^^^^^^^^^^ Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description Could not build the precompiled application for the device. Error launching application on ZK iPho. ``` ** Run `flutter analyze` ** ``` Analyzing cm_app... No issues found! (ran in 6.5s) ``` ** Run `flutter doctor -v` ** ``` [✓] Flutter (Channel stable, 1.22.6, on macOS 11.1 20C69 darwin-x64, locale en-US) • Flutter version 1.22.6 at /Users/ZK/development/flutter • Framework revision 9b2d32b605 (7 days ago), 2021-01-22 14:36:39 -0800 • Engine revision 2f0af37152 • Dart version 2.10.5 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Volumes/ZK-R/Applications/Android/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /Volumes/ZK-R/Applications/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1 [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin installed • Dart plugin version 201.9317 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) [✓] VS Code (version 1.52.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.18.1 [✓] Connected device (1 available) • ZK iPho (mobile) • b3ebbe93864b12b2d78acd5efecf25 • ios • iOS 14.3 • No issues found! ```
zenkog commented 3 years ago

I just tried to create a fresh new flutter app and run it, it runs well. But when I added these in pubspec.yaml:

  flutter_form_builder: ^4.2.0
  image_picker: ^0.6.7+21

  # Firebase packages
  firebase_core: ^0.7.0
  firebase_auth: ^0.20.0+1
  cloud_firestore: ^0.16.0
  firebase_storage: ^7.0.0
  firebase_database: ^6.0.0
  cloud_functions: ^0.9.0
  firebase_admob: ^0.11.0+1
  firebase_analytics: ^7.0.1

And of course set the deployment target to 10.12 in the Podfile There is no modification whatsoever in the main.dart The app immediately closes. (blink white screen then close). Meanwhile, the message in the console is still Installing and launching... and the stop button still colored red but the play button is disabled (i'm using Android Studio)

I'm doing more test now

zenkog commented 3 years ago

When I comment firebase_analytics I got this error message: (once again this is a fresh and new flutter app)

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    warning: Stale file '/Volumes/ZK-R/R/Projects/Flutter-Proj/test_app/build/ios/Debug-iphoneos/Runner.app/Frameworks/FirebaseInstallations.framework' is located outside of the allowed root paths.

    warning: Stale file '/Volumes/ZK-R/R/Projects/Flutter-Proj/test_app/build/ios/Debug-iphoneos/GoogleUtilities/GoogleUtilities.framework/Headers/GULUserDefaults.h' is located outside of the allowed root paths.

    /Users/ZK/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/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 /Volumes/ZK-R/R/Projects/Flutter-Proj/test_app/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.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.
    <module-includes>:1:1: error: umbrella header for module 'GoogleUtilities' does not include header 'GULUserDefaults.h' [-Werror,-Wincomplete-umbrella]
    #import "Headers/GoogleUtilities-umbrella.h"
    ^
    1 error generated.
    /Volumes/ZK-R/R/Projects/Flutter-Proj/test_app/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m:22:9: fatal error: could not build module 'GoogleUtilities'
    #import <GoogleUtilities/GULAppEnvironmentUtil.h>
     ~~~~~~~^
    2 errors generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the precompiled application for the device.

Error launching application on ZK iPho.

Please do not mind the Google errors. We can see that the Xcode generate the deprecated warnings.

TahaTesser commented 3 years ago

Hi @zenkog Deprecated warnings are not the issue, they are just warnings, not a cause for the crash. You're using Flutterfire packages and other third-party packages, please file an issue on their dedicated GitHub repository. The only first-party package I can see image_picker, If you can reproduce an issue with `image_picker, please reproducible code sample Thank you

zenkog commented 3 years ago

I understand. Thank you

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.