How to Set Up Your Development Environment
Mobile app development can be daunting, especially for beginners. It’s not just about getting your project’s code right, it’s also about navigating expansive developer consoles, installing software development kits, and versioning your plugins. And hoping your users upgrade to your app’s latest version (probably not…).
We can’t help you with that last thing, but we can help you set up a development environment to build your first mobile app with Ionic, Cordova, and Onymos Features.
Verify the requirements
For building mobile apps in general on PC, we recommend that your machine is running Windows 10 or later. For Macs, we recommend your machine is no older than four-years-old and running OS 10.13 (High Sierra) or later. If your Mac is older, check whether or not you can run the latest Xcode (we’ll get to that). If you can, then we give your machine the A-OK to develop mobile apps on. Whether you’re using a PC or a Mac, you need to have ‘Admin’ privileges and at least 40GB of free space for the technologies we’ll discuss below.
If you intend to distribute your app through either Apple’s App Store or Google Play, you’ll need to register a developer account with them. Enrollment in the Apple Developer Program costs “99 USD (or in local currency where available) per membership year.” You can create an Android app and distribute it amongst your users directly, for free. Alternatively, you can register a Google Play developer account and pay “a US$25 one-time registration fee” to publish your Android app on Google Play.
When you’re building mobile apps with Onymos Features, you’ll also need Onymos credentials: a unique ID that identifies your app and an authentication token that, well, authenticates it! When you sign-up to receive any Onymos bundle or Feature, we automatically generate these credentials for you (along with the custom infrastructure to support services like Facebook Login or Google Sign-In). When they’re ready, we send them to you. Don’t worry, it doesn’t take long.
Setting up your machine
Now, let’s set up your machine so you can build a mobile app with Ionic and Cordova. We work hard to make sure our instructions are up-to-date, but you can always double-check the official websites for the technologies we’re using.
Install the ‘LTS’ (Long Term Support) version of Node.
Ionic and Cordova
npm install -g cordova
The Ionic Framework is a UI SDK that uses Cordova “under the hood” so developers can build hybrid mobile apps. Hybrid mobile apps can be installed on Android and iOS devices. Install Ionic globally.
npm install -g ionic
Building an iOS app on Mac?
You’ll need to install Xcode, an integrated development environment (or IDE) for building iOS apps. You might use Xcode for, among other things, its iPhone simulators, adding capabilities like ‘Apple Sign In’ and ‘Associated Domains,’ and archiving builds to submit to the Apple App Store.
Install CocoaPods, a dependency manager that functions similarly to npm, but for iOS apps.
Building an Android app on Mac or PC?
Java Development Kit
You’ll need to install the Java Development Kit (or JDK) used to develop Java-based software. This guide from Cordova will go into even greater detail about the JDK and the other Android app dependencies below.
Android Studio is the counterpart to iOS’ Xcode and is the official IDE for the Android OS. You can find and install Android Studio here.
Install Gradle, a build tool for compiling, testing, and deploying your Android apps.
Run into another one of those opaque build errors? We’ve all been there, and those kinds of problems are the ones Onymos is all about solving. Hit up our Developer Support Center.