最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[已解决]Swift中提醒用户是否授权发送通知消息时app名字为(null)

Swift crifan 2817浏览 0评论

[已解决]swift实现app的消息通知显示到桌面

之后,遇到

提示要获取通知权限时,显示的是: (null)

而不是app的名字

猜测可能是通过category去设置的。

搜:

swift local notification null want to get access

iOS local notification

cocoa touch – Ask for User Permission to Receive UILocalNotifications in iOS 8 – Stack Overflow

TheCodeNinja — Notifications in iOS 8 Part 1 (Using Swift) – What…

iOS Programming Tutorial: Adding Local Notification to iPhone App

搜:

swift (null) would like to send your notifications

ios – "(null)" Would like to send you notifications with iOS9 / XCode 7 – Stack Overflow

设置为:

$(PRODUCT_NAME)

再去运行试试:

先去删除程序:

再去重新用Xcode调试:

就可以正常显示:

“JianDao” 想给您发送推送通知

了。

转载请注明:在路上 » [已解决]Swift中提醒用户是否授权发送通知消息时app名字为(null)

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
91 queries in 0.172 seconds, using 22.08MB memory