user3024814 user3024814 - 2 months ago 5x
AngularJS Question

How to deploy an AngularJS app to PlayStore etc

I built a web-app using AngularJS + Angular Material and now want to deploy it to the AppStore (using Cordova I guess?)
What are the steps that I need to do to achieve this?

  1. Install cordova

    npm install -g cordova
  2. Create a new cordova project.

    cordova create hello com.example.hello HelloWorld

    This will create new directory - hello and inside hello you will have your new cordova project - HelloWord, package name - com.example.hello

  3. Add your angularjs app code to 'www' folder inside hello directory.

  4. Now add iOS as a platform to your cordova project.

    cordova platform add ios --save
  5. If you need to access gallery, camera, or any other device feature, you will have to add a cordova-plugin for same.

    For example to get access to device camera.

    cordova plugin add cordova-plugin-camera

    Read more about how you will handle events associated with camera inside your angular app. Go through that plugin's documentation.

    I would recommend you to use ng-cordova for using cordova-plugins. Read more about ng-cordova here.

  6. Now you will build your cordova project to generate .ipa file for iOS device.

    cordova build ios 
  7. Inside your hello directory you will have a xcodeproj file -hello/platforms/ios/hello.xcodeproj open it in Xcode and run on an emulator to test.

  8. Purchase your apple developer account and sign into your xcode with your apple account.

From Xcode you will get option to Archive And Publish your app to Appstore.

Few links to get started

  • App store documentation to know detailed publishing process here

  • Cordova documentation here