Submitted Apps Now Require 3.0 Methods Only? Poll Device For It's OS?

Discussion in 'iOS Programming' started by Darkroom, Jul 2, 2009.

  1. Darkroom Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #1
    does apple require applications submitted now (after 3.0) to conform only to 3.0 SDK?

    i realized that my willAnimateRotationToInterfaceOrientation:duration was not recognized in OS 2.2.1, so i "downgraded" to the previous willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration. when running, this message appears in the console

    Code:
    Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations.
    
    could i perhaps somehow poll the device for it's OS and use the method which is more appropriate? if so, how could i do that?
     
  2. boyplunder macrumors regular

    boyplunder

    Joined:
    Sep 8, 2008
    Location:
    UK
    #2
    Apple have stated they will only be testing in 3.0, but that obviously means any 2 code needs to run in 3.0. This was note a month or so ago.

    As far as I'm aware, it doesn't mean everything needs to be 3.0 standard. People are still uploading apps compiled in 2.2.1, they just need to make sure that it works in 3.0. That's why all of the latest updates have started saying 'Tested in version 3' or whatever.

    Apart from a few specific API details, I think it's all backward compatible anyway.
     
  3. boyplunder macrumors regular

    boyplunder

    Joined:
    Sep 8, 2008
    Location:
    UK
    #3
    Actually, your second point is more interesting to me. 'Can you poll the device for the OS version?'

    I have an app in progress that does this really odd thing about loading the NIB on a details view in a different way depending on the OS. In 2.2.1 the NIB loads partly under the navbar, but sits directly below it in 3.0. This has been driving me mad for days. If I could conditionally check the OS version, I could load a different NIB.

    3.0 doesn't allow anything to sit under the bar, even if the bar is set to transparent, but it does in 2.2.1.

    My current solution is to average the position of the text field and will move to 3.0 only in a month or so.
     
  4. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #4
    Code:
    [[UIDevice currentDevice] systemVersion] 
    Might be of interest to you....
     
  5. Darkroom thread starter Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #5
    yes i found this, but unfortunately it doesn't seem to be useful in my case, since the device automatically calls method names used for changing orientation. i though that just by simply including the two:

    1. willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration

    2. willAnimateRotationToInterfaceOrientation:duration


    that the device would automatically call the most appropriate method depending on it's OS. if OS 3.0 was present, the device would first find willRotateToInterfaceOrientation, and ignore willAnimateFirstHalfOfRotationFromInterfaceOrientation:duration and/or willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration. including NSLogs in these methods revealed that both are called during run time when the device orientation switches.

    my last idea was to call willAnimateFirstHalfOfRotationFromInterfaceOrientation:duration like this:

    Code:
    - (void)willAnimateFirstHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration
    {
    float systemVersion = [[UIDevice currentDevice] systemVersion];
    
    if (float >= 3.0)
    {
    //call willAnimateRotationToInterfaceOrientation:duration
    }
    else
    {
    //call willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration
    }
    }
    
    this also failed, as both methods were called during runtime.
     

Share This Page