Assertion failure and NSInternalInconsistencyException in NativeScript - nativescript

Can anyone help me on this? I am trying to run my NativeScript + Angular app in my iPhone.
Terminal Creation
Created tns create mysample --ng app, added iOS platform, successfully built with warnings and run time error arising when I tried to run in Xcode.
Playground Creation
Downloaded NativeScript + Angular app from NativeScriptPlayground, added iOS platform, successfully built with warnings and run time error arising when I tried to run in Xcode.
Issue:
In both cases, app is successfully installed in my device but when launch screen is launched, then immediately app is getting crashed.
Build Warnings: [but, successfully built]
Run Time Error:

Related

No debug logs and app crashes on device in xcode (React Native)

I'm building an app with React Native. When I run the app through 'react-native run-ios' everything is fine, when I try to run it from xcode on my device through Product -> Run, the debug window is completely empty of any log and the app just crashes.
I suspect this has to do something with main.jsbundle, because before having an empty debug window, the build was running and then I got an error message "No bundle URL present" and I had to delete and regenerate main.jsbundle and then add it as a file to the project in xcode, this partially solved it but since then, as mentioned, the app crashes and there is absolutely no logs in the debug area (where they used to be).
versions:
xcode: 13.4.1
RN: 0.68.2

React native won't run on device but does on simulator via xcode

When using Xcode, My app is building as expected but it is failing when it starts running with the following error:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x800000002)
The app doesn't crash, it continues running but it just pauses on the launch screen.
However, it works as expected when running on the simulator via xcode. Do you have any idea why it might be failing when running on a physical device?
I have tried cleaning the build folder but it did not do any good.

How can I test a standalone watchOS application?

I can't figure out how to test running my watchOS app as a standalone app. When I run it on the simulator it never works unless I also have the associated iOS app. Running the watch scheme shows that the iOS app is running along with the watchOS app. I created a scheme which just builds the watch and it will cause the watch app to start, but it doesn't actually update the compiled binary.
First of all, you have to create certificates for all project targets and upload on Testflight, Through Testflight (mobile application) you can install the app and it will sync automatically in the watch.
The second option will, Connect your watch with mobile and install that watch application via Xcode on mobile, it will sync automatically in the watch.

Unable to apply changes on device: XXXXX. Error is: Socket connection timed out

I have a problem when I want to build my Nativescript app on an Android emulator.
So the first thing I've done is tns create my app with an --ng flag for the angular framework. After that i try to run it on an emulator and the last message I've get before the error is that it is "Succesfully installed on device with identifier 'emulator'".
I've tried the whole https://docs.nativescript.org/releases/upgrade-instructions and got stuck at upgrading typescript and angular dependencies because it says it does not contain a package.json file.
I've run some NScore applications succesfully on the emulator but this is my first NG app and I've hit a wall. I've saw the firebase thread too about this particular theme but I don't use firebase for my app.
I had the same error trying to run nativescript on a particular device. check the storage of the device you are trying to build on.
In my own case it was storage issues that lead to that error.
In my case, the problem was a secondary space in Mi Note 7. For some reason, nativescript was installing the app in the second space (even when first space is active)
I got this error, by Updating App ID only in package.json
To resolve the issue, I manually updated the App ID in the following file.
App_Resources\Android\settings.json
{"appId":"org.nativescript.appid","minSdkVersion":null,"targetSdkVersion":null}

Cordova Diagnostic plugin does nothing

This is my first cordova app and i'm trying to use the cordova.plugins.diagnostic plugin. I have it installed correctly i believe. On device ready I can alert that
alert(cordova.plugins.diagnostic != null) // returns true
// Appears to do nothing, i get no alerts
cordova.plugins.diagnostic.isLocationEnabled(function(enabled){
alert(enabled)
}, function(){
alert("ERROR");
});
I assume my error is with how i am running the app. I build the app via
cordova build ios
Then I run the build via xCode 9.4 to a local iPhone X
Any ideas on what i am doing wrong is much appreciated.
I have found the issue! Originally, when running
cordova build ios
I would receive and archive not found error, that i was essentially ignoring because it didnt seem to effect anything when built via xCode.
I resolved the error by running instead
cordova build ios --buildFlag="-UseModernBuildSystem=0"
Then, I can take the outputed .ipa file and install it onto my device via
Window > Devices and Simulators > {select device} > drag and drop ipa into app list
Running the app after this allowed for successfull response from isLocationEnabled!
I hope this answer helps someone else :D

Resources