升级到Xcode 7 之后发现了不少得小问题 ,
看了官方的提示之后,解决了暂时遇到的一些小问题
下面是其中的一个问题,做推送的时候会报出如下错误
You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to
add "remote-notification" to the list of your
supported UIBackgroundModes in your Info.plist.
意思是在infoplist 文件中缺少对推送的 配置
下面是解决方法:
在工程的 infoplist 文件中 按图 添加如下:
需要用到的代码 : Required background modes App downloads content in response to push notifications
或者
之间右键 infoplist文件 showInFinder
右键选择大开方式
用文本编辑工具打开
在最下面的</dict>上面添加代码
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
如下添加
关闭,编辑
之后便OK了