NSUserNotificationCenter defaultUserNotificationCenter returns null in Qt application

后端 未结 1 1408
不思量自难忘°
不思量自难忘° 2021-01-21 20:41

I have a simple test Qt application which tries to send user notification on OS X:

void Mac::notify(QString title, QString message) {
  NSUserNotification *userN         


        
相关标签:
1条回答
  • 2021-01-21 21:05

    Finally I found the problem. My Info.plist file was missing CFBundleIdentifier. After I added it, application was able to register in Notification Center.

    <key>CFBundleIdentifier</key>
    <string>org.notifytestosx.app</string>
    
    0 讨论(0)
提交回复
热议问题