Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Swift Support - Files not in right location

I've been trying to upload a new build to iTunes Connect to update an app. I first used xCode 6 but got a email from Apple stating this:

Dear Developer,

We have discovered one or more issues with your recent delivery for "App". To process your delivery, the following issues must be corrected:

Invalid Swift Support - The files libswiftDarwin.dylib, libswiftDispatch.dylib, libswiftCoreGraphics.dylib, libswiftUIKit.dylib, libswiftContacts.dylib, libswiftCore.dylib, libswiftCoreAudio.dylib, libswiftFoundation.dylib, libswiftXCTest.dylib, libswiftCoreImage.dylib, libswiftObjectiveC.dylib aren’t at the expected location /Payload/App.app/Frameworks.

Move the file to the expected location, rebuild your app using the current public (GM) version of Xcode, and resubmit it.

Once these issues have been corrected, you can then redeliver the corrected binary.

I thought it was a simple fix, so I just updated to the latest GM (Xcode 7.2) & completed the Swift 2 migration, however I received the same email. Could someone explain how to solve this and what those files are? This isn't a "files don't match" problem as seen in other questions.

like image 552
John Polk Avatar asked Nov 09 '22 22:11

John Polk


1 Answers

I stumbled upon this as I've encountered the same problem. It's the first time I've been tasked with handling the release of a Swift app to the App Store.

I found that this answer by TALAA works a treat: https://stackoverflow.com/a/26949219/1567836

There is an "Embedded Content Contains Swift Code" flag in the Build Settings that needs to be set to YES. After setting this, clean the project before building again.

After the clean, you'll have to recreate a build to upload to the App Store. You might find that the new upload will get rejected claiming that a binary already exists for that number. If you update the build number (has to be larger than the previous one) then the new upload will be accepted.

like image 189
Thomas Verbeek Avatar answered Nov 14 '22 23:11

Thomas Verbeek