cordova_ios_for_windows

0.0.2 • Public • Published

cordova_ios_for_windows

Preparation

  1. Install Node.js:
    • Go to https://nodejs.org/en/ and download the installer that mentions "LTS" on the big green button
    • Execute the file you downloaded to install Node on your computer
    • Open a command prompt (Windows [Start] -> type "Command Prompt" -> Start with a click or [Enter])
    • Confirm that Node is installed by typing node -v and executing with [Enter]. This should output the version of node you downloaded and installed:
      C:\Users\Jan>node -v
      v10.15.1
      
      (Your version number may be different)
  2. Install Cordova:
    • In the command prompt, execute npm install -g cordova
    • Confirm that Cordova was successfully installed by executing cordova -v. This should output a Cordova version:
      C:\Users\Jan>cordova -v
      8.1.2 (cordova-lib@8.1.1)
      
  3. Install cordova_ios_for_windows:
    • Execute npm install -g cordova_ios_for_windows
    • Confirm successful installation with cordova_ios_for_windows -v. This should output the same version as the previous step.
      C:\Users\Jan>cordova_ios_for_windows -v
      8.1.2 (cordova-lib@8.1.1)
      

You successfully installed all the tools required to continue. 🌱

Update to current version

If you already installed cordova_ios_for_windows before and want to update:

  • Execute npm install -g cordova_ios_for_windows again

Create and configure the app

  1. Make sure you are in a safe location: Your command prompt should be at C:\Users\%username% right now, so enter cd Documents to go to your Documents folder. Then run explorer . to open an Explorer window in the same location.
  2. Create a new Cordova project with cordova create app. This will create a new folder app in your current folder.
  3. Go into the new folder with cd app.
  4. Add the Cordova iOS platform with cordova platform add ios@5.0.0
    (You can confirm it worked by running cordova platform list)

You now have a Cordova app in C:\Users\%username%\app that already has the iOS platform added and is ready to be adapted and built. 🌷

Adapt your app

  1. Run cordova serve to be able to look at the default app included. Open the URL the command outputs in your browser, then click ios to look at it.
  2. Use [Ctrl] + [C] to exit the running serve.
  3. You can now create your web app in www.
  4. If you only want to test the build process as quick as possible, just open C:\Users\%username%\Documents\www\index.html in your favorite text editor (both Notepad and Notepad++ work!) and replace everything between <body> and </body> with a simple sentence of your choice, then save the file.
  5. Execute cordova serve again and open the URL in your browser to see your adapted app with the adapted page content.
  6. Then exit the running serve with [Ctrl] + [C] again.

Now you have an app that is worth deploying to a device 🌻

Configure your app

Here is a list of common tasks that you want to do, besides building your web app in www:

  • Change the app package name / bundle identifier
    • Edit config.xml and replace the id value of <widget> with something customized to you
  • Change the app and app display name
  • Change the app icon and splash screen

Build your app for a simulator

You can use cordova build ios to build your app for an iOS simulator.
Unfortunately there is no working simulator for Windows, so you can skip this.

Prepare codesigning

Apps for iOS need to be "codesigned" to be able to be run on real iOS devices or to be uploaded to the App Store. Apple's instructions are of course fully focused on doing this on a Mac, with tools and software that is not available for Windows. Fortunately, there is a simple workaround for all these steps.

To be able to codesign an app, we need the following files and information:

  1. Development team ID
  2. App ID
  3. Certificates
  4. Provisioning Profiles

Follow the instructions in codesign.md to get all these files and information and save them in a format that works for Cordova on Windows.

Build your app for a real device and install it on your device

  1. Build your app for iOS development: cordova build ios --device
  2. Install the app on your iPhone by scanning the QR code and following the instructions on screen.

You successfully built an iOS app and installed it on your smartphone! 💐

Build your app for the App Store and upload it

  1. Build your app for iOS distribution: cordova build ios --device --release
  2. Install the app on your iPhone by scanning the QR code and following the instructions on screen. Note that you can install, but not launch it as it is only meant to be uploaded to the App Store.











☠️ Future Functionality

  1. Download the resulting .ipa file for upload

Upload the distribution version of your app to App Store Connect

  1. Put .ipa in location
  2. Execute upload and supply username and application specific password
    • Application specific password from appleid.apple.com
  3. Now you can access this build in TestFlight or release it as a normal app

☠️ Future Functionality

Test and debug your app

  1. Connect to your app running on your smartphone to debug it: ???
  2. Run your app on an emulator: ???

Readme

Keywords

none

Package Sidebar

Install

npm i cordova_ios_for_windows

Weekly Downloads

3

Version

0.0.2

License

none

Unpacked Size

40.3 kB

Total Files

16

Last publish

Collaborators

  • janpio