Reputation: 282
Suddenly our project is not uploading properly to the App Store and we are stopped at this point :
Error message:
ERROR ITMS-90502: "Invalid Bundle. Apps that only contain the arm64 slice must also have 'arm64' in the list of UIRequiredDeviceCapabilities in Info.plist."
We've tried all, this is our info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Optimio</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) upload your expense photos through camera and roll</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) upload your expense photos through camera and roll</string>
<key>UILaunchStoryboardName</key>
<string>Uploaders</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
Also we have this build settings:
Upvotes: 8
Views: 1807
Reputation: 3202
(I did try the post install hook as suggested here but that didn't work)
Add the following xml to your main target's info.plist
file,
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
Then add the same xml to all your info.plist
files in your pods project (if you have a pods project of course).
You should now be able to upload to iTunes connect.
Upvotes: 7
Reputation: 5017
It may be a change in iTC that's causing it, but there does actually seem to be a fix.
I corrected the plists of ALL extensions in my (iOS11 only) project to include arm64
as a requirement (UIRequiredDeviceCapabilities
).
And then added this post install hook for cocoapods: https://twitter.com/aaron_pearce/status/966530631608881153
Now uploaded successfully and going through processing.
EDIT:
Whilst this solution is valid, and worked perfectly well, it is no longer necessary. It seems that iTC has been "fixed", and now accepts (again) builds that have not had these changes made.
https://forums.developer.apple.com/message/296129
Upvotes: 11
Reputation: 94
This looks to be a recent change that Apple made with ITC validation. Previously it was enough to flag your main project as restricted to arm64
, but now it looks like you need to ensure that even embedded projects are flagged as well. Meaning that Pods.proj
and any Internal.proj
files need to be restricted along with the main project file.
Unfortunately right now Cocoapods, by default, builds frameworks that support arm64, armv7, and armv7s which causes an issue here. I was able to solve this problem by adding the following lines to my Podfile.
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings['VALID_ARCHS'] = 'arm64'
end
end
Hope this helps!
Source: https://gist.github.com/alexpersian/e6ab115dc12f3d48eee0e7f27dfb567d
Edit: (2/23/2018) This issue looks to have been resolved on the iTC side based on the following forum thread. https://forums.developer.apple.com/message/296129
Upvotes: 1