Phonegap Xcode 6.1 nsexception

I'm tired of looking everywhere to find and answer. I'm new to the phone and what I just did was create a default project, create it, then open it with Xcode to emulate it.

It works well, but after a moment, it throws an error (or the exception doesn't know what it's called) and what it does is just showing an image, but not text, but another.

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 code snippet where the error is coming from:

#import <UIKit/UIKit.h>
int main(int argc, char* argv[])
{
    @autoreleasepool {
        int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
        return retVal;
    }
}

      

I would appreciate any help that drives me crazy. Relations

PS: how is it possible that I can only include the code with the 4-space indentation I had to do for each line, which is so impractical.

+3


source to share


2 answers


I had the same exact problem. The problem is caused by the Primary interface field in the general settings. This field must be empty. Don't select MainViewController

or this error will be thrown.



Here's my example error: enter image description here

+5


source


I solved the problem. I'm going to post it here just in case someone else has the same struggle. What I did was install cordova, ("npm install -g cordova"). Phonegap installs it (I think), but when trying to execute it in the terminal it doesn't seem to be installed why I did it.



0


source







All Articles