The SwiftSupport folder is missing.

Hi There,


I have a script that creates a xcarchive and then extracts an ipa from it. The exportOptions.plist file contains "ad-hoc" for the method and I also added "stripSwiftSymbols" and set it to false. Still, the ipa generated by the script only contains the payload. And when I try to upload the ipa I always get an email from itunes connect with a list of errors for:

Invalid Swift Support - The SwiftSupport folder is missing.

Invalid WatchKit Support - The WatchKitSupport2 folder is missing.

Invalid Executable - The executable does not contain bitcode.

Invalid iMessage App - Your iMessage app contains an invalid sticker pack.


When I try with Xcode everything works fine, and I can successfully upload build to iTunes connect. I am using the same provisioning profiles. So provisioning profiles is not an issue.


To create a xcarchive I am using,

xcodebuild \
    -workspace "${WORKSPACE_FILEPATH}" \
    -scheme "${SCHEME}" \
    GCC_PREPROCESSOR_DEFINITIONS="${GCC_PREPROCESSOR_DEFINITIONS}" \
    archive || exit 1


And to create an ipa I am using,

xcodebuild -exportArchive \
           -archivePath "${XCARCHIVE_FILEPATH}" \
           -exportPath "${IPA_DIRECTORY}" \
           -exportOptionsPlist "${IPA_EXPORT_OPTIONS_PLIST_FILEPATH}"


Am I missing some options in above commands, which will make sure swift support and watch support folders won't get stripped out when creating an ipa?

Answered by DTS Engineer in 297389022

Ad-Hoc is not the correct distribution method for App Store apps. Change the `method` key in your export options to be `app-store` instead.

Accepted Answer

Ad-Hoc is not the correct distribution method for App Store apps. Change the `method` key in your export options to be `app-store` instead.

I tried changing `method` key in export options plist to `app-store`. Also changed all the provisioning profiles to App-store once. But then I get different errors one of the error was "No "iOS App Store" profiles for team". Is the issue with provisioning profiles?

I would assume the error message is accurate. One way you can see what the correct values are is to build the archive in Xcode and export it for the App Store once. In the output of the export, you'll get a summary of distribution assets used, which you can then use to correct your command line builds.

The SwiftSupport folder is missing.
 
 
Q