Search code examples
iosxcodexcode4cordova

Phonegap 1.2 + xcode 4 = EXC_BAD_ACCESS on keyboard input?


Im not a "high level" programmer. I do not understand all this stuff really which is why I'm using phonegap instead of native programming. I'm doing nothing special. The "page" loads, there is an input box, you click it, keyboard pops up. Letters seem to work OK but as soon as you push a # or back space the whole app crashes with EXC_BAD_ACCESS.

This is in a 4.3 emulator. I do not have a device handy to try.

All the searching I've done are people talking about memory management and what not. I'm not doing any of that, nor would I have idea on how to.

Anyone know why this is happening?

Here is the offending line:

int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");

Which is located insde Supporting Files > main.m > main()

^^-- I did not create that file. I'm not sure if phonegap created it or if it was created by xcode.


Solution

  • It turns out the problem WAS the fact that I was testing my code on a 4.3 SIMULATOR on an OSX LION virutal machine running on a win7 host.

    I brought my code in to work the next day, hopped on one of the macs, installed xcode and ran the identical code on the simulator AND my coworkers iphone and the problem did not show up, at all!