开发者

iPhone Apps running on iPod Touch

If I create an App for the iPhone (OS 3) will it run without modification on an iPod Touch or will I need to create a separate binary? If it is the same runtime, does it just have stubs for the iPhone only features or do you have to check feature by feature using UIDevice to ensure the particular class/method is supported on the device to avoid a crash?

Sorry for the elementary questions, can't find a simple explanation of this anywhere.

Cheers

开发者_运维知识库

Dave

EDITED: Based on discussions below:

How can you check if a device supports making calls? At the moment I am assuming if it is an iPod Touch it can't. Is there a way of finding out what shared applications/URL schemes are supported by a device?


You shouldn't really try to guess what the device is. You're far more future-proof if you test for the specific functionality you're trying to use. After all, in the future there might be iPods with cameras. Or compasses (which are on some iPhones but not others).

Since it sounds like all you want to do is see if you can open a URL, why not use -[UIApplication canOpenURL:] ? (This would presumably work on iPod touches that had applications that could handle VOIP -- I don't know if any such exist, but I think it's an example of why you need to test for functionality and not make assumptions based on hardware or OS version.)


The app will run on an iPod touch, no need to compile a separate version. Features that require an iPhone (e.g. camera) will not work, obviously.

What such features do you intend to use? You may provide alternatives for iPod users or alert them that e.g. no camera is available.

This question adresses how to check if a microphone is present: Detecting iPhone iPod touch accessories

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜