The 'Apple Push Notification' feature is only available to users enrolled in Apple Developer Program

问题描述

近日,把公司的项目拖到自己电脑上面运行,由于登陆的是自己appleID是免费开发者,所以运行的时候报错,如下图:

The 'Apple Push Notification' feature is only available to users enrolled in Apple Developer Program_第1张图片
error.png

问题分析

因为公司项目中用到了消息推送,而免费真机调试不能进行消息推送,所以自动配置证书的时候会报错,笔者 google 之后找到了解决方法.

解决方法

1.右键打开 xxx.xcodeproj 文件选择显示包内容:

The 'Apple Push Notification' feature is only available to users enrolled in Apple Developer Program_第2张图片
step1.png

2.用文本编辑器打开project.pbxproj文件:

The 'Apple Push Notification' feature is only available to users enrolled in Apple Developer Program_第3张图片
step2.png

3.将下面的代码中enabled = 1 修改为 enabled = 0:

com.apple.Push = {
                                enabled = 1;
                            };

链接

Xcode free provisioning: The 'Apple Push Notification' feature is only available to users enrolled in Apple Developer Program

你可能感兴趣的:(The 'Apple Push Notification' feature is only available to users enrolled in Apple Developer Program)