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

iOS crash: App does not run anymore when built with Xcode 15.3 for iOS 17.4 #241

Closed
gabrielbiga opened this issue Mar 8, 2024 · 2 comments

Comments

@gabrielbiga
Copy link
Contributor

Since my personal iPhone 12 updated to the iOS 17.4 (21E219) version I cannot run my app anymore. At first, I thought that was only my APP, so I tried to run the Angular example and I got the exact same error.
The weirdest thing is if I run the app on the physical iPhone, it crashes giving the error, but if I run it on an emulator, nothing happens, the app runs ok.
I just sent an APP for AppStore review and it was rejected because it's crashing at the splash screen.

I had some success replacing the NSURLSessionConfiguration call with NSURLConnection patching inside the @nativescript/core package, but the app is still failing at some native access. Maybe the native bridge is broken at the latest version + latest SDK.

***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error:
  Error calling module function
  ReferenceError: NSURLSessionConfiguration is not defined
  File: (file: src/webpack:/demong/webpack/bootstrap:27:0)
  StackTrace:
  	../../node_modules/@nativescript/core/http/http-request/index.ios.js(file: src/webpack:/demong/node_modules/@nativescript/core/http/http-request/index.ios.js:15:0)
  	at __webpack_require__(file: src/webpack:/demong/webpack/bootstrap:24:0)
  	at fn(file: src/webpack:/demong/webpack/runtime/hot module replacement:62:0)
  	at ../../node_modules/@nativescript/core/xhr/index.js(file:///app/vendor.js:47375:63)
  	at __webpack_require__(file: src/webpack:/demong/webpack/bootstrap:24:0)
  	at fn(file: src/webpack:/demong/webpack/runtime/hot module replacement:62:0)
  	at (file: src/webpack:/demong/node_modules/@nativescript/core/globals/index.js:263:43)
  	at loadModule(file: src/webpack:/demong/node_modules/@nativescript/core/globals/index.js:202:0)
  	at get(file: src/webpack:/demong/node_modules/@nativescript/core/globals/index.js:8:0)
  	at (file: src/webpack:/demong/node_modules/@nativescript/core/fetch/index.js:12:0)
  	at (file: src/webpack:/demong/node_modules/@nativescript/core/fetch/index.js:17:13)
  	at ../../node_modules/@nativescript/core/fetch/index.js(file: src/webpack:/demong/node_modules/@nativescript/core/fetch/index.js:539:1)
  	at __webpack_require__(file: src/webpack:/demong/webpack/bootstrap:24:0)
  	at fn(file: src/webpack:/demong/webpack/runtime/hot module replacement:62:0)
  	at (file: src/webpack:/demong/node_modules/@nativescript/core/globals/index.js:265:45)
  	at loadModule(file: src/webpack:/demong/node_modules/@nativescript/core/globals/index.js:202:0)
  	at get(fi<\M-b\M^@\M-&>

Versions used:
Nativescript Angular Demo APP (https://github.com/NativeScript/angular)
Xcode: 15.3.0
iOS: 17.4 (21E219)
iPhone: 12
NS Cli: 8.6.5

@apburgess
Copy link

apburgess commented Mar 9, 2024

There seems to be an issue with Xcode 15.3.0, I hit the same issue with crash on launch on device, but OK on simulator. Can you downgrade to 15.2.0? That resolve the issue for me.

I have suspicions it's down to a new clang option that's being added (-fdefine-target-os-macros) but that hasn't been added yet (but the 15.3 headers rely on).. but I'm not 100% sure (digging into it at the moment).

@gabrielbiga
Copy link
Contributor Author

Hello @apburgess thanks for your answer and your investigation, but the error was just fixed by #242.
I just tested and it back everything 100% to normal. Many thanks all who put some effort on it!

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

No branches or pull requests

2 participants