当我的应用程序打开并且收到推送通知时,警报会被禁用但是当应用程序关闭时显示警报
OneSignal.initWithLaunchOptions(launchOptions,
appId: "appid",
handleNotificationReceived:{ (notification) in
let payload: OSNotificationPayload? = notification?.payload
let fullMessage: String? = payload?.body
print("Recived no" + fullMessage!)
print("Received Notification - \(notification?.payload.notificationID) - \(notification?.payload.title)")
},
handleNotificationAction: nil,
settings: [
kOSSettingsKeyAutoPrompt : false,
kOSSettingsKeyInAppAlerts : false
]
)