2010-07-19 47 views
1

我試着從3.0我的iPhone應用程序升級到4.0構建iPhone應用程序在多個設備和版本

一些API被棄用在4.0,如果我使用新的API,它可能無法在3.0的工作權利?因此,我需要一箇舊的API和新的API

爲所有專業開發人員編寫3.0和4.0的最佳方式是什麼?

我知道我可以從UIDevice檢查model和systemVersion。

我需要先檢查哪個版本,並檢查哪個設備?

if systemVersion == 3.0 { 
//old api code here 
} 

if systemVersion == 4.0 { 

if device == iphone 3G 
//new api code here for 3G 

if device == iphone 3GS 
//new api code here for 3GS 

if device == iphone 4 
//new api code here for 4 
} 

回答

1

this article由馬特·加拉格爾,也如果你是一個iPhone開發檢查WWDC videos session,還有就是談這個至少一個會話。

+0

謝謝你,這真的很有幫助。 – svveet 2010-08-14 11:55:03

相關問題