在 iPod Touch 上运行的 iPhone 应用程序 [英] iPhone Apps running on iPod Touch

查看:37
本文介绍了在 iPod Touch 上运行的 iPhone 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我为 iPhone (OS 3) 创建一个应用程序,它会在 iPod Touch 上运行而无需修改,还是我需要创建一个单独的二进制文件?如果它是相同的运行时,它是否只有 iPhone 的存根功能,或者您是否必须使用 UIDevice 逐个检查功能以确保设备支持特定的类/方法以避免崩溃?

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.

干杯

戴夫

基于以下讨论:

如何检查设备是否支持拨打电话?目前我假设它是 iPod Touch,它不能.有没有办法找出设备支持哪些共享应用程序/URL 方案?

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?

推荐答案

你不应该真的去猜测设备是什么.如果您测试您尝试使用的特定功能,那么您将更加面向未来.毕竟,未来可能会有带摄像头的 iPod.或者指南针(某些 iPhone 上有,其他 iPhone 上没有).

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).

既然听起来您只想查看是否可以打开 URL,为什么不使用 -[UIApplication canOpenURL:] ?(这大概适用于具有可以处理 VOIP 的应用程序的 iPod touch——我不知道是否存在这样的应用程序,但我认为这是为什么您需要测试功能而不是基于硬件或操作系统做出假设的一个例子版本.)

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.)

这篇关于在 iPod Touch 上运行的 iPhone 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆