Bipin Vayalu
Bipin Vayalu

Reputation: 3145

Flutter iOS build failure after upgrading Flutter to 2.3.0-1.0.pre.267 or Firebase packages

I just recently updated flutter version to 2.3.0-1.pre.267 and also updated packages as IDE suggested. Now i am unable to build iOS app. I did tried almost all provided suggestions/fixes in GH issues of flutter, Google sign in and stack overflow. I did pod clean, pod re-integration, xcworkspacesetting file delete and few other suggestions as well.

Please find out details below and provide your suggestion/help/feedback that can help me to resolve this issue. App build is fine for Android and also working perfectly.

Flutter version details

Flutter 2.3.0-1.0.pre.267 • channel master • https://github.com/flutter/flutter.git Framework • revision 411eeb4155 (22 hours ago) • 2021-05-08 23:34:01 -0700 Engine • revision 1825befbc7 Tools • Dart 2.14.0 (build 2.14.0-74.0.dev)

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, 2.3.0-1.0.pre.267, on macOS 11.2.3 20D91 darwin-x64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 4.1) [✓] Connected device (2 available)

• No issues found!

Please find pubspec.yaml file here. (Due to formatting issue, uploaded on pastebin)

Steps to Reproduce

flutter build ios command output

Running "flutter pub get" in kids... 1,311ms Building dev.bipin.kids for device (ios-release)... Automatically signing iOS for device deployment using specified development team in Xcode project: xxxxx Running pod install... 7.0s Running Xcode build...
└─Compiling, linking and signing... 16.4s Xcode build done. 281.0s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED **

Xcode's output: ↳ /Users/bipinvaylu/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/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/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Head ers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ 1 warning generated. /Users/bipinvaylu/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/ios/Classes/FLTImagePickerPhotoAssetUtil.m:17:44: warning: 'UIImagePickerControllerReferenceURL' is deprecated: first deprecated in iOS 11.0 - Will be removed in a future release, use PHPicker. [-Wdeprecated-declarations] NSURL *referenceURL = [info objectForKey:UIImagePickerControllerReferenceURL]; ^ In module 'UIKit' imported from /Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Head ers/UIImagePickerController.h:62:51: note: 'UIImagePickerControllerReferenceURL' has been explicitly marked deprecated here UIKIT_EXTERN UIImagePickerControllerInfoKey const UIImagePickerControllerReferenceURL API_DEPRECATED("Will be removed in a future release, use PHPicker.", ios(4.1, 11.0)) API_UNAVAILABLE(tvos); // an NSURL that references an asset in the AssetsLibrary framework ^ /Users/bipinvaylu/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/ios/Classes/FLTImagePickerPhotoAssetUtil.m:21:47: warning: 'fetchAssetsWithALAssetURLs:options:' is deprecated: first deprecated in iOS 11 - Will be removed in a future release [-Wdeprecated-declarations] PHFetchResult<PHAsset *> *result = [PHAsset fetchAssetsWithALAssetURLs:@[ referenceURL ] ^ In module 'Photos' imported from /Users/bipinvaylu/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.7.4/ios/Classes/FLTImagePickerPhotoAssetUtil.h:6: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/Photos.framework/Hea ders/PHAsset.h:74:1: note: 'fetchAssetsWithALAssetURLs:options:' has been explicitly marked deprecated here + (PHFetchResult<PHAsset *> *)fetchAssetsWithALAssetURLs:(NSArray<NSURL *> *)assetURLs options:(nullable PHFetchOptions *)options API_DEPRECATED("Will be removed in a future release", ios(8, 11), tvos(8, 11)) API_UNAVAILABLE(macos); ^ 2 warnings generated. /Users/bipinvaylu/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-8.0.3/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 /Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Headers/Public/Firebase/Firebase.h: 22: /Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/build/ios/Release-iphoneos/XCFrameworkInterm ediates/FirebaseAnalytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h:128:5: note: 'setScreenName:screenClass:' has been explicitly marked deprecated here DEPRECATED_MSG_ATTRIBUTE( ^ In module 'UIKit' imported from /Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/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.5.sdk/System/Library/Frameworks/UIKit.framework/Head ers/UIKit.h:8: In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.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.5.sdk/System/Library/Frameworks/CoreFoundation.frame work/Headers/CoreFoundation.h:16: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/usr/include/AvailabilityMacros.h:184:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE' #define DEPRECATED_MSG_ATTRIBUTE(s) attribute((deprecated(s))) ^ 1 warning generated. 1 warning generated. /Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Runner/AppDelegate.swift:12:58: warning: conditional cast from 'AppDelegate' to 'UNUserNotificationCenterDelegate' always succeeds UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate ^ Undefined symbols for architecture arm64: "OBJC_CLASS$_GIDSignIn", referenced from: objc-class-ref in google_sign_in(FLTGoogleSignInPlugin.o) "OBJC_CLASS$_FIRAnalytics", referenced from: objc-class-ref in firebase_analytics(FLTFirebaseAnalyticsPlugin.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) /Users/bipinvaylu/Library/Developer/Xcode/DerivedData/Runner-efwdggeuqdlcxigsyoofyzkuohyf/Build/Intermediates.noindex/Runner.build/Release-iphoneos/R unner.build/Script-8B19FE6325D23E5800A5735D.sh: line 3: BUILT_PRODUCTS_DIR: command not found /Users/bipinvaylu/Library/Developer/Xcode/DerivedData/Runner-efwdggeuqdlcxigsyoofyzkuohyf/Build/Intermediates.noindex/Runner.build/Release-iphoneos/R unner.build/Script-8B19FE6325D23E5800A5735D.sh: line 3: INFOPLIST_PATH: command not found Running upload-symbols in Build Phase mode Validating build environment for Crashlytics... warning: DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. This could also be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it. Unable to process Runner.app.dSYM at path /Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/build/ios/Release-iphoneos/Runner.app.dSYM Make sure your project build settings are generating a dSYM file.

Validation succeeded. Exiting because upload-symbols was run in validation mode
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target
'Toast' from project 'Pods')
/Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target
'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
/Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target
'TOCropViewController' from project 'Pods')
/Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target
'AppAuth' from project 'Pods')
/Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target
'GoogleSignIn' from project 'Pods')
/Users/bipinvaylu/Documents/Work/Workspaces/kids-flutter-mobile-app/kids/ios/Pods/Pods.xcodeproj: warning: The iOS
deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target
'Flutter' from project 'Pods')

Encountered error while building for device.

Upvotes: 1

Views: 411

Answers (1)

ezmegy
ezmegy

Reputation: 635

There are two things happening here.

  1. Warning about the mismatching iOS deployment targets. See this answer for making it go away.

  2. An error related to dsym files missing. You're using Crashlytics which requires dsym files. Now, in Debug mode by default in any Xcode project those dsym files aren't generated as shown in the image below.

dsym files do not get generated in Debug by default in Xcode

However, you could either set it manually here for the whole project or just update Crashlytics to the latest because as of 2.5.0 they set it themselves in the podfile.

Upvotes: 0

Related Questions