views:

1389

answers:

2

I created an app that was rejected because Apple say that my App was not showing the correct iPad window and it was showing the same iPhone screen but top left aligned.

Running on simulator, I get my App to show exactly what it should, a big iPad View.

my app as Apple referees that is showing on device:

alt text

my app running the simulator (50% zoom only):

alt text

my code in the Application Delegate is the one I published before

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    // The default have the line below, let us comment it
    //MainViewController *aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil];

    // Our main controller
    MainViewController *aController = nil;

    // Is this OS 3.2.0+ ?
    #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200

    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
            // It's an iPad, let's set the MainView to our MainView-iPad
        aController = [[MainViewController alloc] 
                              initWithNibName:@"MainView-iPad" bundle:nil];
    else 
            // This is a 3.2.0+ but not an iPad (for future, when iPhone/iPod Touch runs with same OS than iPad)
        aController = [[MainViewController alloc] 
                              initWithNibName:@"MainView" bundle:nil];

    #else
        // It's an iPhone/iPod Touch (OS < 3.2.0)
        aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil];
    #endif

    // Let's continue our default code 
    self.mainViewController = aController;
    [aController release];

    mainViewController.view.frame = [UIScreen mainScreen].applicationFrame;
    [window addSubview:[mainViewController view]];
    [window makeKeyAndVisible];

    return YES;
}

on my target info I have iPhone/iPad

alt text

My question is, how should I build the app?

  • Use Base SDK
  • iPhone Simulator 3.1.3
  • iPhone Simulator 3.2

my Active Configuration is Distribution and Active Architecture is arm6

Can anyone that already published app into iTunes Connect explain me the settings?

P.S. I followed the Developer Guideline on Building and Installing your Development Application that is found on Creating and Downloading Development Provisioning Profiles but does not say anything regarding this, as I did exactly and the app was rejected.

+2  A: 

it turns out that, after sending the project to Apple Support they reply saying that could be a mistake, that I should recompile and send it again.

Done that, and got my App aproved.

But I can just tell here, how you should compile your app to the AppStore (Apple Review Team) from the email I got from Apple Developer Technical Support


Follow these steps to build a universal application that will run on both iPad and iPhone:

  • Set the Base SDK build setting (in the Architectures section) to iPhone SDK 3.2.
  • Set the iPhone OS Deployment Target build setting to iPhone OS 3.1.3 or earlier.
  • Set the Targeted Device Family build option to iPhone/iPad.
  • Make sure that your Architectures build setting uses both armv6 and armv7.
  • Set the Active SDK to iPhone Device 3.2, select your Distribution configuration, build (select the Build button) your application, and submit it for App review.

I hope this helps someone as it helped me :)


Added (specify the Icons for both apps)

alt text

As you can see for the image above, just add a new property called CFBundleIconFiles and add the 2 icons, the Array (0) is for iPhone Icon, the Array(1) is for iPad icon.

Remember to leave the default Icon file property to the iPhone for back compatibility with old versions of the OS.

remember to specify the correct sizes for both apps:

  • iPhone icon: 57 x 57 pixels
  • iPad icon: 72 x 72 pixels
balexandre
What did you do for the icons for iphone and ipad?
John JJ Curtis
you just edit the pList... I will add this in the answer as well, give me 5 minutes
balexandre
thanks, great tips!
William Denniss
@William, great that helped you :)
balexandre
A: 

Hi there,

I followed your instructions and I have now 113 errors in compilation.

Before I was compiling: BASE SDK 3.1.3, device: iphone, architecture arm6, and my app was runnging fine (developer provisioning) on both the devices.

Afraid of being rejected I followed at literam your indication on how to set the values in the project, but is a NO-NO.

Any other out there had this problems ?

Update: At the end, I could compile following your (Apple) indications, but I had to change the Active SDK - Distribution from 3.2 to 3.1.3

All the rest is as you stated. Perhaps this note may help someone...

Bamboozled