0
A
回答
1
如果用戶點擊通知警報,您的應用程序會在後臺發送一個事件,並且現在正在後臺運行(甚至可能需要這意味着您的應用程序已被移到前臺)。
+0
有關於通知的WWDC 2016視頻,這些視頻已經針對iOS 10進行了大量修改。我會推薦觀看它們。 – matt
1
iOS中不存在與Android服務相當的功能。
推送有兩種類型,一種發送到應用程序,另一種發送給用戶。
If a push is sent to the user then:
- if your app is terminated, the push is displayed to the user
- if your app is in the background, the push is displayed to the user
- if your app is in the foreground, the push is delivered to the app.
If a push is sent to the app then:
- if your app is terminated, the push goes nowhere
- if your app is in the background, the push is sent to the app, and you *may* be able to perform some activity at that point, depending upon your background modes.
- if your app is in the foreground, the push is sent to the app.
(除此之外,在iOS的10,推壓導向用戶可以截獲和它們顯示給用戶之前,它們的內容發生變化。但是,他們不會被你的應用程序截獲,它們被截獲這是而不是這意味着你的應用程序可以運行在這一點。)
所以你的問題的答案是否定的,因爲服務不存在。如果您可以在發送應用程序推送時在後臺運行,那麼只有當應用程序未終止並且您具有某些後臺功能時纔會這樣做。 由於終止因素,因此它不是您可以依賴的機制。
相關問題
- 1. 後臺GCM通知IOS/php服務器
- 2. 是否可以通過服務在後臺啓動活動?
- 3. 啓動iOS中的位置感知後臺服務啓動
- 4. 後臺iOS通知
- 5. Visual Studio錯誤:「無法激活後臺任務,後臺任務激活失敗。」
- 6. 通知激活
- 7. 後臺服務通知不起作用
- 8. 從後臺服務啓動Android活動
- 9. ios後臺服務來計算距離並通知用戶
- 10. iOS後臺任務/推送通知
- 11. 提示用戶在後臺服務中激活gps?
- 12. 根據時間在後臺激活本地通知
- 13. 後臺服務android沒有通知
- 14. Cordova - 通知後臺運行服務
- 15. 停止通知中的後臺服務
- 16. iOS中的後臺服務,每小時通知
- 17. 通過通知激活Applescript
- 18. 如何以編程方式激活ios通知設置?
- 19. 活動,服務和通知
- 20. 如何在後臺啓動服務並從該服務啓動一項活動?
- 21. Red Foundry推iOS服務通知服務
- 22. 從後臺激活iOS應用的快速機制
- 23. 從活動調用後臺服務
- 24. iOS後臺服務(如在Android中)啓用所有時間
- 25. 帶通知的Android預定後臺/前臺服務
- 26. 啓用= false後激活回故障
- 27. 後臺通知
- 28. 無法激活WCF服務
- 29. iOS 7遠程通知後臺模式
- 30. 在後臺iOS推送通知
什麼是「後臺服務」? – matt
@matt他可能指的是在收到遠程通知時啓動的後臺任務。 –
例如,如果發送了推送通知,我的應用程序的一部分將啓動@ @AlejandroIván,正確 – Sauron