Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ReferenceError: NativeScriptViewFactory is not defined on iOS built with mode --release. #10519

Open
3 tasks done
paulmlilo opened this issue Apr 15, 2024 · 31 comments
Open
3 tasks done

Comments

@paulmlilo
Copy link

paulmlilo commented Apr 15, 2024

Issue Description

Nativescript version: 8.7.1
Environment: iOS 17.4.1
Build: Release

When I build the app for iOS in --release mode, the app crashes on launch with a Fatal error
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error:

Uncaught ReferenceError: NativeScriptViewFactory is not defined

Screenshot 2024-04-15 at 15 58 36

Reproduction

  • Upgrade or install Nativescript 8.7.0 with angular.
  • run ns run ios --bundle --release

Relevant log output (if applicable)

No response

Environment

MacOs Sonoma, Apple M2 Pro Chip.
Nativescript iOS.

Please accept these terms

@paulmlilo paulmlilo added the bug-pending-triage Reported bug, pending triage to confirm. label Apr 15, 2024
@rigor789
Copy link
Member

Can you confirm this happens even after running ns clean first?

Please also include the contents of your package.json.

@NathanWalker
Copy link
Contributor

This can also be seen if you haven't cleared DerivedData in awhile.
You can run this command:

rm -rf ~/Library/Developer/Xcode/DerivedData

Then ns clean and run.

@NathanWalker NathanWalker added needs more info and removed bug-pending-triage Reported bug, pending triage to confirm. labels Apr 15, 2024
@paulmlilo
Copy link
Author

paulmlilo commented Apr 15, 2024

@rigor789 Yes it happens after running ns clean.

Here is my package.json.

{
  "name": "app",
  "main": "./src/main.ts",
  "version": "2.1.1",
  "private": true,
  "nativescript": {
    "id": "example.example.app"
  },
  "dependencies": {
    "@angular/animations": "~17.3.4",
    "@angular/common": "~17.3.4",
    "@angular/compiler": "~17.3.4",
    "@angular/core": "~17.3.4",
    "@angular/forms": "~17.3.4",
    "@angular/platform-browser": "~17.3.4",
    "@angular/platform-browser-dynamic": "~17.3.4",
    "@angular/router": "~17.3.4",
    "@heywhy/ns-secure-storage": "~0.3.0",
    "@nativescript-community/push": "~1.1.11",
    "@nativescript-community/ui-image": "~4.3.40",
    "@nativescript-community/ui-mapbox": "~6.2.27",
    "@nativescript-community/ui-material-bottomnavigationbar": "~7.2.49",
    "@nativescript-community/ui-material-slider": "^7.2.49",
    "@nativescript-community/ui-pager": "~14.1.19",
    "@nativescript-community/ui-pulltorefresh": "~2.5.3",
    "@nativescript-community/universal-links": "^3.0.1",
    "@nativescript/angular": "~17.0.0",
    "@nativescript/appavailability": "~2.0.0",
    "@nativescript/auto-fit-text": "~1.0.3",
    "@nativescript/biometrics": "~1.3.1",
    "@nativescript/camera": "~5.1.0",
    "@nativescript/contacts": "~2.1.0",
    "@nativescript/core": "~8.7.0",
    "@nativescript/datetimepicker": "~2.1.13",
    "@nativescript/geolocation": "~8.3.1",
    "@nativescript/haptics": "^3.0.2",
    "@nativescript/imagepicker": "~3.1.1",
    "@nativescript/iqkeyboardmanager": "~2.1.1",
    "@nativescript/social-share": "~2.3.0",
    "@nativescript/tailwind": "^2.0.1",
    "@nativescript/theme": "~3.0.1",
    "@nstudio/ui-collectionview": "~5.1.8",
    "@triniwiz/nativescript-star-ratings": "^2.0.3",
    "anchorme": "^3.0.5",
    "dayjs": "^1.11.10",
    "geolocation-utils": "~1.2.5",
    "global": "^4.4.0",
    "google-libphonenumber": "~3.2.34",
    "jwt-decode": "3.1.2",
    "lodash": "^4.17.21",
    "nativescript-audio": "^6.2.6",
    "nativescript-barcodescanner": "~4.1.2",
    "nativescript-calendar": "~3.0.0",
    "nativescript-clipboard": "^2.1.1",
    "nativescript-feedback": "^2.0.0",
    "nativescript-hook": "~0.2.5",
    "nativescript-imagecropper": "~4.0.3",
    "nativescript-inappbrowser": "^3.2.0",
    "nativescript-phone": "^3.0.3",
    "nativescript-uuid-v2": "~2.0.1",
    "ngx-mask": "^17.0.7",
    "rxjs": "~7.8.1",
    "short-crypt": "^3.0.6",
    "tailwindcss": "~3.4.3",
    "throttle-debounce": "~5.0.0",
    "ts-deepmerge": "^7.0.0",
    "zone.js": "~0.14.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~17.3.4",
    "@angular/compiler-cli": "~17.3.4",
    "@nativescript/android": "~8.7.0",
    "@nativescript/debug-ios": "~1.0.0",
    "@nativescript/ios": "8.7.0",
    "@nativescript/types": "~8.7.0",
    "@nativescript/types-android": "~8.7.0",
    "@nativescript/types-ios": "~8.7.0",
    "@nativescript/webpack": "^5.0.19",
    "@ngtools/webpack": "~17.3.4",
    "@types/lodash": "~4.17.0",
    "@types/node": "~20.12.7",
    "@types/throttle-debounce": "^5.0.2",
    "postcss": "^8.4.38",
    "postcss-loader": "^8.1.1",
    "prettier": "~3.2.5",
    "prettier-plugin-organize-imports": "^3.2.4",
    "prettier-plugin-tailwindcss": "^0.5.13",
    "typescript": "~5.4.5"
  },
  "packageManager": "yarn@4.1.0"
}

@paulmlilo
Copy link
Author

@NathanWalker, I ran rm -rf ~/Library/Developer/Xcode/DerivedData and then ns clean but it still returns the same error.

@paulmlilo paulmlilo changed the title Uncaught ReferenceError: NativeScriptViewFactory is not defined Uncaught ReferenceError: NativeScriptViewFactory is not defined on iOS built with mode --release. Apr 15, 2024
@israelglory
Copy link

I am also having this exact error. Please can we get help with this ? @NathanWalker

@israelglory
Copy link

@NathanWalker @paulmlilo apparently i inspected the error to the nodemudles and figured the nativescript core ios utils folder has an index.js folder and this function is the one causing my app to break, :

export function getWindow() {
let window;
if (SDK_VERSION >= 15) {
// UIWindowScene.keyWindow is only available 15+
window = NativeScriptViewFactory.getKeyWindow(); <--------- the problem
}
if (window) {
return window;
}
const app = UIApplication.sharedApplication;
if (!app) {
return;
}
return app.keyWindow || (app.windows && app.windows.count > 0 && app.windows.objectAtIndex(0));
}

please what do you need to do ?

@pazaan
Copy link

pazaan commented Apr 19, 2024

I can repro this just using a blank sample project.

I'm on a 2019 Intel MBP running macOS 14.4.1, with Xcode 15.3, iOS SDK 17.4 and ns 8.7.0.

% ns create vue-sample --vue --ts
% cd vue-sample
% ns run ios # works fine, runs on my attached device
% ns run ios --bundle --release # runs, then crashes on my attached device

The generated package.json is:

{
  "name": "vue-sample",
  "main": "app/app.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@nativescript/core": "~8.7.0",
    "@nativescript/theme": "~3.0.2",
    "nativescript-vue": "~2.9.3"
  },
  "devDependencies": {
    "@nativescript/ios": "8.7.0",
    "@nativescript/types": "~8.7.0",
    "@nativescript/webpack": "~5.0.19",
    "@types/node": "~17.0.21",
    "nativescript-vue-template-compiler": "~2.9.3",
    "typescript": "~5.4.0",
    "vue": "~2.6.12"
  }
}

Crashes with:

  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error:
  Uncaught ReferenceError: NativeScriptViewFactory is not defined
   at
  	getWindow(file:///var/containers/Bundle/Application/367C52DC-DF32-40B1-846F-30F36C41A51B/vuesample.app/app/vendor.js:2:861673)
  	at get window(file:///var/containers/Bundle/Application/367C52DC-DF32-40B1-846F-30F36C41A51B/vuesample.app/app/vendor.js:2:27298)
  	at didFinishLaunchingWithOptions(file:///var/containers/Bundle/Application/367C52DC-DF32-40B1-846F-30F36C41A51B/vuesample.app/app/vendor.js:2:29697)
  	at (file:///var/containers/Bundle/Application/367C52DC-DF32-40B1-846F-30F36C41A51B/vuesample.app/app/vendor.js:2:23442)

I noticed that the --release version has a minified vendor.js, whereas the non-release version doesn't. I'll keep digging into this to see if I can narrow it down some more.

Webpack was a red herring. When I explicitly set mode to development, I still get the crash.

It doesn't even have to be a Vue example. I get the same even when doing a vanilla TS project: ns create example-app --ts

@pazaan
Copy link

pazaan commented Apr 19, 2024

I got back on my feet again by downgrading to @nativescript/core": "~8.6.2 and @nativescript/ios": "8.6.4.

@NathanWalker
Copy link
Contributor

I'm curious @pazaan @israelglory @paulmlilo if the projects where you're seeing this have a build.xcconfig or Podfile you could share?
We're not seeing this here, even with ns create, so perhaps something else we could check that could bring about the condition?
If each would be able to respond with output of following would be helpful as well:

node -v
npm -v
ns -v
ruby --version
pod --version

@israelglory
Copy link

israelglory commented Apr 19, 2024

v20.3.1
9.6.7
8.7.0
✔ Up to date.
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [arm64-darwin22]
1.15.2

@NathanWalker

@CatchABus
Copy link
Contributor

CatchABus commented Apr 19, 2024

v20.3.1 9.6.7 8.7.0 ✔ Up to date. ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [arm64-darwin22] 1.15.2

@NathanWalker

We happen to have a fix in next release that solves problems similar to this one: NativeScript/ios#248
Can you try npm i @nativescript/ios@next and see if next solves it for you?

@pazaan
Copy link

pazaan commented Apr 20, 2024

I'm curious @pazaan @israelglory @paulmlilo if the projects where you're seeing this have a build.xcconfig or Podfile you could share? We're not seeing this here, even with ns create, so perhaps something else we could check that could bring about the condition? If each would be able to respond with output of following would be helpful as well:

node -v
npm -v
ns -v
ruby --version
pod --version
% node -v
v20.12.2
% npm -v # Intentionally downgraded because of https://github.com/NativeScript/NativeScript/issues/10509
10.3.0
% ns -v
8.7.0
✔ Up to date.
% ruby --version
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-darwin22]
% pod --version
1.15.2

I don't have a Podfile:

% find . -name "*Podfile*"
%

@NathanWalker Which build.xcconfig would you like to see?

% find . -name build.xcconfig         
./platforms/ios/build/Release-iphoneos/exampleapp.xcarchive/Products/Applications/exampleapp.app/build.xcconfig
./platforms/ios/build/Debug-iphoneos/exampleapp.xcarchive/Products/Applications/exampleapp.app/build.xcconfig
./platforms/ios/exampleapp/build.xcconfig
./platforms/ios/exampleapp/Resources/build.xcconfig
./node_modules/@nativescript/ios/framework/__PROJECT_NAME__/build.xcconfig
./App_Resources/iOS/build.xcconfig

Edit: Assume you mean App_Resources...

ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = E53PUHPBVX

@pazaan
Copy link

pazaan commented Apr 20, 2024

We happen to have a fix in next release that solves problems similar to this one: NativeScript/ios#248
Can you try npm i @nativescript/ios@next and see if next solves it for you?

Updating to next didn't appear to help.

% npm i -D @nativescript/ios@next
% ns run ios --clean --release # <--- still crashes

@israelglory
Copy link

I got back on my feet again by downgrading to @nativescript/core": "~8.6.2 and @nativescript/ios": "8.6.4.

Worked...

@paulmlilo
Copy link
Author

@NathanWalker
Screenshot 2024-04-23 at 01 37 34

@tomcoonen
Copy link

I don't know if it's related, but I also had an issue on 8.7.0 (release build):

Fatal Exception: java.lang.RuntimeException Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function ReferenceError: __registerDomainDispatcher is not defined File: (file:///data/data/xxxx/files/app/vendor.js:2:849906) StackTrace: (file:///data/data/xxxx/files/app/vendor.js:2:849907)

@rigor789
Copy link
Member

@tomcoonen was @nativescript/android updated to 8.7.x as well? I believe the stack you shared can happen when using core 8.7.x but old android runtime version. I think we can add another check before including the inspector_modules in webpack to ensure both core and runtime are supporting them.

@tomcoonen
Copy link

@rigor789 Yes, I tried manually and also using the migrate command.

@marcocasadio
Copy link

marcocasadio commented May 29, 2024

same error

 ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error:
  Uncaught ReferenceError: NativeScriptViewFactory is not defined
   at
  	getWindow(file:///var/containers/Bundle/Application/314A3B3C-9205-4A2F-AE00-65FEA75BB192/rosapp.app/app/vendor.js:2:870001)
  	at get window(file:///var/containers/Bundle/Application/314A3B3C-9205-4A2F-AE00-65FEA75BB192/rosapp.app/app/vendor.js:2:35771)
  	at didFinishLaunchingWithOptions(file:///var/containers/Bundle/Application/314A3B3C-9205-4A2F-AE00-65FEA75BB192/rosapp.app/app/vendor.js:2:38170)
  	at (file:///var/containers/Bundle/Application/314A3B3C-9205-4A2F-AE00-65FEA75BB192/rosapp.app/app/vendor.js:2:31915)

any idea?

@NathanWalker
Copy link
Contributor

@marcocasadio Could you share your App_Resources/iOS/build.xcconfig here?

NativeScriptViewFactory is only defined on iOS 13 and above which should be the minimum now. It's recommended to set that minimum in build.xcconfig like this:

IPHONEOS_DEPLOYMENT_TARGET = 13.0;

You can set that to 14 or higher as well.

@NathanWalker
Copy link
Contributor

@pazaan the shared build.xcconfig was missing a minimum deployment target. If still see the issue, you can add the target line above ^.

@Ederagp
Copy link

Ederagp commented May 29, 2024

the same happens to me:

logRunRelease

This project is running on a macbookPro 16" 2019, Sonoma 14.5, Intel Core i9.
NS 8.7.2
@nativiscrpet/core 8.7.0
@nativiscrpet/ios 8.7.2

buils.xcconfig:

DEVELOPMENT_TEAM = XXXXXXXX;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64 = arm64 arm64e armv7 armv7s armv6 armv8;
EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT));
CODE_SIGN_ENTITLEMENTS = ClickSegurosEcuador/Resources/app.entitlements;


Something curious is that this same project is executed on another macbookPro and does not present the error.

@NathanWalker
Copy link
Contributor

@Ederagp On that Intel let's modify the build.xcconfig to only contain the following:

DEVELOPMENT_TEAM = XXXXXXXX;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = ClickSegurosEcuador/Resources/app.entitlements;

Then in your package.json, modify the dependencies to use a tilde to ensure it grabs latest patch versions after a clean like this:

"@nativiscrpet/core": "~8.7.2"
"@nativiscrpet/ios": "~8.7.2"

Also modify the ClickSegurosEcuador/Resources/Podfile to be setup like this to match your target version in your build.xcconfig:

platform :ios, '14.0'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
      config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
    end
  end
end

Then do a ns clean and run. Let us know how that goes.

@Ederagp
Copy link

Ederagp commented May 29, 2024

@Ederagp On that Intel let's modify the build.xcconfig to only contain the following:

DEVELOPMENT_TEAM = XXXXXXXX;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = ClickSegurosEcuador/Resources/app.entitlements;

Then in your package.json, modify the dependencies to use a tilde to ensure it grabs latest patch versions after a clean like this:

"@nativiscrpet/core": "~8.7.2"
"@nativiscrpet/ios": "~8.7.2"

Also modify the ClickSegurosEcuador/Resources/Podfile to be setup like this to match your target version in your build.xcconfig:

platform :ios, '14.0'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
      config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
    end
  end
end

Then do a ns clean and run. Let us know how that goes.

@NathanWalker
The error continues with these settings!!! 🙁

@NathanWalker
Copy link
Contributor

NathanWalker commented May 29, 2024

Have you deleted DerivedData in Xcode?
Also just curious what Xcode version on the Intel.

Mind sharing entire package.json as well? Would be curious to see it.

@Ederagp
Copy link

Ederagp commented May 29, 2024

@NathanWalker

Yes, I have deleted DerivedData.

Xcode 15.4 (15F31d)

package.json:
{
"description": "",
"main": "./app/main.ts",
"nativescript": {
"id": "com.myapp.org"
},
"dependencies": {
"@angular/animations": "~16.2.0",
"@angular/common": "~16.2.0",
"@angular/compiler": "~16.2.0",
"@angular/core": "~16.2.0",
"@angular/forms": "~16.2.0",
"@angular/platform-browser": "~16.2.0",
"@angular/platform-browser-dynamic": "~16.2.0",
"@angular/router": "~16.2.0",
"@klippa/nativescript-http": "~3.0.4",
"@nativescript-community/css-theme": "~1.2.13",
"@nativescript-community/perms": "~2.3.2",
"@nativescript-community/ui-document-picker": "~1.1.18",
"@nativescript-community/ui-material-bottom-navigation": "~7.2.49",
"@nativescript-community/ui-material-cardview": "~7.2.49",
"@nativescript-community/ui-material-tabs": "~7.2.49",
"@nativescript-community/ui-pager": "~13.0.44",
"@nativescript/angular": "~16.0.0",
"@nativescript/appversion": "~2.0.0",
"@nativescript/biometrics": "~1.3.1",
"@nativescript/camera": "~5.1.1",
"@nativescript/core": "~8.7.2",
"@nativescript/datetimepicker": "~2.1.13",
"@nativescript/firebase-analytics": "~3.3.1",
"@nativescript/firebase-core": "~3.3.1",
"@nativescript/firebase-messaging": "~3.3.1",
"@nativescript/imagepicker": "~3.1.1",
"@nativescript/iqkeyboardmanager": "~2.1.1",
"@nativescript/social-share": "~2.3.0",
"@nativescript/theme": "~3.0.2",
"@nstudio/nativescript-filterable-listpicker": "~3.0.2",
"@nstudio/nativescript-loading-indicator": "~4.3.4",
"@progress-nativechat/nativescript-nativechat": "~3.0.2",
"email-validator": "~2.0.4",
"moment": "~2.30.1",
"nativescript-cscreenshot": "~1.2.1",
"nativescript-drop-down": "~6.0.2",
"nativescript-exit": "~1.0.1",
"nativescript-intl": "~4.0.2",
"nativescript-permissions": "~1.3.12",
"nativescript-plugin-badge-ns-7": "~1.0.1",
"nativescript-theme-core": "~2.0.24",
"nativescript-ui-autocomplete": "~15.2.3",
"nativescript-ui-dataform": "~15.2.3",
"nativescript-ui-gauge": "~15.2.3",
"nativescript-ui-listview": "~15.2.3",
"nativescript-ui-sidedrawer": "~15.2.3",
"nativescript-uuid-v2": "~2.0.1",
"pdfmake": "~0.2.7",
"reflect-metadata": "0.2.2",
"rxjs": "~7.8.1",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "~16.2.0",
"@angular/compiler-cli": "~16.2.0",
"@nativescript/android": "8.7.0",
"@nativescript/ios": "~8.7.2",
"@nativescript/types": "~8.7.0",
"@nativescript/webpack": "~5.0.18",
"@ngtools/webpack": "~16.2.0",
"typescript": "~5.1.6"
}
}

@NathanWalker
Copy link
Contributor

NathanWalker commented May 29, 2024

Thank you that's helpful, one last thing, let's drop the package-lock.json (prob easiest just to upload it so we can see what's locked in there) here as well - one of those older deps in there could be holding your core version back (via a transient peer dep).

@Ederagp
Copy link

Ederagp commented May 29, 2024

@NathanWalker this is the packages-lock.json

package-lock.json

@NathanWalker
Copy link
Contributor

Perfect thank you! If in community discord https://nativescript.org/discord, you can ping me at wwwalkerrun, easier to chat about results there.

@marcocasadio
Copy link

marcocasadio commented May 31, 2024

@NathanWalker I've tried to change from 13.0 to 14.0 but still getting the error.

  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error:
  Uncaught ReferenceError: NativeScriptViewFactory is not defined
   at
  	getWindow(file:///var/containers/Bundle/Application/BF5753AC-3DD6-4CD7-844E-D9795FBDE5C3/rosapp.app/app/vendor.js:2:870001)
  	at get window(file:///var/containers/Bundle/Application/BF5753AC-3DD6-4CD7-844E-D9795FBDE5C3/rosapp.app/app/vendor.js:2:35771)
  	at didFinishLaunchingWithOptions(file:///var/containers/Bundle/Application/BF5753AC-3DD6-4CD7-844E-D9795FBDE5C3/rosapp.app/app/vendor.js:2:38170)
  	at (file:///var/containers/Bundle/Application/BF5753AC-3DD6-4CD7-844E-D9795FBDE5C3/rosapp.app/app/vendor.js:2:31915)

this is my package.json

    "name": "ros",
    "version": "0.0.1",
    "description": "ROS Remote Open Space",
    "author": "Marco Casadio <marco.casadio@dotenv.it>",
    "scripts": {
        "setup": "npm i && ts-patch install",
        "ios:release": "ns run ios --bundle --release"
    },
    "dependencies": {
        "@nativescript/appversion": "^2.0.0",
        "@nativescript/background-http": "~6.0.0",
        "@nativescript/core": "8.7.2",
        "@nativescript/datetimepicker": "^2.0.4",
        "@nativescript/fingerprint-auth": "^8.1.0",
        "@nativescript/firebase-core": "^3.1.0",
        "@nativescript/firebase-crashlytics": "^3.1.0",
        "@nativescript/firebase-messaging": "^3.1.0",
        "@nativescript/imagepicker": "~1.0.0",
        "assert": "^2.0.0",
        "axios": "^0.26.1",
        "browserify-zlib": "^0.2.0",
        "buffer": "^6.0.3",
        "child_process": "^1.0.2",
        "crypto-browserify": "^3.12.0",
        "fs": "^0.0.1-security",
        "fs-extra": "^11.1.1",
        "https-browserify": "^1.0.0",
        "moment-timezone": "^0.5.31",
        "nativescript-feedback": "^2.0.0",
        "nativescript-mediafilepicker": "^4.0.1",
        "nativescript-pdf-view": "3.0.0-1",
        "nativescript-statusbar": "^5.0.0",
        "nativescript-theme-core": "^1.0.6",
        "nativescript-ui-autocomplete": "^15.2.3",
        "nativescript-ui-listview": "^15.2.3",
        "nativescript-vue": "~2.9.0",
        "net": "^1.0.2",
        "os-browserify": "^0.3.0",
        "path-browserify": "^1.0.1",
        "stream-browserify": "^3.0.0",
        "stream-http": "^3.2.0",
        "tls": "^0.0.1",
        "tty-browserify": "^0.0.1",
        "typescript": "^5.0.4",
        "url": "^0.11.0",
        "util": "^0.12.4",
        "util-deprecate": "^1.0.2",
        "vue-axios": "^3.4.1",
        "vue-moment": "^4.1.0",
        "vuex": "^3.5.1"
    },
    "devDependencies": {
        "@babel/core": "^7.12.3",
        "@babel/preset-env": "^7.12.1",
        "@nativescript/android": "~8.7.0",
        "@nativescript/ios": "~8.7.2",
        "@nativescript/webpack": "~5.0.5",
        "babel-loader": "^9.1.2",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0",
        "babylon": "6.18.0",
        "css-hot-loader": "^1.4.4",
        "lazy": "1.0.11",
        "mini-css-extract-plugin": "^2.7.5",
        "nativescript-toasty": "^3.0.0-alpha.2",
        "nativescript-vue-template-compiler": "~2.9.0",
        "sass": "~1.62.0",
        "ts-patch": "^2.1.0",
        "vue-loader": "^17.0.0"
    },
    "main": "./app/main.js"
}

and this is the build.xcconfig:

DEVELOPMENT_TEAM = 3NM7M2TV69
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
TARGETED_DEVICE_FAMILY = 1;
CODE_SIGN_ENTITLEMENTS = rosettiapp/rosettiapp.entitlements

@shirakaba
Copy link
Contributor

shirakaba commented Jun 1, 2024

Just encountered this in a project that had been running just fine via ns run ios. Happened when I ran the app, on the very same device (a simulator) through Xcode for the first time.

Inside Xcode, performing Product > Clean Build Folder... (shift + Cmd + K) fixed things so that it worked fine next time I attempted to run it. I didn't run ns clean and I didn't touch my build.xconfig. Can't explain the logic, but would appear to be some kind of caching problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants