Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPad testing of PhoneGap application - issues in main method

So I was attempting to test a PhoneGap application I've been working on, and had some issues with the test on my iPad. I have the following as the main method for this application:

//
//  main.m
//  elog
//
//  Created by Ben Potter on 9/08/11.
//  Copyright Arden Anglican School 2011. All rights reserved.
//

#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
    [pool release];
    return retVal;
}

It all works fine until you close the app completely and then reopen it, upon which it freezes. And I have no idea why.

I am running ios5 on my ipad with XCode 4.2

Finally, these are the errors which come up, thanks for the help!

Main method errorsDirect link here

like image 875
Ben Potter Avatar asked Aug 10 '11 06:08

Ben Potter


1 Answers

Your application is using Automatic Reference Counting (which is new) and Phonegap doesn't support it yet. Go to your project's build settings and turn Automatic Reference Counting to off.

like image 195
dtuckernet Avatar answered Nov 11 '22 09:11

dtuckernet