配备 iOS 3.2 的 iPad 与 iPhone iOS 3.0 兼容
最近成功向应用程序商店提交了 iPhone 和 iPod Touch 应用程序,但后来发现该应用程序无法在 iPad 3.2 上运行,但可以在具有高 iOS 的 iPad(例如缩放版本 4)上运行。
原因:电影播放器的setOrientation属性。
实际查询:为了使其在 MAC Desktop 中的 iPad 3.2 上工作,
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
player.view.frame = CGRectMake(0, 0, 768, 1024);
[self.view addSubview:player.view];
[player play];
}
else {
#ifdef __IPHONE_4_0
player.controlStyle = MPMovieControlStyleNone;
#else
[player setOrientation:UIDeviceOrientationPortrait animated:NO];
}
当我在装有 iOS 3.0 的 MAC BOOK 上运行相同的代码时,此代码抛出错误...不受支持。
所以
如果我在 MAC DESKTOP(使用 iOS 4)上构建上面的代码会起作用吗 在装有 iOS 3.0 的 iPhone 设备上? ..参考事件套件框架 工作(在 iOS 3.0 中抛出错误......但在 iOS 4 中需要)。
我需要使用单独的 iPad 应用程序而不是通用应用程序吗?
搭载 iOS 3.2 的 iPhone 和搭载 iOS 3.2 的 iPad 在以下方面有什么区别吗? 使用的属性?
Recently submitted iPhone and iPod Touch application to app store successfully, but later came to know that is not working on iPad 3.2 but works on iPad with high iOS like 4 in scaled version.
Reason: setOrientation property of Movie player.
Actual Query: In order to make it work on iPad 3.2 in MAC Desktop I used
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
player.view.frame = CGRectMake(0, 0, 768, 1024);
[self.view addSubview:player.view];
[player play];
}
else {
#ifdef __IPHONE_4_0
player.controlStyle = MPMovieControlStyleNone;
#else
[player setOrientation:UIDeviceOrientationPortrait animated:NO];
}
when i run the same code on my MAC BOOK with iOS 3.0 this code is throwing the error...not supported.
So
If i build the above code on MAC DESKTOP(with iOS 4) will that work
on iPhone device with iOS 3.0 ? ..in reference to Event Kit Frame
Work(which throws error in iOS 3.0..but required in iOS 4).I need to go for separate iPad app instead of Universal?
Is there any difference in iPhone with iOS 3.2 and iPad with iOS 3.2 in terms of
properties used?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(2)
好吧,首先你使用Mac桌面还是MacBook来编译并不重要。看来您可能混淆了“最低 iOS”值和“基本 SDK”。
基础 SDK:指编译器将用来检查您的代码的代码库,但不能确定您的应用程序实际运行在哪个操作系统上。您可以拥有 5.0 的基础 SDK,并且您的应用程序仍然可以在 3.0 系统上正常运行。问题是,如果您使用的代码与 Base SDK 兼容而不是较旧的操作系统,则编译器将无法捕获它。
最低操作系统:该值决定了您的应用程序将在哪个操作系统上运行。
如果您使用的是较高操作系统的代码,但想在较低操作系统上运行,则需要在代码中测试您正在运行的操作系统,然后运行适合该平台的代码。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我认为你不应该在编译时对它进行硬编码。相反,您应该测试特定类或类上的方法/属性是否存在,然后执行适当的操作。就像使用 [NSObject respondstoSelector:] 来测试你的对象是否理解特定的方法。
I don't think you should hardcode it like that at compile time. Instead you should test if a particular class or method/property on a class exists and then do the appropriate thing. Like using [NSObject respondstoSelector:] to test whether your object understands a particular method.