App crashes when I try to open in it on tesflight on a iPhone

New to ionic and developing my first app. When I use ionic labs I am able to display my app fine. Also able to use ionic view and see the app on the phone. However when I use Xcode to create an archive and post it to testflight the app crashes on open. What would be useful to troubleshoot this issue? When I was looking at some of the logs in Xcode using the emulator this is what I found is below. Let me know if another log is helpful and how to get it from Xcode (have only used Xcode to compile the project).

2015-04-15 00:35:04.370 billSync[33736:3500332] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/vijaybrihmadesam/Library/Developer/CoreSimulator/Devices/D663025A-70E4-44C3-9974-84A0AAEFB844/data/Containers/Data/Application/2EEEA22B-8879-4B57-96E9-C6935A8A1B54/Library/Cookies/Cookies.binarycookies
2015-04-15 00:35:04.509 billSync[33736:3500332] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x7f87e9409e10> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
	0   CoreFoundation                      0x0000000109671f35 __exceptionPreprocess + 165
	1   libobjc.A.dylib                     0x000000010b9a3bb7 objc_exception_throw + 45
	2   CoreFoundation                      0x0000000109671b79 -[NSException raise] + 9
	3   Foundation                          0x000000010b5407b3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
	4   CoreFoundation                      0x00000001095bbe80 -[NSArray makeObjectsPerformSelector:] + 224
	5   UIKit                               0x0000000109d23c7d -[UINib instantiateWithOwner:options:] + 1506
	6   UIKit                               0x0000000109d25722 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 160
	7   UIKit                               0x0000000109a5db11 -[UIApplication _loadMainNibFileNamed:bundle:] + 46
	8   UIKit                               0x0000000109a5cc19 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1075
	9   UIKit                               0x0000000109a5bbf2 -[UIApplication workspaceDidEndTransaction:] + 179
	10  FrontBoardServices                  0x000000010c5f72a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
	11  CoreFoundation                      0x00000001095a753c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
	12  CoreFoundation                      0x000000010959d285 __CFRunLoopDoBlocks + 341
	13  CoreFoundation                      0x000000010959ca43 __CFRunLoopRun + 851
	14  CoreFoundation                      0x000000010959c486 CFRunLoopRunSpecific + 470
	15  UIKit                               0x0000000109a5b669 -[UIApplication _run] + 413
	16  UIKit                               0x0000000109a5e420 UIApplicationMain + 1282
	17  billSync                            0x0000000109470fda main + 42
	18  libdyld.dylib                       0x000000010c117145 start + 1
	19  ???                                 0x0000000000000001 0x0 + 1
libc++abi.dylib: terminating with uncaught exception of type NSException
1 Like

Deleted the platform/ios folder and re-installed (“ionic platform add iOS”) and that solved the issue.

I’ve identified the source of this particular issue. Here is my instance of this error.

Main Interface must be empty. If MainViewController is selected for the main interface, it will throw the unknown key exception. Hope that helps!


baph0mt - confirmed this worked for me.

This worked for me as well.
Thank You

This solution worked for me also.

not working for me sir

Not working for me. Please help me with same.

Guys I had this problem with the Ionic 6, React, and Capacitor app. I delete the Podfile.lock file and Pods directory and re-install. Not it’s working.