简体   繁体   中英

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.

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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