I am tired of looking everywhere to find and answer. I'm new to phonegap and what I just did was creating a default project, building it and then opening with Xcode in order to emulate it.
It runs well, but after a moment throws an error (or exception don't know how it's called) and what it does is just showing the image but not the text and else.
Here is the error:
2014-12-12 20:34:39.339 Hello World[4441:609951] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/pas/Library/Developer/CoreSimulator/Devices/50XXXXX-BEA1-447C-A70E-98XXXXXXXXA/data/Containers/Data/Application/DFXXXXX-E46C-430D-9B57-9XXXXXXX441/Library/Cookies/Cookies.binarycookies
2014-12-12 20:34:39.606 Hello World[4441:609951] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x7ae1a170> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(
0 CoreFoundation 0x002ea946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x0243aa97 objc_exception_throw + 44
2 CoreFoundation 0x002ea561 -[NSException raise] + 17
3 Foundation 0x020c210e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x0201e138 _NSSetUsingKeyValueSetter + 115
5 Foundation 0x0201e0bd -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x020539a6 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
7 UIKit 0x009d3649 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x02450724 -[NSObject performSelector:] + 62
9 CoreFoundation 0x002245dc -[NSArray makeObjectsPerformSelector:] + 316
10 UIKit 0x009d210a -[UINib instantiateWithOwner:options:] + 1775
11 UIKit 0x009d3fa9 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 180
12 UIKit 0x0069ce1b -[UIApplication _loadMainNibFileNamed:bundle:] + 58
13 UIKit 0x0069d134 -[UIApplication _loadMainInterfaceFile] + 245
14 UIKit 0x0069badf -[UIApplication _runWithMainScene:transitionContext:completion:] + 1337
15 UIKit 0x006b47d0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
16 UIKit 0x0069a81f -[UIApplication workspaceDidEndTransaction:] + 155
17 FrontBoardServices 0x02fba9de __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
18 FrontBoardServices 0x02fba46f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
19 FrontBoardServices 0x02fcc425 __31-[FBSSerialQueue performAsync:]_block_invoke + 26
20 CoreFoundation 0x0020e1c0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
21 CoreFoundation 0x00203ad3 __CFRunLoopDoBlocks + 195
22 CoreFoundation 0x0020392b __CFRunLoopRun + 2715
23 CoreFoundation 0x00202bcb CFRunLoopRunSpecific + 443
24 CoreFoundation 0x002029fb CFRunLoopRunInMode + 123
25 UIKit 0x0069a1e4 -[UIApplication _run] + 571
26 UIKit 0x0069d8b6 UIApplicationMain + 1526
27 Hello World 0x000dbfec main + 92
28 libdyld.dylib 0x02b1aac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
And here is the piece of code from where the error comes:
#import <UIKit/UIKit.h>
int main(int argc, char* argv[])
{
@autoreleasepool {
int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
return retVal;
}
}
I'd appreciate any kind of help this is driving me mad. Regards
PS: how is it possible that I can only include code by indenting with 4 spaces I had to do this for every line, that is so impractical
I had the same exact issue. The cause of the problem is the Main Interface field in your General Settings. This field should be blank. Do not select MainViewController, otherwise this error will be thrown.
Here is my example of the error:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With