配备 iOS 3.2 的 iPad 与 iPhone iOS 3.0 兼容

发布于 11-28 04:49 字数 1009 浏览 7 评论 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

疾风者2024-12-05 04:49:23

我认为你不应该在编译时对它进行硬编码。相反,您应该测试特定类或类上的方法/属性是否存在,然后执行适当的操作。就像使用 [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.

不忘初心2024-12-05 04:49:23

好吧,首先你使用Mac桌面还是MacBook来编译并不重要。看来您可能混淆了“最低 iOS”值和“基本 SDK”。

基础 SDK:指编译器将用来检查您的代码的代码库,但不能确定您的应用程序实际运行在哪个操作系统上。您可以拥有 5.0 的基础 SDK,并且您的应用程序仍然可以在 3.0 系统上正常运行。问题是,如果您使用的代码与 Base SDK 兼容而不是较旧的操作系统,则编译器将无法捕获它。

最低操作系统:该值决定了您的应用程序将在哪个操作系统上运行。

如果您使用的是较高操作系统的代码,但想在较低操作系统上运行,则需要在代码中测试您正在运行的操作系统,然后运行适合该平台的代码。

Okay, first of all it does not matter if you use the Mac desktop or the MacBook to compile. It looks like you may be confusing the "minimum iOS" value and the "base SDK".

Base SDK: Refers to the code library that the complier will use to check your code, but does not determine which OS's your app will actually run on. You can have a base SDK of 5.0 and your app may still work fine on a 3.0 system. The catch is that if you are using code that is compatable with your Base SDK and not older OS's, the compiler will not catch it.

Minimum OS: This value does determine which OS's your app will run on.

If you are using code for higher OS's but want to run on lower OS's you need to test in the code for which OS you are running on and then run the appropriate code for that platform.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文