I tried compiling my app on a new environment, and it failed when installing iOS pods with this error:
Specs satisfying the
.symlinks/plugins/sqflite/ios) dependency were found, but they required a higher minimum deployment target.
% flutter build ios --release --no-codesign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Warning ────────────────────────────────────────────────────────────────────────────── Your Flutter application is created using an older version of the Android embedding. It's being deprecated in favor of Android embedding v2. Follow the steps at https://flutter.dev/go/android-project-migration to migrate your project. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device. Building com.wafrat.flashcards for device (ios-release)... Running pod install... 1,149ms CocoaPods' output: ↳ Preparing Analyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Fetching external sources -> Fetching podspec for `Flutter` from `Flutter` -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios` ... -> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios` -> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios` Resolving dependencies of `Podfile` CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only perfomed in repo update CDN: trunk Relative path: Specs/0/3/5/Firebase/7.5.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update ... CDN: trunk Relative path: Specs/0/3/5/Firebase/7.5.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update CDN: trunk Relative path: all_pods_versions_d_4_0.txt exists! Returning local because checking is only perfomed in repo update CDN: trunk Relative path: Specs/d/4/0/GoogleSignIn/5.0.2/GoogleSignIn.podspec.json exists! Returning local because checking is only perfomed in repo update [!] CocoaPods could not find compatible versions for pod "sqflite": In Podfile: sqflite (from `.symlinks/plugins/sqflite/ios`) Specs satisfying the `sqflite (from `.symlinks/plugins/sqflite/ios`)` dependency were found, but they required a higher minimum deployment target. /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run' /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:23:in `load' /usr/local/bin/pod:23:in `<main>' Error output from CocoaPods: ↳ [!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`. Error running pod install
So I opened my Podfile, and uncommented this line:
# Uncomment this line to define a global platform for your project platform :ios, '9.0'
However, even with version 9, it would return the same error, so I switched to version 10. At that point pods installed correctly.
It's a bit odd since the sqflite podspec seems to require only version 9: https://github.com/tekartik/sqflite/blob/5c57e1e912f0d222adaa8ba52e0c8eac502f27a5/sqflite/ios/sqflite.podspec#L20.
Then after a few minutes, compilation failed with those errors:
ld: warning: object file ([project_folder]/build/ios/Release-iphoneos/firebase_core/firebase_core.framework/firebase_core(FLTFirebaseCorePlugin.o)) was built for newer iOS
version (10.0) than being linked (8.0)
I opened the workspace and saw that indeed it is still set to version 8.
Finally, upon compiling it threw this error:
error: No profile for team '[...]' matching '[... provisioning certificate]' found: Xcode couldn't find any provisioning profiles matching '[...]'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'Runner' from project 'Runner')
To fix it, I went into XCode's tab for Signing, signed in, then downloaded the profile to my new environment. At this point it threw a warning, saying the certificate profile didn't include an Apple Distribution certificate. This is most likely because of Apple's new ability to publish an app to both the App Store and the Mac App Store for machines with M1 processors.
So I recreated a new certificate profile for my app, that included a new Apple Distribution certificate. Then I downloaded it to my machine from the XCode UI, and this time it compiled and got published alright.