我先說明我做的事情。
主要就是我有寫一個背景推播,也就是當APP沒有開啟時,仍然會做推播動作。
但是推播到達時,會啟動背景播放音樂的程序。
然而照APPLE的回應似乎這樣的程序不被允許?
以下是APPLE回應的內容:
Reasons
2.16: Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.
Thank you for your providing the information regarding your app. After further review of the app we found the following:
2.16
We found that your app uses a background mode but does not include functionality that requires that mode to run persistently. This behavior is not in compliance with the App Store Review Guidelines.
We noticed your app declares support for audio in the UIBackgroundModes key in your Info.plist, but did not include features that require persistent audio.
As indicated in the iOS Application Programming Guide:
"This key is intended for use by applications that provide audible content to the user while in the background, such as music-player or streaming-audio applications."
Therefore, it would be appropriate to provide audible content to the user while the app is in the background or remove the "audio" setting from the UIBackgroundModes key.
For discrete code-level questions, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
If you have difficulty reproducing a reported issue, please try testing the workflow as described in https://developer.apple.com/library/ios/qa/qa1764/Technical Q&A QA1764: How to reproduce a crash or bug that only App Review or users are seeing.
請問有經驗的大大這是什麼樣的狀況,以及這狀況該如何做比較不會有問題?
基本上apple對背景執行這個東東是不允許的,即使他的條件有寫哪些情況下可以,但就行動裝置的策略來說app的審覈非常嚴格。
如果你是用apns的話,那其實跟你的app沒啥關係,apns有達到你要的結果的話,建議你還是避掉背景執行這件事比較好
我想apple是說
如果你要一直跑個東西
那個東西必須在app裡執行
不然使用者要關掉app還關不掉你的程式
背景服務只能暫時使用來達到某個功能
不能一直被佔用
要一直跑必須在app裡