2017-06-22 82 views
1

我對IOS 10.工作推送通知當應用程序處於非活動狀態/關閉,並得到通知,我能夠與通過點擊應用程序圖標沒有點擊IOS通知獲取用戶信息PushNotification(負載)10

獲得用戶信息(通知有效載荷)
NSDictionary *info = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]; 

但是,如果我直接點擊應用程序圖標(不通知徽章),我無法找到通知有效載荷。將這一post並通過寫

didReceiveRemoteNotification:userInfo 
fetchCompletionHandler:^(UIBackgroundFetchResult handler) 
{ Logging userinfo with NSLog to verify, but I don't see any log entry} 

到文件,並在didFinishLaunchingWithOptions回讀試圖訪問,但沒有運氣。有沒有其他IOS方法可用於此用例?

+0

看到這適用於iOS 10 https://stackoverflow.com/questions/39382852/didreceiveremotenotification-not -called-IOS-10/39383027#39383027 –

回答

0

你不能得到推送通知用戶信息在這種情況下,必須將其存儲在服務器上,看到我的回答here

相關問題