0
votes

I am starting to create new app with latest ionic version.

I got the following info through ionic info command

Ionic:

   Ionic CLI                     : 6.1.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.0
   @angular-devkit/build-angular : 0.803.25
   @angular-devkit/schematics    : 8.3.25
   @angular/cli                  : 8.3.25
   @ionic/angular-toolkit        : 2.1.2

Cordova:

   Cordova CLI       : not installed
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed
   native-run  : 0.3.0

System:

   ios-deploy : 1.10.0
   ios-sim    : 8.0.2
   NodeJS     : v12.16.0 (/usr/local/bin/node)
   npm        : 6.13.7
   OS         : macOS Catalina
   Xcode      : Xcode 11.3.1 Build version 11C504

I just followed the following steps

npm install -g @ionic/cli
ionic start myApp tabs
cd myApp
ionic serve

when i run ionic serve i get the web page opened automatically.

and then i have added the ios developer account to the xcode

xcode-select --install
npm install -g ios-sim
brew install ios-deploy
ionic cordova prepare ios
ionic cordova run ios -l --external

so finally when i run the cli command. I get the simulator opened automatically and some popup verifying myapp.app and close after few seconds after that app not installed in simulator.

It works when I run manually from xcode.

Please help me to get the "ionic cordova run ios -l --external" command run successfully. terminal screenshot with simulator

When i run cordova in the terminal i get the following error but cordova is installed globally using the sudo command and cordova folder is exist in the npm modules.

cordova

/usr/local/lib/node_modules/cordova/node_modules/write-file-atomic/index.js:236 throw err ^

Error: EACCES: permission denied, open '/Users/soundhar/Library/Preferences/insight-nodejs/insight-cordova.json.2409298856' at Object.openSync (fs.js:457:3) at Function.writeFileSync [as sync] (/usr/local/lib/node_modules/cordova/node_modules/write-file-atomic/index.js:212:13) at Conf.set store [as store] (/usr/local/lib/node_modules/cordova/node_modules/conf/index.js:142:19) at new Conf (/usr/local/lib/node_modules/cordova/node_modules/conf/index.js:44:14) at new Insight (/usr/local/lib/node_modules/cordova/node_modules/insight/lib/index.js:40:35) at Object. (/usr/local/lib/node_modules/cordova/src/telemetry.js:26:15) at Module._compile (internal/modules/cjs/loader.js:1157:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10) at Module.load (internal/modules/cjs/loader.js:1001:32) at Function.Module._load (internal/modules/cjs/loader.js:900:14) { errno: -13, syscall: 'open', code: 'EACCES', path: '/Users/soundhar/Library/Preferences/insight-nodejs/insight-cordova.json.2409298856' }

Thanks for all

1
I am not sure but try ionic cordova run ios --emulator this command. let me know.Najam Us Saqib
ionic cordova emulate iosMostafa Harb

1 Answers

0
votes

Try to run this two commands:

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config