0

I'm getting an error when distributing my app through Xcode. I have looked into build settings and cannot find the issue. My app imports some Firebase modules via Cocoapods.

All deployment targets in build settings are the latest OS.

Full text of error:

This bundle is invalid. Applications built for more than one architecture require an iOS Deployment Target of 3.0 or later. With error code STATE_ERROR.VALIDATION_ERROR.90081 for id c8ae9ab9-f501-4115-bb3d-32f96ca47d0e

My app (I think) is only configured for iOS vs other Apple OS', and I can't find anywhere that I am specifying such a low deployment target. Everywhere I look is the latest OS, or iOS14/15.

In my searching today it seams like Cocoapods could potentially be causing this issue, but I haven't been able to find the root issue. For reference, here is the Pod File my project uses:

target 'AppName' do
  
  use_frameworks!

  # Pods for AppName

    pod 'Firebase/Firestore'
    pod 'Firebase/Auth'
    pod 'FirebaseUI/Auth'
    pod 'FirebaseUI/Email'
    pod 'FirebaseUI/Phone'
    pod 'FirebaseFirestoreSwift', '> 7.0-beta'
    pod 'Firebase/DynamicLinks'
    pod 'Firebase/Messaging'
    pod 'Firebase/Analytics'

post_install do |installer|
 installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
   config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
  end
 end
end

end
dilly
  • 1
  • 1
  • 1
    We had the same issue and fixed it by setting the deployment Target of the watchextension and watchapp to 3.0 (or higher). Now also make sure that every framework used in the watch sets the deployment target to 3.0 (or higher) too. So if you use cocoapods (or any other dependency manager), make sure the frameworks installed via cocoapods have the deployment target for the watch set to 3.0 as well. – sycoi001 Mar 17 '22 at 06:57
  • I added config.build_settings['WATCHOS_DEPLOYMENT_TARGET'] = '3.0' to the Pod file and rebuilt the project but having the same error. – dilly Mar 17 '22 at 16:44
  • I have also confirmed all deployment targets in my build settings are the latest OS. – dilly Mar 17 '22 at 17:08
  • 1
    I seem to have fixed this by adding a Minimum System Version parameter to the Pods-Info and GoogleService-Info files with a value of 14. – dilly Mar 17 '22 at 17:27
  • 1
    I had the same issue. I have just changed Firebase SDK to 8.0.0. So it fixed the problem – Taras May 16 '22 at 18:41

1 Answers1

0

I had the same problem after have changed firebase spm from "next major" to "main". I have changed to "next major" and problem was fixed.

koliush
  • 186
  • 10