mac上的通知不会显示(Swift)

时间:2017-12-15 09:14:56

标签: swift macos notifications xcode9

我正在学习如何使用swift来制作mac app。我希望我的应用程序向用户显示本地推送通知,这是我的代码。

# MySQL Key for each developer for their local machine
dbIP       = 127.0.0.1
dbName     = myApplicationDB
dbUser     = scott
dbPassword = tiger

# MySQL Properties 
# To replace fixed-keys with corresponding build environment values. like « predev,testing,preprd.
config.db.driverClassName : com.mysql.jdbc.Driver
config.db.url             : jdbc:mysql://${dbIP}:3306/${dbName}
config.db.username        : ${dbUser}
config.db.password        : ${dbPassword}

# SystemProperties
userDir      = ${user.dir}
os.name      = ${os.name}
java.version = ${java.version}
java.specification.version = ${java.specification.version}

# If you want reference to be ignored and won't be replaced.
# $${${name}} must be used for output ${ Yash }.  EX: jdk = ${jre-1.8}
jdk = $${jre-${java.specification.version}}

它会在我的mac中的通知中心显示通知,但屏幕右上角没有弹出通知。 我已经检查了系统首选项,并且“请勿打扰”模式已经关闭。此外,我的Mac中的其他应用程序也可以显示通知,只有我的不能。我不知道我的代码中有什么问题

0 个答案:

没有答案
相关问题