Repository navigation
Xcode 26.3 / iOS device startup crash on NativeScript 8.9.x: UIContentSizeCategoryExtraSmall is not defined #11135
Description
Issue Description
Description
After upgrading to Xcode 26.3, a NativeScript 8.9.x Angular app crashes during startup on a physical iPhone when launched from Xcode.
The crash happens before app code really starts and appears to come from NativeScript core/iOS runtime startup.
Environment
- NativeScript CLI: 8.9.4-next-09-04-2025-17475697620
- @nativescript/core: 8.9.3-next-05-28-2025-15305824880
- @nativescript/ios: 8.9.2-next.2025-02-28-13593660746
- @nativescript/angular: 15.0.2
- Node: 20.20.1
- npm: 9.5.0
- Xcode: 26.3
- Device: iPhone 16 Pro
- iOS: 26.3.1
Expected behavior
App should start normally on device when built/launched with Xcode 26.3.
Actual behavior
App crashes during NativeScript startup.
First crash:
ReferenceError: UIContentSizeCategoryExtraSmall is not defined
Stack begins in:
- @nativescript/core/accessibility/font-scale.ios.js
- @nativescript/core/accessibility/accessibility-css-helper.js
- @nativescript/core/application/application-common.js
Additional investigation
I verified the bundled vendor.js contains a direct reference to:
[UIContentSizeCategoryExtraSmall, 0.5]
I then patched @nativescript/core/accessibility/font-scale.ios.js locally to remove direct UIContentSizeCategory... global references. After that, startup progressed further but failed with a second error:
ReferenceError: Cannot access 'Application' before initialization
Stack begins in:
- @nativescript/core/media-query-list/index.js
This suggests there may be broader NativeScript 8.x startup/runtime compatibility issues with Xcode 26.3, with UIContentSizeCategoryExtraSmall just being the first visible failure.
Reproduction steps
- Open project in Xcode 26.3
- Build/run on physical iPhone
- Observe startup crash
If helpful I can try reproducing in a minimal fresh NativeScript 8.9.x Angular app.
Reproduction
Reproduction steps
- In terminal run npc ns build iOS
- Open project in Xcode 26.3
- Build/run on physical iPhone
- Observe startup crash
Relevant log output (if applicable)
Runtime initialization took 41ms (version 8.9.2-next.2025-02-28-13593660746, V8 version 10.3.22)
NativeScript encountered a fatal error:
Error calling module function
Error calling module function
ReferenceError: UIContentSizeCategoryExtraSmall is not defined
File: (file:///app/runtime.js:31:12)
StackTrace:
./node_modules/@nativescript/core/accessibility/font-scale.ios.js(file:///app/vendor.js:8047:6)
at __webpack_require__(file:///app/runtime.js:28:33)
at fn(file:///app/runtime.js:222:21)
at ./node_modules/@nativescript/core/accessibility/accessibility-css-helper.js(file:///app/vendor.js:7366:69)
at __webpack_require__(file:///app/runtime.js:28:33)
at fn(file:///app/runtime.js:222:21)
at ./node_modules/@nativescript/core/application/application-common.js(file:///app/vendor.js:8627:97)
at __webpack_require__(file:///app/runtime.js:28:33)
at fn(file:///app/runtime.js:222:21)
at ./node_modules/@nativescript/core/application/application.ios.js(file:///app/vendor.js:9516:77)
at __webpack_require__(file:///app/runtime.js:28:33)
at fn(file:///app/runtime.js:222:21)
at ./node_modules/@nativescript/core/application/index.ios.js(file:///app/vendor.js:10013:70)
at __webpack_require__(file:///app/runtime.js:28:33)
at fn(file:///app/runtime.js:222:21)
at ./node_modules/@nativescript/core/globals/index.js(file:///app/vendor.js:17262:5)
at __webpack_require__(file:///app/runtime.js:28:33)
at fn(file:///app/runtime.js:222:21)
at ./node_modules/@nativescript/core/inspector_modules.js(file:///app/vendor.js:18674:66)
at __webpack_require__(file:///app/runtime.js:28:33)
at __webpack_exec__(file:///app/tns_modules/inspector_modules.js:21:39)
at (file:///app/tns_modules/inspector_modules.js:22:71)
at __webpack_require__.X(file:///app/runtime.js:154:21)
at (file:///app/tns_modules/inspector_modules.js:22:47)
at (file:///app/tns_modules/inspector_modules.js:27:3)
at require(:1:232)
------
after patching:
Runtime initialization took 33ms (version 8.9.2-next.2025-02-28-13593660746, V8 version 10.3.22)
NativeScript encountered a fatal error:
Error calling module function
ReferenceError: Cannot access 'Application' before initialization
File: (file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:9510:59)
StackTrace:
Application(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:9510:60)
at ./node_modules/@nativescript/core/media-query-list/index.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:19556:70)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/styling/css-selector.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:46497:75)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/styling/style-scope.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:49479:71)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/core/view-base/index.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:27286:78)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/core/view/view-common.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:29479:68)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/core/view/index.ios.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:28483:70)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/frame/frame-common.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:32487:68)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/frame/index.ios.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:33304:71)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/dialogs/dialogs-common.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:31569:64)
at __webpack_require__(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/runtime.js:23:42)
at ./node_modules/@nativescript/core/ui/dialogs/index.ios.js(file:///var/containers/Bundle/Application/79286DC3-7347-4853-B69B-75047A13C9E8/triplyapp.app/app/vendor.js:31765:73)Environment
OS: macOS 26.3.1
CPU: (14) x64 Apple M4 Pro
Shell: /bin/zsh
node: 20.20.1
npm: 10.8.2
nativescript: 8.7.2
# android
java: 17.0.6
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found
# ios
xcode: 26.3/17C529
cocoapods: 1.15.2
python: Not Found
python3: 3.10.10
ruby: 2.6.10
platforms:
- DriverKit 25.2
- iOS 26.2
- macOS 26.2
- tvOS 26.2
- visionOS 26.2
- watchOS 26.2Dependencies
"dependencies": {
"@angular/animations": "~15.0.0",
"@angular/common": "~15.0.0",
"@angular/compiler": "~15.0.0",
"@angular/core": "~15.0.0",
"@angular/forms": "~15.0.0",
"@angular/platform-browser": "~15.0.0",
"@angular/platform-browser-dynamic": "~15.0.0",
"@angular/router": "~15.0.0",
"@nativescript-community/ble": "^3.1.15",
"@nativescript-community/perms": "^3.0.0",
"@nativescript-community/ui-lottie": "^6.0.0",
"@nativescript-community/ui-material-bottom-navigation": "^7.0.43",
"@nativescript-community/ui-material-ripple": "^7.1.3",
"@nativescript-community/ui-material-tabs": "^7.1.3",
"@nativescript-community/ui-pulltorefresh": "^2.5.3",
"@nativescript/angular": "15.0.2",
"@nativescript/core": "8.9.3-next-05-28-2025-15305824880",
"@nativescript/datetimepicker": "^2.1.13",
"@nativescript/directions": "^2.0.2",
"@nativescript/geolocation": "^8.1.0",
"@nativescript/theme": "~3.0.2",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"@sergeymell/nativescript-svg": "^1.1.2",
"crypto-js": "^4.2.0",
"date-fns": "^4.1.0",
"nativescript-ui-gauge": "^15.2.3",
"rxjs": "~7.6.0",
"zone.js": "~0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "~15.0.0",
"@angular/compiler-cli": "~15.0.0",
"@nativescript/android": "8.9.2-next.2025-08-24-17192049177",
"@nativescript/ios": "8.9.2-next.2025-02-28-13593660746",
"@nativescript/types": "8.9.1",
"@nativescript/webpack": "5.0.23",
"@ngtools/webpack": "~15.0.0",
"@types/jest": "^29.5.12",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"patch-package": "^8.0.0",
"ts-jest": "^29.1.2",
"nativescript": "8.9.4-next-09-04-2025-17475697620",
"typescript": "~4.8.4"
}Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project's Code of Conduct
Activity
farfromrefug commentedon Mar 11, 2026
@jpmartinsson did you try to clean and build again?
it works fine here
CatchABus commentedon Mar 11, 2026
@jpmartinsson I recall this problem got fixed in the latest v8.9.x iOS runtime, so I'd advice you to update it since you use
@nativescript/ios8.9.2-next.2025-02-28-13593660746.NathanWalker commentedon Mar 11, 2026
I'd also recommend using @nativescript/ios 9.x.x - for latest Xcode, Android Studio and other platform related items, always best to use latest cli (
npm i -g nativescript) with latest runtimes (@nativescript/ios, @nativescript/android 9.x.x)jpmartinsson commentedon Mar 12, 2026
Thanks for the input. We weren't planning on moving to Nativescript 9.x.x now, but will consider that. Main reason for waiting is that we thought we had to raise the angular version from 15 to something higher if we move to NS9 (or is this perhaps a faulty thought). If NS9 is the way to go and doesn't require an Angular upgrade we're in.
In the meantime...
I minimized the project as far as I reasonably can on the Angular 15 / NativeScript 8 line, and the app still crashes on startup with Xcode 26.3.
Environment:
What I minimized:
Current minimal files:
src/main.ts
polyfills.ts
app.module.ts
app.component.ts
Build output:
Runtime crash on device:
Earlier in the process, on the same Xcode 26.3 path, I also hit:
ReferenceError: UIContentSizeCategoryExtraSmall is not definedfrom font-scale.ios.js
Given the current minimized state, this no longer appears to be caused by app code, CSS, plugins, or CocoaPods integration.
Could you please confirm:
...or should we abandon this and go NS9 + Angular 15 (if possible) right away?
farfromrefug commentedon Mar 12, 2026
@jpmartinsson Dont go 9. You ll have more problems on top of the ones you already have.
Yes 8.9.x is stable and should work fine with Xcode26.3 and Angular 15 (though i am not an angular dev).
the application error you are seeing is totally normal if there was the error first of UIContentSizeCategoryExtraSmall not being defined.
I think it is a metadata error . First
@nativescript/ios: 8.9.2is not the latest i would use 8.9.5. And i think it is the fix as 8.9.3 mention xcode 26 supportjpmartinsson commentedon Mar 13, 2026
Fantastic! I changed to
@nativescript/iOS: 8.9.5and the startup errors were gone. Thanks for your quick and insightful resolution to my problems.NathanWalker commentedon Mar 13, 2026
I noticed in your output one key thing that may have been causing your issue. NS 9 requires node 22+, above looks like you had
Node: 20.20.1. Using latest node LTS may be all you needed alongside latest cli,npm i -g nativescript. It's possible though that angular 15 has node engine restrictions so updating to latest angular may help there too.If want to explore NS 9 further can reach out in discord.