ios 如何将 phonegap 应用程序部署到 ipad/iphone
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6632350/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to deploy phonegap app to ipad/iphone
提问by John
I am totally new to making ipad/iphone application. I am totally new to using phonegap. I downloaded a HelloWorld application and opened it up with xcode. it works fine in simulator. So i tried to deploy it to my iPad. When I hit Build and Run in xcode, i get this error:
我对制作 ipad/iphone 应用程序完全陌生。我对使用 phonegap 完全陌生。我下载了一个 HelloWorld 应用程序并用 xcode 打开它。它在模拟器中运行良好。所以我试着把它部署到我的 iPad 上。当我在 xcode 中点击 Build and Run 时,出现此错误:
Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain.
I have no idea what this means. I applied for the Apple Developer program a few months ago. I got back an email saying I successfully enrolled. Do I need to copy some kind of certificate from my Apple Account on the website to my ipad to enable xcode to deploy my helloworld program to the ipad?
我不知道这是什么意思。几个月前,我申请了 Apple Developer 计划。我收到一封电子邮件,说我成功注册了。我是否需要从我在网站上的 Apple 帐户中复制某种证书到我的 ipad 才能让 xcode 将我的 helloworld 程序部署到 ipad?
I am totally confused on how to test the HelloWorld application on my iPad....
我完全不知道如何在我的 iPad 上测试 HelloWorld 应用程序......
Additional Notes
补充说明
OK, i followed some steps on how to sign a certificate and install it in xcode. Now when I try to Build and Run to a device, I get this error:
好的,我遵循了一些关于如何签署证书并将其安装在 xcode 中的步骤。现在,当我尝试构建并运行到设备时,出现此错误:
Code Sign error: Provisioning profile 'forgelink' specifies the Application Identifier 'forgelink' which doesn't match the current setting 'R8T3VN6VR7.forgelink.forgelink'
Code Sign error: Provisioning profile 'forgelink' specifies the Application Identifier 'forgelink' which doesn't match the current setting 'R8T3VN6VR7.forgelink.forgelink'
Did I type something wrong when creating my certificates, bundle identifiers, app ids etc...?
我在创建证书、捆绑标识符、应用程序 ID 等时输入了错误吗?
采纳答案by Satish
you need to get developer certificates (code signing certificates) from your apple developer site. log into developer.apple.com and follow the steps
您需要从您的苹果开发者站点获取开发者证书(代码签名证书)。登录 developer.apple.com 并按照步骤操作
Edit:
编辑:
Here's the link to iOS Provisioning portal http://developer.apple.com/ios/manage/overview/index.action
这是 iOS 配置门户的链接 http://developer.apple.com/ios/manage/overview/index.action
回答by John Zumbrum
To summarize, as I've just spent a whole day trying to deploy to iOS devices through xcode:
总而言之,因为我刚刚花了一整天的时间尝试通过 xcode 部署到 iOS 设备:
You must pay the $99 + $7 in tax, to join the Apple Developer Network and deploy to actual devices
You setup this association in XCode by signing in using you AppleID.
You must give the unique device ID to Apple, along with signing a request and downloading a cert in order to use any real devices. Just follow their tutorial exactly, especially the copying of the .mobileprovisioning file: Apple's Provisioning Tool (sigin with your apple ID if it doesn't work)
I created a provisioning profile for every apple device I hooked up to my computer, but maybe you can do it with one...
- Your device will now show up in the dropdown menu next to the play button in XCode. If not, the provisioning didn't complete successfully, and you need to go back and fix it.
您必须支付 99 美元 + 7 美元的税款,才能加入 Apple Developer Network 并部署到实际设备
您可以通过使用 AppleID 登录在 XCode 中设置此关联。
您必须将唯一的设备 ID 提供给 Apple,同时签署请求并下载证书才能使用任何真实设备。只需完全按照他们的教程进行操作,尤其是 .mobileprovisioning 文件的复制:Apple's Provisioning Tool(如果不起作用,请使用您的 Apple ID 签名)
我为连接到计算机的每台苹果设备创建了一个配置文件,但也许你可以用一个...
- 您的设备现在将显示在 XCode 播放按钮旁边的下拉菜单中。如果没有,则配置未成功完成,您需要返回并修复它。
回答by PengOne
You need to install a developer certificate and create a provisioning profile. The Dev Centerhas detailed instructions and links, and a nice portal for creating and downloading the profiles.
您需要安装开发人员证书并创建配置文件。该开发中心有详细的说明和链接,和一个不错的门户网站创建和下载配置文件。