简体   繁体   English

如何在Apple Watch中创建构建(.ipa或.app)

[英]How to create build(.ipa or .app) in Apple Watch

Hi I am developing a app with iWatch extension, But I was unable to create build. 嗨,我正在开发一个带有iWatch扩展的应用程序,但我无法创建构建。 Every time faceing some error like : 每次都面临一些错误:

Code Sign warning: Specified PROVISIONING_PROFILE (***********************) not found and no CODE_SIGN_IDENTITY specified. 代码签名警告:未找到指定的PROVISIONING_PROFILE(***********************)且未指定CODE_SIGN_IDENTITY。 Ignoring PROVISIONING_PROFILE for now. 暂时忽略PROVISIONING_PROFILE。 This will become an error in the future. 这将成为未来的错误。

CodeSign error: code signing is required for product type 'WatchKit Extension' in SDK 'iOS 8.2' CodeSign错误:SDK“iOS 8.2”中的产品类型“WatchKit Extension”需要代码签名

Is there any option in apple deveoper account (in bundle identifier or provision profile) to select for iWatch Extension ? apple deveoper帐户(在包标识符或配置文件中)是否有任何选项可供选择iWatch Extension?

Please suggest. 请建议。

Thanks in advance 提前致谢

I Got MY ANSWER: 我有我的答案:

You need to create two new AppIDs in the Developer Portal with the correct bundle identifier for your Watchkit app and Watchkit extension. 您需要在Developer Portal中创建两个新的AppID,并为Watchkit应用程序和Watchkit扩展提供正确的包标识符。 The bundle identifier has to extend the main apps identifier, so if your app is com.myapp it should be com.myapp.watchkitextension and com.myapp.watchkitapp 包标识符必须扩展主应用程序标识符,因此如果您的应用程序是com.myapp,则应该是com.myapp.watchkitextension和com.myapp.watchkitapp

You also need to create the related Provisioning Profiles for the AppIDs, one for the extension and one for the app. 您还需要为AppID创建相关的Provisioning Profiles,一个用于扩展,一个用于app。 Add required add ons (like Keychain) if you are using them in your Watch app. 如果您在Watch应用程序中使用它们,请添加所需的附加组件(如Keychain)。

All in all you will need six PPs, 3 for development, 3 for archiving/store. 总而言之,您将需要6个PP,3个用于开发,3个用于存档/存储。 With Xcode 6.3 team provisioning for development stopped working (for me) 使用Xcode 6.3开发团队配置停止工作(对我来说)

Next goto Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ..., CTRL+Click one of the Profiles and open in Finder. 接下来转到Xcode>首选项>帐户> YOUR_ACCOUNT>查看详细信息...,CTRL +单击其中一个配置文件并在Finder中打开。 Move all Profiles to Trash, then refresh the Profiles. 将所有配置文件移至“废纸篓”,然后刷新“配置文件”。

In your targets make sure you have the correct Team set for your main App target, the Watchkit extension target and the Watchkit App target, also make sure you have the right Provisioning Profiles assigned to main App target and the Watchkit extension target (Watchkit app Provisioning Profile can not be set but will be assigned automatically Edit: With Xcode 6.3 it can has to be set). 在您的目标中,确保为主App云目标,Watchkit扩展目标和Watchkit App目标设置了正确的Team集,同时确保为主App角色目标和Watchkit扩展目标分配了正确的Provisioning Profiles(Watchkit app provisioning)配置文件无法设置但会自动分配编辑:使用Xcode 6.3时必须设置)。

To be sure all is fine clean build folder: In Xcode hold command and do Product > Clean build folders ... 为了确保所有都是很好的干净构建文件夹:在Xcode hold命令中,做产品>清理构建文件夹...

Now you are ready to archive. 现在您已准备好存档。

For the Apple watch, you have to create following on apple account: 对于Apple手表,您必须在Apple帐户上创建以下内容:

  • App ID (For watch and watch extension both) 应用程序ID (适用于手表和手表扩展)
  • Provisioning profile (for the watch and watch extension both) 配置文件 (用于手表和手表扩展)

在此输入图像描述

Note: You don't need to do any change on iTunes connect. 注意:您无需在iTunes连接上进行任何更改。 If you will upload application with Apple watch then it will automatically appear on iTunes. 如果您使用Apple手表上传应用程序,它将自动显示在iTunes上。

You have to create AppIDs and provisioning profiles for the watch extension and the watch app and configure them in their respective targets. 您必须为手表扩展程序和监视应用程序创建AppID和配置文件,并在各自的目标中进行配置。

The Apple documentation says that if you add a new WatchKit target to your project Xcode will automatically set up the AppIDs for you, based on your app's bundle ID. Apple文档说 ,如果您向项目添加新的WatchKit目标,Xcode将根据您应用的捆绑ID自动为您设置AppID。 Thanks, Xcode! 谢谢,Xcode!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM