无效的 Swift 支持 - SwiftSupport 文件夹为空 [英] Invalid Swift Support - The SwiftSupport folder is empty

查看:42
本文介绍了无效的 Swift 支持 - SwiftSupport 文件夹为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的构建已成功上传,但由于 Apple 发送的以下问题未在 testflight 上显示.
应用程序详细信息:我有 React Native 的 iPhone 应用程序和 swift 语言的 watchOS 应用程序.Xcode 版本:11.3

apple 报告的问题 -

<块引用>

ITMS-XXXX:无效的 Swift 支持 - SwiftSupport 文件夹为空.使用当前公共 (GM) 版本的 Xcode 重新构建您的应用程序重新提交.

我搜索并尝试了很多东西,但没有任何效果.也试过下面的链接

  1. SwiftSupport 文件夹不见了.使用当前公开 (GM) 版本的 Xcode 重新构建您的应用并重新提交
  2. https://forums.developer.apple.com/thread/125902
  3. 嵌入的内容包含 Swift 代码"设置为是

我的查询的更新答案:我通过在 Swift Support 的 watchOS 文件夹中添加所需的框架解决了这个问题.可能是它的 Xcode 问题,它正在为我的 watchOS 创建空文件夹.按照以下步骤

<块引用>

  1. 从此路径复制 watchOS lib swift 文件"/Applications/Xcode.app/Contents/Developer/ToolChains/XcodeDefault.xctoolchain/usr/lib/swift/watchos"或者您也可以从您之前的手表构建中获取框架上传成功
  2. 将复制的库粘贴到以下位置

2.1 为您的应用创建存档 ->右键单击所选版本并选择在查找器中显示 ->显示包内容 ->Swiftsupport ->watchOS/在此处粘贴"

2.2 也按照以下路径将这些框架粘贴到框架文件夹中右键单击所选版本并选择在查找器中显示 ->显示包内容 ->产品 ->应用程序 ->右键单击 ipa 文件 ->显示包内容->观看->右键单击您的手表应用程序->显示包裹内容->框架/在此处粘贴"

  1. 设置始终嵌入 Swift 标准库";在您的主要应用程序目标和 watchkitapp 的构建中选择是(不在扩展中)

可选步骤

如果您的 SwiftSupport->iPhoneOS 文件夹也是空的,那么只需为您的目标 C 代码创建新的 swift 文件,它就会要求桥接休息它会做所有需要的事情(不需要连接这个带有任何目标 c 的文件只需将其添加到项目中)

解决方案

此问题已通过为项目中添加的所有扩展设置相同的部署目标得到解决.

最初 RN 项目具有 11.0 部署目标,新添加的 watch 具有最新的 13.0,因此不会自动创建 swift 文件夹.全部修改为12.0后,自动运行,无需手动操作.

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)

解决方案

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.

这篇关于无效的 Swift 支持 - SwiftSupport 文件夹为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆