is there any way to detect device with xcode ? i mea开发者_如何学运维n when my app runs on the iphone 3g , show an alert an says this feature works only 3gs thank you .
Don't detect by device, but by feature.
For example, if you require the compass, add the magnetometer
value into the UIRequiredDeviceCapabilities
array of the Info.plist
(and the AppStore will filter the app for iPhone 3G.)
See http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedFeatures/AdvancedFeatures.html for detail.
精彩评论