顯示具有 ios 5 標籤的文章。 顯示所有文章
顯示具有 ios 5 標籤的文章。 顯示所有文章

2011年11月14日

iOS 5 data storage的改變


由於iOS 5加入了iCloud的備份機制,資料儲存的規則多了一些規範
以下整理一下新的政策:
1.          Critical Data:只有user自行加入、或無法重新取得的檔案可以放在/Document底下,會被iTunesiCloud備份
2.          Cached Data:可重新產生、下載的檔案,如書籍、音樂要放在/Library/Caches,不會被備份,low storage situations時會被清除
3.          Temporary Data:暫存檔放在/tmp,不會被備份,系統可能會清,官方建議不用就清除
4.          Offline Data5.0.1新增”do not back up”的屬性,讓檔案即使放在/Document也不會被備份,且low storage situations時不會被清除,但也是建議不用就清除

此外QA1719中還提到了Offline Data:不可重新產生但會影響使用者體驗的檔案可擺在Private Documents或/Document,但如果把檔案擺在/Document則需設定好”do not back up”的屬性,否則會被reject(目前有聽過這樣的案例)

1719中也提到設定”do not back up”的方法

另可參考QA1699 Storing Private Data
過幾天再來整理一下可用的資料夾

2011年8月23日

兩個目前遇過的iOS 5 SDK crash bug

紀錄一下兩個升級iOS 5 SDK後遇到的error:


1. iOS 5好像還不太支援UIActivityIndicatorView
錯誤訊息:-[UIImage initWithCoder:]: unrecognized selector sent to instance 0xc974760
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage initWithCoder:]: unrecognized selector sent to instance 0xc974760'
參考自:http://stackoverflow.com/questions/7023430/uiimageview-initwithcoder-unrecognized-selector-sent-to-instance-ios-5-beta
解決方法:只好先把indicator移掉,或者用4.3 SDK跑就沒事

2.  一些專案不能用4.3 simulator跑
錯誤訊息:dyld: Library not loaded: /usr/lib/libc++abi.dylib ............. Reason: image not found
解決方法:先用5.0 simulator跑

debug了半天才知道是iOS 5的問題,目前還沒看到解法,看來只能等官方修正了
真的有案子要交的還是要準備兩套SDK阿阿阿

2011年8月16日

iOS 5關閉特定檔案的ARC

這篇文章參考以下影片完成:IOS5 -- How To Turn Off ARC On Individual Files
從iOS 4到iOS 5首先要面對的就是新增的automatic reference counting(第一次開專案看到release被deprecate有嚇到:P)
iOS 5新專案有ARC,但舊的code卻沒有,筆記一下關閉特定檔案ARC的作法:以(Xcode 4為例)
點選專案檔,選target,在Build Phase中找到compile source