"Invalid Swift Support" Xcode 10.1

We do releases of our app about once a month, usually with several TestFlight builds uploaded before release to the public. This month, when we did our upload to the App Store for TestFlight we got rejected with the following errors.


Invalid Swift Support - The files libswiftDarwin.dylib, libswiftCoreGraphics.dylib, libswiftCoreFoundation.dylib,

libswiftAVFoundation.dylib, libswiftGLKit.dylib, libswiftMediaPlayer.dylib, libswiftos.dylib, libswiftsimd.dylib,

libswiftCoreMedia.dylib, libswiftObjectiveC.dylib, libswiftQuartzCore.dylib, libswiftMetal.dylib,

libswiftFoundation.dylib, libswiftUIKit.dylib, libswiftCoreImage.dylib, libswiftCore.dylib, libswiftDispatch.dylib,

libswiftMapKit.dylib, libswiftModelIO.dylib, libswiftCoreAudio.dylib, libswiftCoreLocation.dylib,

libswiftCoreData.dylib, libswiftContacts.dylib don’t match /Payload/OurWonderfulApp.app/Frameworks/libswiftDarwin.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftCoreGraphics.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftCoreFoundation.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftAVFoundation.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftGLKit.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftMediaPlayer.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftos.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftsimd.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftCoreMedia.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftObjectiveC.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftQuartzCore.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftMetal.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftFoundation.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftUIKit.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftCoreImage.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftCore.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftDispatch.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftMapKit.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftModelIO.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftCoreAudio.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftCoreLocation.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftCoreData.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftContacts.dylib.

Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to

/Payload/OurWonderfulApp.app/Frameworks/libswiftDarwin.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftCoreGraphics.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftCoreFoundation.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftAVFoundation.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftGLKit.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftMediaPlayer.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftos.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftsimd.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftCoreMedia.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftObjectiveC.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftQuartzCore.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftMetal.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftFoundation.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftUIKit.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftCoreImage.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftCore.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftDispatch.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftMapKit.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftModelIO.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftCoreAudio.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftCoreLocation.dylib, /Payload/OurWonderfulApp.app/Frameworks/libswiftCoreData.dylib,

/Payload/OurWonderfulApp.app/Frameworks/libswiftContacts.dylib.


We had updated to Xcode 10.1 this month and with the help of various sites, we found the following note in the 10.1 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. (42296212)"


Seeing that, we ripped apart our .ipa and found that all of our Swift dylibs contained arm64e. We hadn't uploaded our code from the organizer window in XCode because, in truth, we've never done that, and our whole system isn't setup that way. We have a CI/CD pipeline in Jenkins that does builds from the command line and eventually a build is uploaded via Fast Lane.


We then thought, OK, let's take the same .ipa we're uploading via Fast Lane, and upload it via Apple's own AppStore Connect App Uploader. If the organizer window strips arm64e, surely that will too. No dice. Same errors.


After multiple failed tries at stripping arm64e in our builds, we embarked on trying to do what Apple expressly said not to, "Don't apply post-processing". Stripping architectures out of .dylibs and re-signing your app is relatively straightforward if your app is simple, but maybe not so much if your bundle contains multiple extensions, a watch app, etc. We had to strip and re-sign everything. The good news is that after doing all of this, our app upload in AppStore Connect succeeded.


I'm wondering if anyone else has run into this, and also looking for verification that we've got the cause nailed down. The fact that our upload succeeded after stripping the .dylibs of arm64e would seem to indicate that. Finally, if this is all true, then this has to be a bug in Xcode, and could someone at Apple please fix it before 10.2?

Replies

Whatever it is, you could file a bug. Or better burn a DTS to be sure you've solved the problem.


But how will you do with any further release ?

m also having the same issue, i tried

1.Stripping Swift standard library

2.Rebuild each Framework in Swift 4.2

3.Replacing libsSwiftxxx from SwiftSupport/iphoneos/ in Products/Applications/YourApp.ipa/Frameworks/


Ive recently uploaded from xcode 10 but m facing this issue in xcode 10.1 😟


please help me.

SiddRamesh,


What we did is:

  • decompress the ipa
  • remove the armv6e architecture from all .dylibs in which it appeared using lipo
  • resigned including re-adding entitlements anything in the bundle that was signed, including extensions, watch app, etc.
  • recompress the .ipa.


Sounds easy when you say it fast, I know.

HI,

I am facing same issue . i have tried ways that mentioned on apple forums https://developer.apple.com/library/archive/technotes/tn2435/_index.html#//apple_ref/doc/uid/DTS40017543-CH1-TROUBLESHOOTING


that all cases passed and found no such tile according those command that i should covert using mentioned process in above thread. can any one help? i can just extract archive, copy files from SwiftSupport/iphones folder to projectname.app/frameworks folder? and i have to delete SwiftSupport folder or not?

Invalid Swift Support - The files libswiftDarwin.dylib, libswiftMetal.dylib, libswiftCoreAudio.dylib, libswiftsimd.dylib, libswiftQuartzCore.dylib, libswiftos.dylib, libswiftMapKit.dylib, libswiftObjectiveC.dylib, libswiftDispatch.dylib, libswiftCoreLocation.dylib, libswiftCoreGraphics.dylib, libswiftCoreFoundation.dylib, libswiftUIKit.dylib, libswiftCoreMedia.dylib, libswiftAVFoundation.dylib, libswiftCore.dylib, libswiftFoundation.dylib, libswiftXCTest.dylib, libswiftCoreImage.dylib aren’t at the expected location /Payload/Technician.app/Frameworks. Move the file to the expected location, rebuild your app using the current public (GM) version of Xcode, and resubmit it.

The best thing to do here is to ensure you are following the recommended approach for building and distributing your app. Xcode will determine which Swift dylibs to embed in your app based on the system frameworks you use. When archiving for the store, Xcode will create the SwiftSupport folder with the proper contents based on the build settings for the app and the frameworks you use. The included architectures may vary between these two locations, and that's expected.


The most common issues causing an error like this are scripts during the build, or after the build in a post-processing step, either in the build itself, scripts that drive a continuous integration system, or third party tools. No script should need to move files around, either in the app's Frameworks folder or the SwiftSupport folder, or strip out architectures from the files therein. If you find yourself in such a situation, it means there is something else wrong with the build, and you should look at addressing that issue instead of patching the issue up at the end.


Developer Technical Support is available to help with any specific issues you encounter during your build.

I am facing the same issue and figured out why your app getting this issue, arm64e is for newest iPhones. The reason is to check architecture of your main app if that is not enabling for arm64e then all library you app have must don't have.