简体   繁体   English

具有iOS 3.2的iPad与iPhone iOS 3.0的兼容性

[英]iPad with iOS 3.2 compatibility with iPhone iOS 3.0

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. 最近已成功将iPhone和iPod Touch应用程序提交到应用商店,但后来知道该应用程序无法在iPad 3.2上运行,但可以在比例较高的iOS(如4)上运行。

Reason : setOrientation property of Movie player. 原因 :电影播放器​​的setOrientation属性。

Actual Query : In order to make it work on iPad 3.2 in MAC Desktop I used 实际查询 :为了使其在Mac桌面上的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];
}

when i run the same code on my MAC BOOK with iOS 3.0 this code is throwing the error...not supported. 当我在iOS 3.0的MAC BOOK上运行相同的代码时,此代码引发错误...不支持。

So 所以

  • If i build the above code on MAC DESKTOP(with iOS 4) will that work on iPhone device with iOS 3.0 ? 如果我在MAC DESKTOP(带有iOS 4)上构建以上代码,那么该代码将在带有iOS 3.0的iPhone设备上运行吗? ..in reference to Event Kit Frame Work(which throws error in iOS 3.0..but required in iOS 4). ..以引用事件工具包框架(在iOS 3.0中引发错误,但在iOS 4中为必需)。

  • I need to go for separate iPad app instead of Universal? 我需要使用单独的iPad应用而不是通用吗?

  • Is there any difference in iPhone with iOS 3.2 and iPad with iOS 3.2 in terms of properties used? 就使用的属性而言,带有iOS 3.2的iPhone和带有iOS 3.2的iPad有什么区别?

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. 就像使用[NSObject responsestoSelector:]来测试您的对象是否理解特定方法。

Okay, first of all it does not matter if you use the Mac desktop or the MacBook to compile. 好的,首先,使用Mac桌面还是MacBook进行编译都没有关系。 It looks like you may be confusing the "minimum iOS" value and the "base SDK". 看来您可能会混淆“最低iOS”值和“基本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. 基本SDK:指编译器将用来检查您的代码的代码库,但不能确定您的应用实际在哪个操作系统上运行。 You can have a base SDK of 5.0 and your app may still work fine on a 3.0 system. 您可以拥有5.0的基本SDK,并且您的应用在3.0系统上仍可以正常运行。 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. 要注意的是,如果您使用的是与您的基本SDK兼容的代码,而不是与旧版OS兼容的代码,则编译器将不会捕获它。

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. 如果您将代码用于更高版本的操作系统,但要在更低版本的操作系统上运行,则需要对正在运行哪个操作系统的代码进行测试,然后针对该平台运行适当的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM