Xcode 4的Architectures設定預設只有armv7,也就是新的iOS裝置,包括iPhone
3GS、iPhone 4、iPhone 4s、iPad、iPad 2等,而iPhone、iPhone 3G、iPod Touch、iPod Touch 2屬於armv6架構。
一、使相容armv6和armv7的步驟如下:
PROJECT -> Info -> iOS Deployment Target選擇3.0
PROJECT -> Build Settings -> Architectures刪除原Standard (armv7),+一個armv6,再+一個armv7,右擊Architectures行儲存退出(以下儲存退出方式相同)
PROJECT -> Build Settings -> Base SDK保留Latest iOS (iOS 5.1)不變
PROJECT -> Build Settings -> Build Active Architecture Only保留No不變
PROJECT中其它如所示
TARGETS -> Summary -> Deployment Target選擇3.0
TARGETS
-> Info -> 刪除Required device capabilities行
TARGETS
-> Build Settings -> Architectures刪除原Standard (armv7),+一個armv6,再+一個armv7(同PROJECT)
TARGETS -> Build Settings -> Base SDK保留Latest iOS
(iOS 5.1)不變
TARGETS -> Build Settings -> Build Active Architecture
Only保留No不變
TARGETS中其它如所示
二、使相容iPhone和iPad,只需
TARGETS -> Summary -> Devices選擇Universal即可
然後在
TARGETS -> Summary -> iPhone / iPad Deployment Info中設定對應的選項
三、添加Ad Hoc Distribution和Distribution選項
PROJECT -> Info -> Configurations中點+號添加即可
然後就可以在
PROJECT ->Build Settings -> Code Signing Identity
和
TARGETS
->Build Settings -> Code Signing Identity
中選擇對應的發布版本的簽名了