Although testing your apps in the iOS Simulator is a good first step, you must make sure they also run properly on an actual device. There are a few differences between running an app on the simulator and on a device that you should be aware of:
- The processor speed is different. Apps tend to run faster in the simulator.
- The memory capacity is different. You’ll need to manage your memory more efficiently on a device if you want to avoid out-of-memory errors.
- You can accurately test multitouch input.
- You can use the camera to grab images and video.
- You can use specific inputs not available in the simulator, such as audio, location, orientation, proximity, etc.
- You can test network connections in a real world setting. This is particularly important if your app needs to connect over the cellular network.
Unfortunately, installing apps on an iOS device is a convoluted process. Later versions of Xcode simplify the process a little, but you should still be aware of what all the pieces of the puzzle are in order to properly troubleshoot any issues.
|Key||A digital identity, consisting of a secret private key and a shared public key. This private key allows Xcode to sign your iOS application binary.|
|Certificate||An electronic document that associate your digital identity with other information, including your name, email address, or business. All iOS applications must be signed by a valid certificate before they can be run on an Apple device.|
|Device||An Apple device that is authorized to run developed applications. The device is identified by a Unique Device Identifier (UDID).|
|App ID||A unique identifier that iOS uses to identify your application, connect to the Apple Push Notification service, share keychain data between applications, and communicate with external hardware accessories you wish to pair your iOS application with. You can create a wildcard App ID if you want a suite of applications to share data.
Each App ID consists of a unique 10 character Bundle Seed ID provided by Apple and a Bundle Identifier suffix that is provided by the developer. An example App ID would be
|Provisioning Profile||A collection of digital assets that ties it all together, containing a set of iOS Development Certificates, Unique Device Identifiers and an App ID. The Provisioning Profile must be installed on each device on which you wish to run your application code.|
You must be registered as an Apple Developer and subscribe to the iOS Developer Program. There are many flavours of developer programs, with yearly fees ranging from $0 to $299. depending on the size of the team and the type of distribution required.
Team Members can have many different roles:
|Agent||The primary contact for the development team. The Agent is responsible for accepting agreements and can enroll their team in additional Apple Developer Programs. The Agent is also the only member that can submit an app for review to Apple.|
|Admin||Admins can invite members, approve Certificate signing requests, register App IDs and Device IDs, and create Provisioning Profiles.|
|Member||Members can submit Certificate signing requests, and download Provisioning Profiles.|
Our class is registered to the University Program, which allows us to develop apps for educational purposes at no cost, but does not allow any distribution.
I am the Team Agent, and have generated a Certificate using my Key as identification. I registered a wildcard App ID for use in the class, and have generated a Provisioning Profile linking the Certificate to the App ID.
You will all be Team Members.
- Register an account as an Apple Developer.
- Accept my invitation as a Member of Concordia University (Design and Computation Arts).
You will e-mail me your Device IDs and I will add them to the list of authorized devices on our account.
- Locate your Device UDID.
- E-mail it to me along with the device model you own, for example: iPhone 3GS.
Once I have added all the devices, I will add them to the Provisioning Profile. To keep things simple, we will all share the Certificate and Provisioning Profile I will generate.
- Download and double-click the archived Key and Certificate. This will add the right entries to your Keychain. I will give you the required password in class.
- Download and double-click the archived Provisioning Profile (link coming soon). This will add the Profile to Xcode and automatically upload it to your phone when plugged in.
If you’re doing this on one of the computers in the lab, you will have to re-download both archives every time you log in as the machines are wiped out daily.
Running on a Device
- Open one of your projects in Xcode.
- Plug your iOS device in the computer.
- Select the device from the scheme menu at the top.
- Make sure the correct profile is selected in the Code Signing section of the Build Settings.
- Build and run your app.