如何使用 Visual Studio Apache Cordova 工具和 Xcode 8 构建 iOS 应用程序

How to build an iOS application using Visual Studio Tools for Apache Cordova and Xcode 8

如果这些人知道我做错了什么并帮助遇到同样问题的人,这是一个问题。

我在 Win10 上使用 Visual Studio 2015,在 Apache Cordova 上使用 Visual Studio 工具。我的 Mac 上有 Xcode 8。在设置我的项目时,我遵循本指南 - https://taco.visualstudio.com/en-us/docs/ios-guide/. I also use a the hook available here - https://dpogue.ca/articles/cordova-xcode8.html。目前我正在构建临时应用程序(我相信应用程序的商店分发类型将是另一个问题)。

尽管我执行了链接文档中提到的所有步骤,但我的构建失败并显示消息 "No suitable provisioning file found ..."(是的,我使用我的 Xcode 安装在 Acount 对话框下下载了所有必要的 provisionig 文件)。

我找到了这个解决方案 - 在第一次构建后,我使用 Xcode 在 Mac 上打开项目(项目文件位于 Macintosh HD/Users/MYNAME/ 下。 taco_home/remotebuilds/taco-remote/builds/BUILDNUMBER/cordovaApp/platforms/ios)。我不做任何更改,我只从 Xcode 菜单中选择构建选项。该项目已成功构建,从那以后,我可以在需要时随时从 Visual Studio 构建项目。我做错了什么吗?我认为直接在Xcode中编译应该没有必要。

P.S. 我刚刚发现,新的配置文件出现在我的 Mac 上,一旦它构建它 - 它被命名为 "iOS Team Provisioning Profile: APP_ID" .可能,它与问题有某种关系。

我终于在为应用商店构建应用时找到了解决方案。有必要在 build.json 中指定配置文件 ID。文件。有必要添加此部分,包括 provisioningProfile 密钥。

"release":{ "developmentTeam": "XXXXXXXXXXX", "codeSignIdentity": "iPhone Distribution", "provisioningProfile": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX", "packageType": "app-store" }

ID 是配置文件的名称,存储在 ~/Library/MobileDevice/Provisioning Profiles/

中的 Mac

可以找到更多信息How to build and upload a correctly signed iOS app to App Store and https://cordova.apache.org/docs/en/latest/guide/platforms/ios/