23

After submitting an app update using Application Loader, I got this email from Apple:

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

Invalid Swift Support - The SwiftSupport folder is missing. 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 have confirmed that this binary was built with the latest Xcode GM (7.3.1), so that is not the issue. I have seen a wide variety of potential fixes for this problem online but was hoping that by giving further details somebody might be able to help me figure out the specific solution.

  • Submitted an IPA file using Application Loader 3.5 with no problems.
  • The previous version of the app does not use Swift, but this update does.
  • The "Embedded Content Contains Swift Code" build setting is set to NO. My understanding is that this should only be YES if we have a pure Objective-C target that depends on a Swift or mixed target.
  • The project uses CocoaPods, but nothing has changed in our pods for this update.
  • The previous version of the app included a WatchKit app and extension, but this update does not.
  • Inside an xcarchive generated with the same build, the SwiftSupport folder is there. It contains a subfolder called iphoneos which contains several Apple Swift libraries like libswiftFoundation.dylib.
  • If I rename the .ipa file to .zip and unarchive it, its app package does not contain a SwiftSupport folder, but does contain a Frameworks folder with the same Swift dylibs.
Community
  • 1
  • 1
Luke
  • 7,110
  • 6
  • 45
  • 74

8 Answers8

18

The solution here was in this answer. We needed to use the new -exportOptionsPlist flag with xcodebuild instead of the older -exportFormat and -exportWithOriginalSigningIdentity flags. The plist just needs to have the method key set to app-store.

Community
  • 1
  • 1
Luke
  • 7,110
  • 6
  • 45
  • 74
  • where do i have to change this key in which plist file, please help. – vaibhav May 05 '17 at 14:05
  • 2
    You don't need to change a key in a plist file. You need to use the `-exportOptionsPlist` flag on the command line, which takes a path to a plist file. That plist (a new file) needs to contain the `method` key with the value set to `app-store`. – Luke May 08 '17 at 15:45
14

The root cause of this is that the provisioning profile is ad-hoc and it doesn't create SwiftSupport directory in the ipa. The folder is created using app-store as the export method, so it worked for me when I updated my provisioning profile to app-store.

Reference

Taku
  • 5,639
  • 2
  • 42
  • 31
3

I received this same email after uploading an .ipa file to App Store Connect through the Transporter app. The following is where I went wrong: I distributed the app using ad hoc.

The following steps are the solution for my error:

  1. Archive app
  2. Distribute on TestFlight and the App Store
  3. Export
  4. Open ExportOptions.plist in the newly created folder from the export.
  5. Make sure the method property has the value app-store if you are uploading to App Store Connect/TestFlight like me.
  6. Drag and drop the exported .ipa file to Transporter.
  7. Deliver your app to upload it.

And that's it!

Original answer here: https://stackoverflow.com/a/62568526/10374366

Kaye
  • 153
  • 2
  • 12
2

In my case, I just added redundant swift file to the project and it solved the problem.

Soohwan Park
  • 625
  • 4
  • 11
2

You should choose "Save for iOS App Store Deployment" instead of "Save for Ad Hoc Deployment" option at the time of creating ipa file.enter image description here

Pranit
  • 892
  • 12
  • 20
2

EXPO users. I had this problem with expo build:ios it got me stumped for days. The build from the expo server was about 39mbs which was far smaller than previos versions.

To fix it I had to use

expo build:ios -c

This resets all the credentials (I said yes to all questions) then rebuilds the app. The resuling ipa file was 250mbs and everything is now working preperly.

Richard Turner
  • 423
  • 4
  • 12
0

For our case we use app center for preparing android and ios builds. For production branch we use release provisioning profile and for normal branches we use normal provisioning profile, and we instead of picking the production build, used normal branch build, which caused this issue.

ashishdhiman2007
  • 807
  • 2
  • 13
  • 28
0

I solved this by uploading build via Xcode instead of Transporter app.

Previously I tried to generate build, create IPA, and upload through Transporter. But later I got to know that manually creating IPA sometimes omits Swift related stuff in the app bundle.

HangarRash
  • 7,314
  • 5
  • 5
  • 32
Ragu
  • 51
  • 4