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
中选择对应的发布版本的签名了