iOS个人证书真机调试及报错

本文介绍如何使用Xcode的个人账号进行真机调试,包括设置步骤与常见错误处理方法,特别关注于PushNotifications及In-AppPurchase功能的调试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


https://www.jianshu.com/p/f31116a76ea9

Xcode7发布之后,个人的账号也可以真机调试了,不是$99和$299的APPle ID也能

自动生成证书进行真机调试,下面详细说下自己在使用个人账号->自己的APPle ID

(即在APP Store上下载程序使用的邮箱账号和密码)进行真机调试步骤和调试过程中

遇到的报错。

1.在Xcode中登录APPle ID账号和密码。

2.打钩Authomatially manage signing,Team选择自己的名字的(Personal Team)。

3.Build Setting里面Provisioning Profile和Provisioning Profile(Deprecated) 改为Automatic,

Code Signing Identity改为iOS Developer,Development Team改为自己名字的(Personal Team)。


















此时会报错,报错信息如下。
Failed to create provisioning profile.
The app ID "mxl.XLPaymentHUDExample" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
No profiles for 'mxl.XLPaymentHUDExample' were found
Xcode couldn't find a provisioning profile matching 'mxl.XLPaymentHUDExample'.

这时解决办法是需要改Bundle Identifier去一个自己定义的名字。















4.将工程的Bundle Identifier改为自己定义的名字。

等待几秒钟之后会自动创建真机调试证书文件。此时运行程序,在程序跑起来之后,点击手机里面的通用->描述文件与设备管理->信任自己的证书。
这样程序就可以完美运行了。





















上面说的情况是此工程项目没有开启Push Notifications和In-App Purchase的情况下。

5.在项目开启Push Notifications或In-App Purchase的情况下,完成第1-4步之后仍然报错。


























The 'In-App Purchase' feature is only available to users enrolled in Apple Developer Program. Please visit 
https://developer.apple.com/programs/ to enroll.
No profiles for 'com.cloud888' were found
Xcode couldn't find a provisioning profile matching 'com.cloud888'.

此时需要关闭工程的In-App Purchase功能,若直接到Capabilities中关闭,将In-App Purchase置为OFF,事实上是没有效果的,
因为当前选的证书是自己的个人免费证书,是没有In-App Purchase功能的(在Capabilities中找不到这个选项),进而并不能真正关闭。


























需要将Automatically manager signing钩去掉,并将team选为公司的证书,$99的证书才能正常关闭。此时仍然报错。信息如下:

















































The 'Apple Push Notification' feature is only available to users enrolled in Apple Developer Program. Please visit 
https://developer.apple.com/programs/ to enroll.
No profiles for 'com.cloud888' were found
Xcode couldn't find a provisioning profile matching 'com.cloud888'.

此时需要关闭工程的Push Notifications功能。同理,若直接去Capabilities中关闭,将Push Notifications置为OFF,事实上是没有效果的,
因为当前选的证书是自己的个人免费证书,是没有Push Notifications推送功能(在Capabilities中找不到这个选项)的,进而并不能真正的关闭。
需要将Automatically manager signing钩去掉,并将team选为公司的证书,$99的证书才能正常关闭。











自动生成真机调试证书的过程可能会要几十秒,致此才能完美运行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值