Invalid Swift Support - Files Don't Match

Invalid Swift Support - Files don’t match

Same problem here. I think this is most likely a bug of the Developer Tools, related to the Bitcode.

I just found the workaround for this.

  1. Archive your app with new build number :(
  2. Find the archive (.xcarchive file) in Finder from Organizer “Show in Finder”
  3. Open the package and find directories like Products/Applications/YourApp.ipa/Frameworks/ and SwiftSupport/iphoneos/
  4. Copy all libswiftXxx.dylib files from SwiftSupport/iphoneos/ into Products/Applications/YourApp.ipa/Frameworks/ and overwrite
  5. Now, Upload to App Store from Organizer

With this process, I succeed in uploading my build. Now I’m waiting for review.

NOTE:

I’m using CocoaPods, and the ENABLE_BITCODE option was NO.

Invalid Swift Support - Files don't match Xcode 10.1

Xcode 10.1 has this line in the release notes:

The App Store and TestFlight don't accept submissions containing arm64e. Xcode will remove arm64e content from your app when you distribute from the Organizer window.

In our case, this was the key to fixing it. Our CI uses xcodebuild to compile and archive the IPA, and then uses fastlane to upload it. The first step is to unzip the IPA archive.

Doing that gives us the Swift standard libraries in a SwiftSupport folder and in the application's frameworks folder. Using that release note as a hint, we found that the standard libraries in Xcode 10.1 are shipped with 4 architectures:

% file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCore.dylib 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCore.dylib: Mach-O universal binary with 4 architectures: [arm_v7:Mach-O dynamically linked shared library arm_v7] [arm64]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCore.dylib (for architecture armv7): Mach-O dynamically linked shared library arm_v7
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCore.dylib (for architecture armv7s): Mach-O dynamically linked shared library arm_v7s
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCore.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCore.dylib (for architecture cputype (16777228) cpusubtype (2)): Mach-O 64-bit dynamically linked shared library arm64

Note the last one, which is in an unknown architecture. That's arm64e. If you upload with these files as is, TestFlight/iTunesConnect will reject your binary with the message you are getting.

For us, the solution was to copy over the standard libraries, use lipo to remove the arm64e slice, then sign them with our distribution certificate. Then we can repackage the IPA archive and upload it.

Hope that helps. It's not clear how you are building your application for submission, so this might be tougher for you to deal with, but for us it wasn't hard to modify our build scripts once we realized what was going on.

Invalid Swift Support / The SwiftSupport folder is empty

important note: this only works for projects that do not use swift, see comment below

I just met the same issue and resolved it by making the following change -
If you used to have Swift files in your project but then removed them, you only need to set "Embedded Content Contains Swift Code" to NO in Build Options.



Related Topics



Leave a reply



Submit