jjzjj

registerForNotifications

全部标签

ios - 必须在应用启动周期调用 `registerUserNotificationSettings:` 吗?

docsforregisterUserNotificationSettings:状态:Ifyourappdisplaysalerts,playsounds,orbadgesitsicon,youmustcallthismethodduringyourlaunchcycletorequestpermissiontoalerttheuserintheseways.我很失望地读到这篇文章,因为应用程序在需要之前请求发送推送通知的许可似乎很粗鲁。例如,在我正在设计的应用程序中,用户必须在有任何理由发送推送通知之前使用我们的在线服务创建一个帐户。并且可能用户从未注册,只是在本地使用该应用程序,因