nativescript 7 - Live reload is working only once - nativescript

I've installed latest version on Nativescript as documentation says:
nativescript Full setup with javascript
Everything went fine, so next i did setup my first project: tns create HelloWorld
Next i started the project using npm run ios
Iphone emulator has started, and when i made first change to text label, i saw that app refresh, but on second change conosle said that project is refreshed, but no changes on app. If i close app and run again, i see live reload only works once and next it igores any changes. My question is how to fix this.

Related

How to debug a Cordova app showing blank screen in XCode Simulator

We inherited an app where the frontend is built in Vue 2 and the mobile app built with cordova-ios (6.2.0) and cordova-android (10.1.1). It has built ok and loaded in the XCode (13.2.1) simulator until recently.
It's got some fairly old packages which I upgraded, and managed to get it to run both in vue ui and Android Studio (Chipmunk). (I had upgraded the packages because somewhere along the line that build broke -- so I deleted node_modules and package-lock.json, then upgraded packages one by one until I got it working again.)
However, when I do the Cordova build for iOS, open the project in XCode, do an XCode build, then open it up in a simulator, the screen is completely blank.
These are the only files that changed in version control between releases:
package.json
package-lock.json
babel.config.js
(various Vue files under src/views)
I'm fairly new to mobile development so don't really know how to proceed. How would I go about debugging the project (simulator, XCode, whatever) to see what has broken?
Any extra information you need please ask.
Edit 1: Avinash's suggestion about debugging via Safari Dev Console was a good tip (thanks Avinash). I've checked the app HTML vs a working build and it seems somehow the injection of the app content into <div id="app"> is not happening. In the android version it's fine, so maybe something in the cordova build is not happy.
There's an error message in the debug logging in XCode saying it could not load the "LaunchStoryboard" image referenced from a nib in the bundle with identifier which is also different from the output in a working build.
Avinash's suggestion is spot on in that it can help troubleshoot startup problems (I've had to do this a bunch of times myself). From your update, it sounds like there's an issue with the splash screen configuration.
There's some iOS specific documentation for the splash screen plugin on the Cordova documentation website. A couple tips that might be useful in tracking down the issue:
You can use a single image for the splash screen if desired. I've got just one defined for my app (the needed dimensions are defined in the Cordova docs above):
<platform name="iOS">
...
<splash src="www/res/screen/ios/Default#2x~universal~anyany.png" />
</platform>
I have also run into issues where the storyboard file has gotten corrupted, probably by me falling on my keyboard and clicking on something while the editor was open. To rebuild, you can remove and re-add the iOS platform:
$ cordova platform rm ios
$ cordova platform add ios
This should copy over the splash image and rebuild the storyboard file.

Ionic 2 App crashes after splash screen on iOS - how to debug?

I have finally managed to install my Ionic 2 app on my iPhone with a development profile.
When I click the app icon it shows the splash screen, asks for Push permission (I am using Push) and then closes immediately. The same happens when I run it on the xCode simulator.
Any ideas where I can start debugging? This is the first time I am trying to deploy on iOS.
You are most probably using "phonegap-plugin-push" plugin to implement this feature. If that's the case then remove this plugin from your app and try to run it. If app doesn't crash then the problem is with the plugin.
Have you checked all the permission to use the push notification as specified in plugin's git page?

Nativescript - weird page crash in ios

Got an app and works on Android and iOS.
There's one particular page in the app when I visit crashes in the production version of iOS app. Works fine in the emulator, works on the device in debug mode.
I narrowed it down to nativescript-imagepicker plugin. Even though no plugin specific code is being executed when the page is opened - it crashes as long as include the plug-in and have the code in a function (not called). If I comment out the code (but still include the plugin) - that works also.
What could cause such a problem?
Does the NS back-end run some code if the plugin is referenced in the page file?
Again works fine in emulator on iOS and also when tested directly on the device.
The problem occurs when the app is downloaded from itunesconnect - so there's no way for me to test it - console messages etc.
Using NS 3.2 with nativescript-imagepicker 0.3.6.

Ionic 2: Ionic serve works fine, but gets stuck on loading screen when deployed to iOS

This is the first time I'm running into this issue in Ionic 2, but basically, I took the build of https://github.com/driftyco/ionic-conference-app as of today's date and moved my files from another project into this one, mostly so I could take advantage of the latest Ionic 2 functionality. When I run ionic serve, everything loads up fine in the browser.
However, when I run ionic build ios then build it onto my iOS device, I get no errors, but the screen just gets stuck on the ionic splash screen. What's interesting is that my files from the other project would deploy onto my device no problem, as well as when I deployed the ionic conference app. I'm not exactly sure what I could have done to cause this problem, but I did change add a line in my config.xl<allow-navigation href="*"/>
Has anyone else run into this?

React Native Project Cloned from Git keeps opening SampleApp

I have an existing React Native project in Bitbucket. Today I cloned it by overwriting a project I had created with react-native init <name>.
Build runs smoothly and it opens the app. But instead of showing my index.ios.js it shows the text "Welcome to React Native!", which seems to be same as /Examples/SampleApp. I already removed that folder, but it still keeps popping up.
What should I do to point to my own index.ios.js and to get my project up and running?
I think You might have the packager opened with the SampleApp in separate XCode project. just make sure that you stop it. That's one of the minor problems with React that by default (unless you change port numbers in the code of your app) you cannot have two react apps running in parallel.

Resources