Running npm run watch:ios in NS-Vue


#1

when running Nativescript-vue app on iOS, I get the error below =>

***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1   0x10db5f359 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2   0x10db90e00 -[TNSRuntime executeModule:referredBy:]
3   0x109c12621 main
4   0x11055f955 start
5   0x1
JavaScript stack trace:
1   @file:///app/app.js:27464:20
2   __webpack_require__@file:///app/app.js:20:34
3   @file:///app/app.js:20267:170
4   __webpack_require__@file:///app/app.js:20:34
5   @file:///app/app.js:25064:32
6   __webpack_require__@file:///app/app.js:20:34
7   @file:///app/app.js:63:37
8   anonymous@file:///app/app.js:64:12
9   evaluate@[native code]
10  moduleEvaluation@[native code]
11  @[native code]
12  promiseReactionJob@[native code]
JavaScript error:
file:///app/app.js:27464:20: JS ERROR TypeError: undefined is not an object (evaluating 'application.android.on')

help from anyone? @manojdcoder ??


#2

The console gives you the exact problem there, I believe you are trying to access android object which won’t be available in iOS / you are accessing it early even before it’s available. Until I see some code, can’t say much.


#3

Okay… I’ll get back to you.


#4

Found the error, wrote some code for the android platform, which won’t work on iOS… Got it working now.