Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Swift Support - The SwiftSupport folder is empty

My build is successfully uploaded but Not shown on testflight due to below issue sent by apple.
App detail : I am having iPhone app in React Native and watchOS app in swift langauge. Xcode version : 11.3

Issue reported by apple -

ITMS-XXXX: Invalid Swift Support - The SwiftSupport folder is empty. Rebuild your app using the current public (GM) version of Xcode and resubmit it.

I searched and tried lot of things but nothing work. Also tried below link

  1. The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it
  2. https://forums.developer.apple.com/thread/125902
  3. "Embedded Content Contains Swift Code" set to Yes

Updated Answer of my query : I have resolved the issue by adding the required framework in watchOS folder of Swift Support. May be its Xcode issue which is creating empty folder for my watchOS. Followed below steps

  1. Copy watchOS lib swift file from this path "‎⁨ /Applications/Xcode.app/Contents/Developer/ToolChains/XcodeDefault.xctoolchain/usr/lib/swift/⁨watchos⁩" Or You can also get framework from your previous watch build which is successfully uploaded
  2. Paste the copied library in below location

2.1 Create Archive of your app -> Right click on selected build and select show in finder -> show package content -> Swiftsupport -> watchOS/"Paste here"

2.2 Paste those frame in framework folder also by following the below path Right click on selected build and select show in finder -> show package content -> Products -> Applications -> right click on ipa file -> show package content->Watch->Right click on your watch app -> show package content -> Frameworks/"Paste here"

  1. Set "Always embedded swift standard libraries" to yes in builsetting of you main app target and watchkitapp (Not in extension)

Optional step

if your SwiftSupport->iPhoneOS folder is also empty then just create new swift file to your objective c code it will ask for bridge rest it will do for all required things (No need to connect this file with any objective c just add it to project)

like image 678
Shipra Gupta Avatar asked Jan 14 '20 06:01

Shipra Gupta


2 Answers

My work-around for this issue is:

  1. in the Xcode -> Organizer window, after you create an archive, right-click on your new archive
  2. press "Show in Finder"
  3. right click on the archive in Finder
  4. press "Show Package Contents"
  5. delete the 'SwiftSupport' folder

Now you can submit without getting that error.

I encountered this issue on a React Native project.

I tried a lot of the most popular solutions e.g. editing Build Settings and none of those worked for me.

like image 173
RC Whim Avatar answered Nov 10 '22 23:11

RC Whim


This is a very annoying issue and happens whenever you used third-party tools to make the application rather than Xcode. To fix this issue you must be calm first and need to follow these steps, I encountered in the same situation and after that, I wrote myself some scripts to solve that issue.

  1. Get Your .app file from XCode.
  2. identify third party SDK that is using swift.
  3. Create A folder with your app name.
  4. Within that folder create two folders with the name "Payload" and "SwifSupport"
  5. Put your .app file inside Payload
  6. Create another "iphonesos" folder under "SwiftSupport"
  7. copies swift .dylib files to that folder. make sure codesign of that swift .dylib should not be with your's certificate, just copy from the following path. "/Applications/Xcode.app/Contents/Developer/ToolChains/XcodeDefault.xctoolchain/usr/lib/swift"
  8. Make sure your third party libs should be signed with your own certificate.
  9. After that just make .ipa and upload on AppStore it should work. Cheers if you face issues you can write to me here. [email protected]
like image 3
Muhammad Shauket Avatar answered Nov 11 '22 00:11

Muhammad Shauket