0
votes

I am developing and testing my iphone app (phonegap + native) properly on iPhone simulator and device.

However, when testing on iPad simulator or device, I can only see a blank black screen and no errors on console.

Target family is properly set to iPhone and window makeKeyAndVisible also executed! How to solve it?

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

    UIViewController *introVC = [[videoViewController alloc] initWithNibName:@"videoViewController" bundle:nil];

    UIViewController *blogVC = [[blogViewController alloc] initWithNibName:@"blogViewController" bundle:nil];

    NSArray *viewControllers = [NSArray alloc];

    viewControllers = [NSArray arrayWithObjects: introVC, blogVC, nil];

    [rootController setViewControllers:viewControllers animated:NO];

    self.rootController.selectedIndex = 0;

    [window setRootViewController:self.rootController];
    [window makeKeyAndVisible];

    return YES;
}
1
Please post your phonegap code.Mayur Birari
Agree with Mayur. There isn't much info in your question to debug why you're seeing this behavior.Nick Roth
I edited and posted code on app didFinishLaunching. Please note that on iphone works properly so I don't know if this code will be useful. If more code is needed please suggest. Thank youJaume

1 Answers

0
votes

A black screen is pretty much always an error in the javascript. Assuming you are using iOS 6 you should be able to attach the desktop safari web inspector and look for any javascript errors, which will not show up in the Xcode console.

Another thing to test is that the app still works as a clean install on iPhone - updating an existing app only copies new and updated files, so errors caused by deletion such as renaming a script and leaving a reference to the old filename won't show up right away.