xcode 如何在 iOS 设备上测试 Cordova/ionic 应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29414805/
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 test Cordova/ionic app on iOS device?
提问by kramer65
I'm building an app which now runs fine in the iOS emulator, so I now want to test the app on an iOS device. I registered with the Apple Developer Program and ran ionic run ios
, which ended with the following message:
我正在构建一个现在可以在 iOS 模拟器中正常运行的应用程序,所以我现在想在 iOS 设备上测试该应用程序。我注册了 Apple Developer Program 并运行了ionic run ios
,它以以下消息结束:
Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.2'
代码签名错误:未找到配置文件:未找到未过期的配置文件。CodeSign 错误:SDK“iOS 8.2”中的产品类型“应用程序”需要代码签名
So I opened XCode and went to Preferences > Accounts
and added my Apple ID. I then clicked View Details...
and then the refresh icon so it fetched two Signing Identities. The box below which should display the Provisioning Profiles is empty though:
所以我打开了 XCode 并Preferences > Accounts
添加了我的 Apple ID。然后我点击View Details...
然后刷新图标,所以它获取了两个签名身份。但是,下面应显示配置文件的框是空的:
I then read this article on the Apple Developer sitewhich explains that I need to:
然后我在 Apple Developer 网站上阅读了这篇文章,其中解释了我需要:
- Set a bundle ID
- Assign my app to a team
- Create the Team Provisioning Profile
- 设置捆绑 ID
- 将我的应用分配给团队
- 创建团队供应配置文件
The bundle ID should supposedly be set in XCode. Because I am under the assumption that the bundle ID is set in my ionic config.xml
file I'm unsure of how to proceed though.
捆绑 ID 应该在 XCode 中设置。因为我假设捆绑 ID 是在我的 ionicconfig.xml
文件中设置的,所以我不确定如何继续。
Does anybody know how I can (preferably very easily) test my app on iOS devices? All tips are welcome!
有谁知道我如何(最好很容易地)在 iOS 设备上测试我的应用程序?欢迎所有提示!
回答by Gabriela Macias
What I did was to create a new project into Xcode, as soon it is created is showing the General tab, under Identity is showing a message saying that can not find the proper certified, something like that, and there is a button "Fix..." just click it, the passport is requested and you are done. I just try again and works. Xcode fixed my provisioning profiles sync for me.
我所做的是在 Xcode 中创建一个新项目,一旦创建它就会显示“常规”选项卡,在“身份”下显示一条消息,说找不到合适的认证,类似的东西,还有一个按钮“修复。 ..”只需点击它,护照就会被要求,你就完成了。我只是再试一次并起作用。Xcode 为我修复了我的配置文件同步问题。
回答by Ram
Try this
尝试这个
- Select Preferences from Xcode
- Go to accounts and select agent name
- Select view details to check status of your profiles
- Select any profile and click refresh on corner below to update profiles.
This should update your profile with expiration dates
- 从 Xcode 中选择首选项
- 转到帐户并选择代理名称
- 选择查看详细信息以检查您的个人资料状态
- 选择任何配置文件,然后单击下方角落的刷新以更新配置文件。这应该使用到期日期更新您的个人资料
回答by Mohammad Nurdin
Go to project General
and downgrade to 8.1
.
转到project General
并降级到8.1
.