Q
推送通知IOS
2
A
回答
7
如果沒有收到消息時,它不會打開的應用程序。
您的應用程序WIL得到,如果用戶選擇查看通知啓動。 因此,如果用戶不響應通知,您的應用程序將不會啓動。
如果您的應用程序已經在運行,並在前臺比應用程序的委託將直接收到通知。
2
1
時通報白羊座那個時候你打開你可以使用下面的代碼的應用程序。
- (void)applicationDidEnterBackground:(UIApplication *)application
{
UILocalNotification *localNotification = [[[UILocalNotification alloc] init] autorelease];
// Current date
NSDate *date = [NSDate date];
// Add one second to the current time
NSDate *dateToFire = [date dateByAddingTimeInterval:1];
// Set the fire date/time
[localNotification setFireDate:dateToFire];
[localNotification setTimeZone:[NSTimeZone defaultTimeZone]];
// Setup alert notification
[localNotification setAlertBody:@"Tap to return to TestApp" ];
[localNotification setAlertAction:@"Open TestApp"];
[localNotification setHasAction:YES];
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
}
而且關於這件事你can use Refer the Reference.
願此代碼有助於你更多的信息。
3
是如果單擊「查看」按鈕,應用程序將調用委託方法,將推出。 如果點擊「關閉」按鈕,它會放棄通知。
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
}
欲瞭解更多信息http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12和http://mobiforge.com/developing/story/programming-apple-push-notification-services
1
是,當您收到推送 - 它顯示爲上出現在頂部屏幕上的警告(你可以選擇設置的方式)的消息,這將在幾秒鐘後消失。如果你點擊推送通知 - 它會打開應用程序。但是,當您收到推送時,應用程序將不會在接收推送時自動打開。只有在用戶點擊推送後。
相關問題
- 1. 推送通知IOS
- 2. iOS推送通知 -
- 3. iOs推送通知
- 4. IOS本地推送通知
- 5. iOS推送通知顯示
- 6. iOS推送通知政策
- 7. iOS推送通知didFailToRegisterForRemoteNotificationsWithError
- 8. 通知iOs推送交付?
- 9. Slient推送通知iOS中
- 10. 的iOS推送通知
- 11. 推送通知iOS重置
- 12. IOS推送通知 - GCDAsyncSocket
- 13. Carriot推送通知到iOS
- 14. 靜音推送通知。 iOS
- 15. iOS VoIP推送通知(PushKit)
- 16. 在ios中推送通知
- 17. Django推送通知到IOS
- 18. iOS推送通知與SNS
- 19. Unity3d:Android和iOS推送通知
- 20. 解析推送通知iOS
- 21. iOS 10/9推送通知
- 22. Flex和iOS推送通知
- 23. IOS推送通知錯誤
- 24. iOS創建推送通知
- 25. 分配iOS推送通知
- 26. SignalR IOS推送通知
- 27. iOS攔截推送通知
- 28. IOS推送通知錯誤
- 29. iOS推送通知消息
- 30. iOS的Ionic推送通知
這是正確的答案。通知不會處理應用程序管理,就像打開它們一樣。 – Yorxxx 2012-02-21 11:50:30