i am using https://github.com/NathanWalker/angular2-seed-advanced which creates a running nativescript app.
now, i am a starter with nativescript and wanted to ask, how i can achieve a good development flow.
i am coming from ionic where i was able to see the console output on my development machine and was able to test my app live on a cable connected device. live reloading was running also.
so my questions:
can i run my app on a device without publishing it to the store
will i be able to see the console.log output somehow on my local dev machine with adb or a nativescript cli command?
is live reloading possible for developing nativescript apps?
Thank you in advance!
yes
yes
yes
tns livesync android --watch
You can install the app to your own Android / iOS real devices and/or the iOS simulator and Android emulators, all without sending it to any of the stores.
You can see the log fine, typically when you do a tns run [ios|android] the log is pipped back to your console. You can also run the standard adb logcat (android) or idevicesyslog (for iOS if installed)
Live reloading is possible, and works fairly well. You can use the tns run [android|ios] which is built into the tns command line.
The answer to all three questions is yes (as another answer point out). To add to answer of question 3,
As of nativescript version 2.5.0, tns run and tns livesync does the same thing, tns run has the ability to apply changes and sync it to a running app on device/emulator. The message on console clearly says tns livesync is being deprecated, so you should always look to use tns run
Here are the latest options(As of 2018-Jan) to run the app in live sync mode with a device when you are using NathanWalker -angular-seed-advanced.
iOS (device): npm run start.ios.device --debug
Android (device): npm run start.android.device --debug
--debug option will pull in more logs from the device(not just for your app, but also other activities)
Check the latest doc here for up-to date commands,
You can also use adb as explained here,
Related
I can't see console logs in my nativescript/angular app in a super simple scenario - on button tap I have console.log('hello').
So far I've tried using Sidekick, VS Code, tns run android, tns debug android, tns device log, adb logcat and bunch of other commands I found in Google.
I am using nativescript 6.3.0 and my environment is correct according to tns doctor/tns info
I wonder if anyone had similar problem?
I'm new in phoneGap and have problem to debug my app, I know that exist a lot of post about this but really I don't have idea how make this work.
I have console.log("message") in severals part of my code; but how can see this message when run my app?
I use this command to run
phonegap build android
phonegap run android --target=G7T7N16A26000893 --debug
with this result
with this not terminal still open to see anything. Aditional I try with Chroome DevsTools; but look that is only for pages not for apps.
Thanks #Kerri Shotts you are rigth, with google in remote devices could see apps, full tutorial her
I am dealing with SQLite in my ionicframework project.
Every time I change the code in controller, I need to rerun the apps in my phone and see the console.log what was the output.
Anyone knows how to view SQLite in android / ios phone from PC?
It was so hard and takes so much time to make any changes in codes and
to rerun the project to see the result in console.log
Any helps will make my coding faster. Thanks for any helps.
You can use --livereload or -l in run command as mention in ionic cli docs
Run your app using this command
ionic run android -l
or
ionic run android --livereload
I have an ionic project and I want to test it on my device.
I've seen some tutorial and I id like this :
ionic platform add android
and then
ionic run android
but it opens the emulator and I cannot see my application.
My main goal is to export it on my phone,in order to test it.
Can you help me?
Thank you!
Run ionic run android --device
Note: Be sure that USB-Debugging is enabled on your device in
developer options.
Also to make sure your device is authorised you can run:
adb devices
I have a Cordova project, that I can run on my Android phone using ionic run android --device and on my iPad using ionic run ios --device. However, now I connect my iPhone 5, and run the last command again, but get the following error message.
...
[ 60%] TakingInstallLock
[ 65%] PreflightingApplication
[ 65%] InstallingEmbeddedProfile
[ 70%] VerifyingApplication
2015-06-24 17:58:48.564 ios-deploy[33436:1048931] [ !! ] Error 0xe8008015: ∑~}ˇ AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Error code 253 for command: ios-deploy with args: -d,-b,/path/to/project/App/platforms/ios/build/device/project_name.app
ERROR running one or more of the platforms: Error: /path/to/project/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
Online (also on SO) I find many users facing this issue with an Android device, and then they need to install the Android APK. I also read here that I have to run the following command first: sudo npm install -g ios-deploy, which I did. It did not help though.
I am using version 5.0.0, and I read here that I have to downgrade to version 4.3.0. I find this hard to believe though. Is there another cause for this error? How can I check for it, and how can I solve it?
I encountered the same ios deploy AMDeviceSecureInstallApplication error when deploying to a new ios device. Here is how I was able to resolve it and successfully deploy to the new ios device. Start xcode and open your xcodeproj file which can be found in your project_name/platforms/ios directory. Once the project is finished loading then from the top menu select Product and then select destination and choose your new ios device. Then when you click run in xcode you will be prompted that it cannot run on the new ios device because of your code signing provisioning profile. There will be an option that says something like "try and fix it" and simply select that option and follow the prompts, confirm which provisioning profile you want to use to deploy your app to the device. If you only have one provisioning profile then select that one and the app will now run on your device. And in the future you should be able to deploy to this device using the ionic run ios --device command.