Invalid Swift Support - The SwiftSupport folder is empty

故事扮演 提交于 2020-03-03 07:13:35

问题


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 Create Archive of your app -> 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)


回答1:


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. mshauket.developer@gmail.com


来源:https://stackoverflow.com/questions/59728413/invalid-swift-support-the-swiftsupport-folder-is-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!