Capacitor livereload not working - ionic4

I can't figure out how to use livereload with ionic 4 and Capacitor on ios.
I'm running this command
ionic cap run ios -l which add my local ip address to capacitor.config.json.
however, it seems like I'm missing something in here.
Note: according to Provide live-reload functionality #3130 this should work.
my environment setup:
Ionic:
ionic (Ionic CLI) : 4.1.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.0.0-beta.2
#angular-devkit/core : 0.7.3
#angular-devkit/schematics : 0.7.3
#angular/cli : 6.1.3
#ionic/ng-toolkit : 1.0.6
#ionic/schematics-angular : 1.0.5
Capacitor:
capacitor (Capacitor CLI) : 1.0.0-beta.6
#capacitor/core : 1.0.0-beta.6
System:
NodeJS : v9.10.1 (/usr/local/bin/node)
npm : 6.4.0
OS : macOS High Sierra

For those still struggling with his try:
ionic capacitor run ios --livereload --external
It will open Xcode automatically. Run your project and livereload should work.
Make sure that you are connected to the same WiFi on your device and computer.

Thanks to Julio Cesar form ionic team for pointing this out, this turned to be a bug in Capacitor which has a PR already github.com/ionic-team/capacitor/pull/741 and github.com/ionic-team/capacitor/pull/742

Your assets may need to be rebuilt & plugins resynced.
npm run build
ionic cap sync
Sync will tell you if your Capacitor version matches your platform versions and if there are any issues with plugins.
Then livereload run with:
ANDROID:
ionic cap run android -l --external
iOS:
ionic cap run ios -l --external

It didn't work for me as well until I added "cleartext": true to capacitor.config.json under server. Like this:
"server": {
"url": "http://192.168.1.68:8100",
"cleartext": true
}
This is explained in the official documentation under Using with Framework CLIs.

Related

Difference between Ionic CLI version and Ionic Version

Can anyone tell me what is the difference between the Ionic Version and Ionic CLI version? I heard that the latest version of Ionic is ionic 5. is it possible I can create an Ionic-Vue app with ionic 5?
These are the details:
Ionic:
Ionic CLI : 6.11.0
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v12.18.3
npm : 6.14.6
OS : Windows 10
C:\MobileAppProjects\reddit-clone>vue --version
#vue/cli 4.5.4

React Native: AwesomeProject not starting in emulator

I’m attempting to start up up the AwesomeProject basic project in react native, which is hanging when attempting to hit http://localhost:8081. 

Currently, the iOS emulator is starting up properly by running
yarn ios

After a short period of time, I’m met with the red error screen everyone loves stating “Could not connect to development server.

Here are the current tool versions.
Mac OS: 10.15.4 (macOS Catalina)
NodeJS: v10.19.0
yarn: 1.22.4
npm: 6.13.4
react-native cli: 3.2.1
react-native npm bundle: 0.61.4
expo: 3.15.5
expo npm bundle: 36.0.0
watchman: 4.9.0
xcode: 11.4 (11E146)

I’ve tried numerous ideas such as:
Trying to hit the 8081 url through the browser upon the emulator. I was able to hit the http url just fine
Tried to clear all caches, remove node_modules folder, etc
Ensured the OS firewall is disabled
Upgraded to the latest version of Node
As this point, I'm completely stuck lol and need to get this silly app working.
Can anyone here recommend some ideas?

Uncaught Error: Cannot find module './scroll-view'

im having a problem at run time only when build with --prod flag
im using vscode with
Ionic:
Ionic CLI : 5.2.5
(C:\Users\elile\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : #ionic/angular 4.3.1
#angular-devkit/build-angular : 0.13.8
#angular-devkit/schematics : 7.3.8
#angular/cli : 7.3.9
#ionic/angular-toolkit : 1.5.1
Cordova:
Cordova CLI : not installed
Cordova Platforms : not available
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 9 other plugins)
Utility:
cordova-res : 0.6.0
native-run : 0.2.8
System:
Android SDK Tools : 26.1.1 (D:\android\sdk)
NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10
Somewhere you have used Scroll View module but not put it into the parent modules declarations.
Check every place that you have used Scroll View and see if the module is defined in that parent module.
update
if its an issue with the packages then I would generate a new app and then either copy the package versions back to your current broken app, or just migrate the app into the new app.
The plugin breaks with ionic 4, ionic-angular became #ionic/angular.
If you have used "ionic-angular" library for import then changed for ionic 4
Change "ionic-angular" to "#ionic/angular"
Like that : import { Events } from '#ionic/angular';

react-native run-android not working on ubuntu 16.04

i have a problem with react native in ubuntu, i have installed,
java jdk 8 (both javac --version) as well as echo $JAVA_HOME gives the proper output.
I have also installed android studio and set the android environment variables as well as the tools and echo $ANDROID_HOME gives output of the sdk location.
I have also installed gradle version 4.4.
I am unable to start the android app using react-native run-android. can any one let me know if i have missed something during installation.
And react-native as well as android studio works fine as I am currently using react-native start to start the metro builder as well as the other react-native cli commands. also android studio and gradle is also able to generate debug as well as release apks with no problems.
The error i get,
Scanning folders for symlinks in /home/igate-naveed/Documents/ReactNative/mobile-app-android/node_modules (16ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
First of all you need to create a project like this:
react-native init myProjectName
Then, start an emulator from Android Studio... Afterwards:
npm install && npm start
in your project directory, and from another terminal, inside your project directory, run :
react-native run-android
Is this working?
Instead of using the npm install manager, I used yarn and it worked for me. In your project directory, just do:
(project-directory)$ yarn
Update the gradle version.
Create new project:
react-native init projectname
Uninstall the npm pack.
Reinstall the npm pack again.
npm start
react-native start
react-native run-android

no info and debug messages in Titanium console after updating Xcode

I'm using simple Ti.API.log() calls in several apps, and they worked fine - until I did the most recent XCode update. Since then, the Titanium console messages end with "focusing app simlatur" when I start an iOS App in the simulator, otherwise, no messages from my Ti.API.log() calls are displayed.
Run configuration -> log level is set to "info". Does anyone else have such problem or a solution?
It was a bug with the new version of the iOS simulator. See the issue tracker thread:
https://jira.appcelerator.org/browse/TIMOB-15569
Scrolling down in that thread will show the current workaround reproduced below. This will download and install the newest bleeding edge version of the sdk that contains the fix. They estimate that it will be merged into an official release by mid december. If you are working in titanium studio, you might have to update to the newest version of that as well. I had this issue last week and fixed it by performing the below command and updating titanium studio. (titanium studio can be updated through help->install software and then adding the site for the beta release [see - http://preview.appcelerator.com/studio/ ])
My new working setup is:
Studio version: 3.1.5.201311130103
CLI version 3.2.0
Titanium SDK version 3.2.0.v20131114123518
sudo npm install -g git://github.com/appcelerator/titanium.git
ti sdk install -b master -d
To get back to stable:
sudo npm install -g titanium#3.1.2
ti sdk select 3.1.3.GA
This is a known issue at the moment with 3.1.2.GA CLI. It has been fixed in the upcoming 3.2 CLI. Just hang in there while the AppC team works on this.
For the time being, you can uninstall the current cli via npm like so
npm remove titanium
Then install the "latest and greatest" version from github like so
npm install -g [sudo] npm install -g git://github.com/appcelerator/titanium.git
You can refer to the setup options here: https://github.com/appcelerator/titanium