Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 10 GM - Invalid Binary Architecture when submitting to App Store Connect?

Tags:

xcode

ios

I have an iOS and watchOS app that support iOS 11/12 and watchOS 4/5. I've been submitting builds to App Store Connect for TestFlight without issue using the Xcode 10 betas. Today I submitted a build using Xcode 10 GM, and I got the following email:

Dear Developer,

We identified one or more issues with a recent delivery for your app, "littlefeed". Please correct the following issues, then upload again.

Invalid Binary Architecture - iOS 3.0 introduced support for multiple binary architectures. If your binary is built for multiple architectures, your Info.plist must have a MinimumOSVersion key with a value of at least 3.0. Additionally, if your app is intended to support earlier iPhone and iPod touch models, your app must contain at least an armv6 binary; "thin" armv7-only binaries will not be accepted unless the armv7 required device capability is also present in the Info.plist UIRequiredDeviceCapabilities key or the MinimumOSVersion key has a value of 4.3 or higher.

For more information, see Technical Q&A QA1707 at: http://developer.apple.com/iphone/library/qa/qa2010/qa1707.html.

Best regards,

The App Store Team

Problem is, this information is terribly out of date. The MinimumOSVersion key has long been deprecated; armv6 is an irrelevant architecture for iOS 11+ devices; the link to QA1707 is dead; etc. All related issues on Google and Stack Overflow tend to date back to 2012 or earlier, so I don't actually know what the issue is. My best shot-in-the-dark is that it's related to the fact that the Apple Watch Series 4 is now a 64-bit processor, and maybe I need to configure my watch app and watch extension targets somehow to handle it?

If anyone has any thoughts, it'd be much appreciated.

like image 600
UberJason Avatar asked Sep 12 '18 22:09

UberJason


4 Answers

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.

like image 119
Renato Stauffer Avatar answered Nov 20 '22 23:11

Renato Stauffer


I had kinda the same one, but for me it was an error when uploading the binary to appStoreConnect:

ERROR ITMS-90081: "This bundle is invalid. Applications built for more than one architecture require an iOS Deployment Target of 3.0 or later."

It required manually checking (and changing some of them to 3.0) every single WATCHOS_DEPLOYMENT_TARGET in both project.pbxproj files (the main project and the pods)

like image 21
Dmitrii Avatar answered Sep 25 '22 05:09

Dmitrii


I had kinda the same one, but for me it was an error when uploading the binary to appStoreConnect:

ERROR ITMS-90081: "This bundle is invalid. Applications built for more than one architecture require an iOS Deployment Target of 3.0 or later."

It required manually checking (and changing some of them to 3.0) every single WATCHOS_DEPLOYMENT_TARGET in both project.pbxproj files (the main project and the pods)

like image 4
topolog Avatar answered Nov 20 '22 23:11

topolog


To make it easier to set the correct WATCHOS_DEPLOYMENT_TARGET for all dependencies in Pods, add this to the end of your Podfile. You can replace 3.0 if you require a higher version as deployment target, the minimum for binary validation is 3.0

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            if config.build_settings['SDKROOT'] == 'watchos'  
              config.build_settings['WATCHOS_DEPLOYMENT_TARGET'] = '3.0'  
            end
        end
    end
end
like image 3
Emil Korngold Avatar answered Nov 20 '22 23:11

Emil Korngold