iPhone客户端开发笔记(八)
?
客戶端穩(wěn)定性和提升用戶體驗(yàn)。
?
1,掌握app的運(yùn)行狀態(tài)
這是官方文檔中關(guān)于Application State的詳細(xì)描述:
https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html\
?
2,嘗試在后臺(tái)接收?qǐng)?bào)警信息的嘗試:后臺(tái)運(yùn)行。
這是官方文檔中關(guān)于后臺(tái)和多任務(wù)的詳細(xì)描述:
https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html
經(jīng)研究發(fā)現(xiàn)后臺(tái)運(yùn)行在iOS下限制很多,iOS只針對(duì)幾類功能提供了后臺(tái)執(zhí)行能力:播放音樂、GPS導(dǎo)航、跟外圍設(shè)備通信、藍(lán)牙通信等。所以不太適合我們這個(gè)應(yīng)用。
?
3,嘗試使用Push Notification接收?qǐng)?bào)警信息:
這是對(duì)Remote Push Notification機(jī)制的概述:
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html
要實(shí)現(xiàn)push notification,需要以下三部分知識(shí):
a,Scheduling, Registering, and Handling Notifications
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW1
b,Apple Push Notification Service
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9
c,Provisioning and Development
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ProvisioningDevelopment/ProvisioningDevelopment.html#//apple_ref/doc/uid/TP40008194-CH104-SW1
d,Provider Communication with Apple Push Notification Service
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW1
最終決定使用這種方式實(shí)現(xiàn)報(bào)警信息推送。
?
4,這是stackoverflow中關(guān)于如何實(shí)現(xiàn)Provider server的問答:
http://stackoverflow.com/questions/7791549/how-to-create-a-server-for-apns-for-iphone
?
That‘s all。
轉(zhuǎn)載于:https://www.cnblogs.com/tara/archive/2012/02/25/2368016.html
總結(jié)
以上是生活随笔為你收集整理的iPhone客户端开发笔记(八)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 试写函数显示当前具体时间:
- 下一篇: xml.modify() 实例演示(二)