![](/img/trans.png)
[英]How to get Push-Notification on iOS working with Firebase and Flutter?
[英]Stop only firebase push-notification vibration
在目標c中的app處於地面時,如何停止Firebase推送通知振動?
你可以試試
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{
if([[UIApplication sharedApplication] applicationState] == UIApplicationStateActive ) {
completionHandler(UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
else {
completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.