cemerson opened a new issue, #1314:
URL: https://github.com/apache/cordova-ios/issues/1314
# Bug Report
## Problem
My **app fails crashes with a NSInternalInconsistencyException (or NSBundle)
error on startup on iPad (device and iOS simulator)** but works fine on iPhone
(device and simulator).
App *DOES* loads up fine on iPhone 7-14 on iOS simulator or device:
App *DOES NOT* load up on iPad on iOS simulator or device:
### What is expected to happen?
* App load successfully in any iOS iPhone or iPad device or simulator
### What does actually happen?
* App crashes as soon as the index.html base file is loaded (no Javascript)
and just displays a blue screen (blue color from the index.html/css)
## Information
Log from an iPad run crash (same for device or iOS simulator):
```
2023-04-18 11:21:51.787010-0400 MyApp[71492:5068746] *** Terminating app due
to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not
load NIB in bundle: 'NSBundle
</Users/myusername/Library/Developer/CoreSimulator/Devices/Device-ID-Here/data/Containers/Bundle/Application/My-App-ID-Here/MyApp.app>
(loaded)' with name 'Main''
*** First throw call stack:
(
0 CoreFoundation 0x00007fff20421af6
__exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20177e78
objc_exception_throw + 48
2 CoreFoundation 0x00007fff204219d4
-[NSException initWithCoder:] + 0
3 UIKitCore 0x00007fff2429677b -[UINib
instantiateWithOwner:options:] + 495
4 UIKitCore 0x00007fff2429770a
-[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 147
5 UIKitCore 0x00007fff2469b2ec
-[UIApplication _loadMainNibFileNamed:bundle:] + 75
6 UIKitCore 0x00007fff2469b992
-[UIApplication _loadMainInterfaceFile] + 274
7 UIKitCore 0x00007fff2469a463
-[UIApplication _runWithMainScene:transitionContext:completion:] + 971
8 UIKitCore 0x00007fff23cc36f7
-[_UISceneLifecycleMultiplexer
completeApplicationLaunchWithFBSScene:transitionContext:] + 122
9 UIKitCore 0x00007fff24251d1e
_UIScenePerformActionsWithLifecycleActionMask + 88
10 UIKitCore 0x00007fff23cc4206
__101-[_UISceneLifecycleMultiplexer
_evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke
+ 198
11 UIKitCore 0x00007fff23cc3cca
-[_UISceneLifecycleMultiplexer
_performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
12 UIKitCore 0x00007fff23cc4037
-[_UISceneLifecycleMultiplexer
_evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 819
13 UIKitCore 0x00007fff23cc38cb
-[_UISceneLifecycleMultiplexer
uiScene:transitionedFromState:withTransitionContext:] + 345
14 UIKitCore 0x00007fff23ccbb63
__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction
_performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke
+ 178
15 UIKitCore 0x00007fff2415b613
+[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 871
16 UIKitCore 0x00007fff2426e5c6
_UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
17 UIKitCore 0x00007fff23ccb869
-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction
_performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]
+ 361
18 UIKitCore 0x00007fff23aee75f
__64-[UIScene
scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 797
19 UIKitCore 0x00007fff23aed209 -[UIScene
_emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 253
20 UIKitCore 0x00007fff23aee398 -[UIScene
scene:didUpdateWithDiff:transitionContext:completion:] + 208
21 UIKitCore 0x00007fff24698a0c
-[UIApplication workspace:didCreateScene:withTransitionContext:completion:] +
508
22 UIKitCore 0x00007fff24183a1f
-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 358
23 FrontBoardServices 0x00007fff25aa70ae -[FBSScene
_callOutQueue_agent_didCreateWithTransitionContext:completion:] + 391
24 FrontBoardServices 0x00007fff25acfb41
__94-[FBSWorkspaceScenesClient
createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.176
+ 102
25 FrontBoardServices 0x00007fff25ab4ad5
-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
26 FrontBoardServices 0x00007fff25acf80f
__94-[FBSWorkspaceScenesClient
createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke
+ 352
27 libdispatch.dylib 0x00000001030fc9c8
_dispatch_client_callout + 8
28 libdispatch.dylib 0x00000001030ff910
_dispatch_block_invoke_direct + 295
29 FrontBoardServices 0x00007fff25af57a5
__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
30 FrontBoardServices 0x00007fff25af548b
-[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
31 FrontBoardServices 0x00007fff25af5950
-[FBSSerialQueue _performNextFromRunLoopSource] + 22
32 CoreFoundation 0x00007fff2039038a
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
33 CoreFoundation 0x00007fff20390282
__CFRunLoopDoSource0 + 180
34 CoreFoundation 0x00007fff2038f764
__CFRunLoopDoSources0 + 248
35 CoreFoundation 0x00007fff20389f2f
__CFRunLoopRun + 878
36 CoreFoundation 0x00007fff203896d6
CFRunLoopRunSpecific + 567
37 GraphicsServices 0x00007fff2c257db3
GSEventRunModal + 139
38 UIKitCore 0x00007fff24696cf7
-[UIApplication _run] + 912
39 UIKitCore 0x00007fff2469bba8
UIApplicationMain + 101
40 MyApp 0x0000000102cdafc6 main + 54
41 ??? 0x000000010816e41f 0x0 +
4430685215
)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:
'NSBundle
</Users/myusername/Library/Developer/CoreSimulator/Devices/Device-ID-Here/data/Containers/Bundle/Application/My-App-ID-Here/MyApp.app>
(loaded)' with name 'Main''
terminating with uncaught exception of type NSException
CoreSimulator 857.14 - Device: iPad Air 14 (Device-ID-Here) - Runtime: iOS
14.4 (18D46) - DeviceType: iPad Air (3rd generation)
(lldb)
```
Here's a screenshot of what XCode displays when the crash occurs - no idea
what I'm looking at here:

Also side note/FYI - the app still works fine on Android
### Command or Code
No code changes between when the app works or doesn't work - it's simply
based on which iOS iPhone Simulator I use
### Environment, Platform, Device
* Macbook / OSX
* XCode
* iPhone Simulator
### Version information
* OSX Ventura 13.3
* XCode (14.2 )
* Cordova 11.1.0
* Cordova-iOS 6.2.0
* Cordova Plugins:
* com.phonegap.plugins.video 1.0.0 "VideoPlayer"
* cordova-plugin-battery-status 2.0.3 "Battery"
* cordova-plugin-chrome-apps-power 1.0.4 "Chrome Apps Power API"
* cordova-plugin-console 1.1.0 "Console"
* cordova-plugin-device 2.1.0 "Device"
* cordova-plugin-dialogs 2.0.2 "Notification"
* cordova-plugin-file-opener2 4.0.0 "File Opener2"
* cordova-plugin-file-transfer 2.0.0-dev "File Transfer"
* cordova-plugin-file 6.0.2 "File"
* cordova-plugin-globalization 1.11.0 "Globalization"
* cordova-plugin-inappbrowser 4.1.0 "InAppBrowser"
* cordova-plugin-media-capture 3.0.3 "Capture"
* cordova-plugin-media 5.0.4 "Media"
* cordova-plugin-network-information 3.0.0 "Network Information"
* cordova-plugin-powermanagement 1.0.5 "Cordova PowerManagement plugin"
* cordova-plugin-screen-orientation 3.0.3 "Screen Orientation"
* cordova-plugin-SecureDeviceIdentifier 0.1.0 "SecureDeviceIdentifier"
* cordova-plugin-statusbar 3.0.0 "StatusBar"
* cordova-plugin-wkwebview-file-xhr 3.1.0 "Cordova WKWebView File XHR
Plugin"
* cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
* es6-promise-plugin 4.2.2 "Promise"
* cordova-plugin-x-socialsharing
## Checklist
- [x] I searched for existing GitHub issues (though unsure what to search
for exactly, NSBundle? NSException pretty generic)
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above (best I could)
PS: Sorry to post another issue again so soon - hoping this isn't another
user-error (like my [last](https://github.com/apache/cordova-ios/issues/1306)
which @breautek was so kind to help me sort out) but apologies in advance if so.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]