Getting Started with iOS
by Jon (Updated on 2014-01-29)
Part 1 - Getting Started
Part 2 - Understanding Certificates
Part 3 - Setting up Certificates
- System Requirements
- Step 1: Install Xcode
- Step 2: Install Xcode Additions
- Step 3: Test a Game in the iOS Simulator
- Step 4: Test a Game on your iOS Device
- Next: Set up Certificates
- How to Get Help
System Requirements (as of 2014)
- Stencyl 3.0 or better
- iOS Developer License from Apple
- Mac OS X Mountain Lion (10.8) or later
- Xcode 5
- An iOS device with iOS 7 or later
You must have a Mac to test and publish iOS games. Although your iOS device must have iOS 7 or later, you can push your app to older devices by exporting an IPA and installing the app through iTunes on those other devices.
Step 1: Install Xcode
We recommend installing Xcode directly from the Mac App Store. This guarantees the latest version and simple, in-place updates.
Alternatively, you can grab it from Apple's Developer Site.
Step 2: Install Xcode Additions
After installing Xcode, launch it. Then, do the following.
- Open up Preferences (Xcode > Preferences).
- Flip to the Downloads page.
- Under Components, install Command Line Tools, iOS 6.1 Simulator and iOS 5.1 Simulator.
After they finish downloading, close Xcode.
Step 3: Test in the iOS Simulator
Now, launch Stencyl and create a brand new game with a blank scene. The game's name and details don't matter -- you'll just be testing that the iOS Simulator works.
- Launch Stencyl.
- Click Create a New Game.
- Pick Blank Game. Click Next.
- Provide a name. Leave everything else as-is. Click Create.
- The game now opens up to the Scenes listing. Click Create New (the green button).
- Provide a name for the scene. Click Create.
- Save the game.
- Switch the Platform dropdown's value to iPhone Simulator (3.5" Retina).
- Enable the Log Viewer from the menu (View > Log Viewer).
- Click Test Game.
Now, the app will build for a while, depending on how fast your computer is. With the Log Viewer, you can see new lines continually appear, assuring you that progress is being made.
At the end of the process, the iOS simulator will automatically launch the game.
Stencyl is based around Haxe. In order to build native iOS apps, Haxe is translated to C++ which in turn is compiled to machine code. Although the Stencyl engine is compact, the Haxe code it depends on is large and has to be re-compiled for each new game. We don't think this is optimal, but that's how it is right now. Mercifully, this is only the case the first time you run a game on a given platform (where iOS Simulator and iOS Device are considered separate platforms). Second runs and onwards are much faster. Flash games are not affected by this quirk.
Step 4: Test on an iOS Device
Now, let's do the same thing except on an iOS Device. Using the same game, do the following.
- Plug in your iOS device to your computer.
- Switch the Platform dropdown's value to iOS Device.
- Click Test Game.
Again, it will go through a lengthy build process like explained above.
At the end of the process, the app will auto-launch on your iOS Device.
Next: Set up Certificates
Read our comprehensive guide on how to set up certificates, so that you can publish your game to your friend's devices and the App Store.
How to get Help
Our official documentation. Stencylpedia provides articles and videos covering the essentials.
Public and subscriber-only forums. This is the official way to seek support.
Billing / Account Support
If you have problems with your account, or run into any billing-related issues, contact us.