Search code examples
swiftreact-nativewatchkittestflightwatchos

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)


Solution

  • This issue has been resolved by setting the deployment target same for all extensions added in project.

    Initially RN project having 11.0 deployment target and newly added watch having latest one 13.0 so swift folder is not created automatically. after modifying all to 12.0, it works automatically without doing any manual step.