About Ionic Add platform

Hi all , I’m new to ionic. When I’m building an app do I need to type “ionic add platform ios” at command line in each development? Or I just need to build ios/android?

You only need to run the command to add the platform once in order to emulate, run, or build for the platform. Once you add the platform it will show up in the platforms folder and a line will be added to the package.json file. You should be able to build for that platform once it’s added, running the command again will just tell you it’s already added:

$ ionic platform add android
running cordova platform add android
Platform android already added.

Thanks for the answer. Is this means I have to add platform whenever I create each new App?

Yes you need to add the platform for every new app you create.

Thank you very much. It’s very helpful for me.

1 Like