“无效的 Swift 支持"在 Xamarin.iOS 中使用本机 Swift 库 [英] "Invalid Swift Support" Using Native Swift Library in Xamarin.iOS

查看:26
本文介绍了“无效的 Swift 支持"在 Xamarin.iOS 中使用本机 Swift 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚实现了一个原生库,图表(原始本机库),并且可以在我的手机和模拟器上运行.不幸的是,当我将它提交到 iTunes Connect 时,它在处理后将其踢回并说:

I just implemented a native library, Charts (original native library), and its working on my phone and simulator. Unfortunately, when I submit it to iTunes connect, it kicks it back after processing and says:

无效的 Swift 支持 - 缺少 SwiftSupport 文件夹.重建您的应用程序使用当前公共 (GM) 版本的 Xcode 并重新提交

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

我正在使用 XCode 将存档发布到 iTunes 连接,但不知道该怎么做 这个 StackOverflow 解决方案说.由于我不使用 XCode 来启动构建过程,因此我使用的是 Xamarin Studio 6,不确定如何设置该设置.

I'm using XCode to publish the archive to iTunes connect, but don't know how to do what this StackOverflow solution is saying. Since I don't use XCode to start the build process, I'm using Xamarin Studio 6, not sure how to set that setting.

所以理想情况下,我需要在目标设置中将标志 EMBEDDED_CONTENT_CONTAINS_SWIFT 设置为 YES".

So ideally, I need to "Set the flag EMBEDDED_CONTENT_CONTAINS_SWIFT to YES in the target settings".

有人对如何做到这一点有任何想法吗?在发布测试版之前遇到了障碍,直到我可以将其上传.

Anybody have any ideas on how to do this? At a roadblock on releasing the beta until I can get this uploaded.

感谢您的帮助!

推荐答案

更新:您可以使用我拼凑的这个脚本来修复您的 IPA,使其格式正确,下载 Github 上的自动 IPA 打包程序.它是我在下面引用的 IPA Packager 的简化版,也处理了下面的所有步骤.

Update: You can just use this script I threw together to fix your IPA so it's properly formatted, download the Auto IPA Packager on Github. It's a simplification of the IPA Packager I reference below, and handles all of the steps below too.

所以,我终于把它正确地提交到了 App Store,只需要比我预期的多几个步骤.我的很多困惑是因为我不想遗漏其他工件.我决定在此处列出该过程,以便将来部署 iOS 应用程序且需要使用此工具的任何人都非常清楚.

So, I've finally made it submit properly to the App Store, just had to hop through a few more steps than I expected. A lot of my confusion was because I didn't want to leave out other artifacts. I've decided to list the process here so it's very clear for anybody deploying an iOS app in the future that needs to use this tool.

  1. 从 GitHub 下载 IPA Packager.
  2. 然后转到 Xamarin Studio,然后构建 > 存档以供发布.
  3. 我一直在使用 XCode 导出我的档案.打开 XCode,窗口 > 管理器.找到您的应用存档,然后点击导出"并按照相应的步骤进行操作,然后保存.
  4. 找到 .ipa 文件并将其更改为 .zip,然后解压缩.
  5. 接下来,在提取的文件中,找到AppNameFolder > Payload > AppName.app".
  6. 加载终端并执行以下操作:

  1. Download the IPA Packager from GitHub.
  2. Then go to Xamarin Studio, and Build > Archive for Publishing.
  3. I've been using XCode to export my archives. Open XCode, Window > Organizer. Find your app archive, and click "Export" and follow the appropriate steps, then save it.
  4. Locate the .ipa file and change it to .zip, and extract it.
  5. Next, in the extracted files, locate the "AppNameFolder > Payload > AppName.app".
  6. Load terminal and execute the following:

sh package_ipa.sh/AppNameFolder/Payload/AppName.app/AppNameFolder/AppName.ipa

sh package_ipa.sh /AppNameFolder/Payload/AppName.app /AppNameFolder/AppName.ipa

  • AppName.ipa 现在应该被创建.这个文件应该可以上传到 App Store.但是,如果您的 AppNameFolder 有一个Symbols"目录,您应该遵循以下附加步骤...

  • AppName.ipa should now be created. This file should be ready to upload to the App Store. However, if your AppNameFolder has a "Symbols" directory you should follow the additional steps below...

    可选:如果您有符号文件,则应将 AppName.ipa 更改为 AppName.zip 并解压缩文件.

    Optional: If you have symbol files, you should change the AppName.ipa to AppName.zip and extract the files.

    将AppNameFolder > Symbols"目录拖到解压的AppName文件夹中,然后压缩文件夹中的内容并将扩展名改回.ipa.

    Drag the "AppNameFolder > Symbols" directory into the extracted AppName folder, then zip the contents of the folder and change the extension back to .ipa.

    这篇关于“无效的 Swift 支持"在 Xamarin.iOS 中使用本机 Swift 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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