For this whole book I have been discussing things that I assume you already know about, such things as provisioning, deploying, and so on; things that are not part of GameSalad but are an integral part of iOS development. In this appendix, we are going to discuss some of the very basics of iOS development, things such as:
Following is a screenshot, which shows the screen after registration:
First off, let's start with becoming a registered developer, go to www.developer.apple.com, scroll down, and find the section that says Join the iOS Developer Program and click on it.
On the next page, you will see a button at the top that says Enroll Now for $99/year, this is the standard rate for individual developers, as shown in the following screenshot:
The important fine print for business owners at the bottom states:
"*Business Requirements: The person enrolling on behalf of the company or organization must have the legal authority to bind his or her company to any legal agreements that may be presented during the enrolment process or membership year. This person may also need to provide business documents including, but not limited to Articles of Incorporation, Business License, etc. as part of our identity verification process. Technical Requirements: You must have an Intel-based Mac running Mac OS X Snow Leopard or later to develop and distribute iOS and Mac OS X apps."
You cannot sign up as a Business with Sole Proprietorship; if you select this, you will be spending about five days e-mailing Apple only to find out that they cannot process your request because you do not meet the Business account requirements. So, for now, we are just going to sign up as an individual.
On the next page, you will be asked to either use your previous Apple ID, or to create a new one. If you have one sign in, if you don't, you can create one right now. You will next be asked if you want to create an Individual or a Business account. Let's choose Individual. Now, all you have to do is fill in your information, pay for it, and wait for the e-mail from Apple saying your account is active. After that, go to www.developer.apple.com/iphone and log in, then scroll down and download Xcode, as shown in the following screenshot. You will need this to install the GameSalad Viewer app on to your phone.
If you are still on the iOS Dev Center page, locate the navigation bar on the side, and find the button that says iOS Provisioning Portal. Click on it.
You will now be taken to the Provisioning Portal; from here, you can create development profiles and distribution profiles. The first thing you are going to do is click the Certificates button on the side bar, and create your own Certificate. To do this, follow the following guide:
To request an iOS Development Certificate, you first need to generate a Certificate Signing Request (CSR) utilizing the Keychain Access application in Mac OS X Leopard. The creation of a CSR will prompt Keychain Access to simultaneously generate your public and private key pair, establishing your iOS Developer identity. Your private key is stored in the login Keychain by default, and can be viewed in the Keychain Access application under the 'Keys' category. To generate a CSR:
This is going to get pretty technical. If you are having a hard time following it then slow down, take your time. Once all this is set up, you won't have to do it again (at least not until your developer certificates expire, which is usually after one year)
Applications
folder, open the Utilities
folder and launch Keychain Access. 2048 bits
for the Key Size and RSA
for the Algorithm. Click Continue.Now, we have to submit the certificate that we just created; from here on everything should be smooth sailing. Following is what we have to do:
Just to clarify everything, in this case, because you are the sole owner of the developer profile, you are the Team Member and Team Admin. You will be the one who is requesting all profiles and certificates, and you will be the only one who will accept or reject any profiles (that is unless you have more than one developer on your profile, then you can set them as a Team Member or Admin).
Now, it's time for us to make use of the certificate we created, we are going to install it on our computer.
.cer
file to launch Keychain Access and install your certificate (the same as done previously, but this is your personal certificate).That's all for that part, it's a bit of a long and technical process but it is required. Now that it's done, we can proceed to adding your device, so click the Device button on the side bar, and do the following:
The Devices section of the iOS Provisioning Portal allows you to enter the Apple devices that you will be using for your iOS development. In order to debug your iOS application on an Apple device, a Team Agent or Team Admin must first enter the Unique Device Identifier (UDID) for each iPhone and iPod Touch into the Provisioning Portal. The UDID is a 40 character string that is tied to a single device, similar to a serial number. These UDIDs are included in the provisioning profiles created later. You can input up to 100 devices for your development team.
To find out your device's UDID, simply connect your device to your Mac and open Xcode. In Xcode, navigate to the Window drop-down menu and select Organizer. The 40 hex character string in the Identifier field is your device's UDID, as shown in the following screenshot. Team Members should send this string to their Team Admins for input into the Provisioning Portal.
Alternately, you can connect your device and open iTunes, click on your device in the side bar. For the iPhone, click your Phone Number once, it will change to your IMEI, then click it again and it will display your UDID.
That's it for the devices. As mentioned earlier, you can have up to 100 devices on your account. Beware, there are many websites that you can pay to add your device to their developer profile so you can access all the beta software, this is illegal! As the warning shows in the following screenshot:
YIKES! You may be subject to a criminal and civil liability and I don't think any one would want that to happen.
An App ID is a unique identifier that iOS uses to allow your application to 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. In order to install your application on an iOS-based device, you will need to create an App ID.
Each App ID consists of a unique 10 character "Bundle Seed ID" prefix generated by Apple, and a "Bundle Identifier" suffix that is entered by a Team Admin in the Provisioning Portal. The recommended practice is to use a reversed domain-name-style string for the "Bundle Identifier" portion of the App ID. An example App ID using this approach would be: 8E549T7128.com.apple.AddressBook.
If you are creating a suite of applications that will share the same Keychain access (for example, sharing passwords between applications) or have no Keychain Access requirements, you can create a single App ID for your entire application suite utilizing a trailing asterisk as a wildcard character. The wildcard character must be the last character in the App ID string. Example of an App ID for this situation could be: R2T24EVAEE.com.domainname. or R2T24EVAEE.
For this section, navigate to the App ID section of the Provisioning Portal.
Ok, so that was a really long and confusing section. Don't worry, it's not something you have to do every time you want to create a new provisioning profile, that's just the initial set up. Now let's finish setting up the provisioning profile.
.mobileprovision
file to the proper directory. Alternatively, you can drag the .mobileprovision
file onto the iTunes icon in the dock or copy the file to ~/Library/MobileDevice/Provisioning Profiles
. If the directory does not exist, you will need to create it. Click on the + button in the Provisioning section of the Organizer window to install your .mobileprovision
file.Follow the given steps to build and install your app:
.mobileprovision
file paired with it.Re-installing the private key or downloading a provisioning profile with your iOS Development certificate included in it will correct this.
com.wurdindustries.GSviewer
.That's all you need to do for development profiles. You can do the same with distribution profiles, but an app built with one cannot be installed on your device.
As we mentioned in Chapter 11, Metal Mech Part 4 under the Uploading our App to iTunes Connect heading, if your app is all ready for upload, you went through adding a new application in the iTunes Connect (www.iTunesConnect.Apple.com) page, and you have marked your app Waiting For Upload, you can now upload it using the App Loader application found on your computer (/Developer/Applications/Utilities/Application Loader.app)
. You will see the icon as in the following screenshot.
You may run into certain errors when trying to upload things such as invalid provisioning profile or invalid version number. These things are simple to fix, usually you selected the wrong provisioning profile, or the version number is different on the App than the one you specified in iTunes Connect.
If you need any more information the Apple Documentation is always very helpful, and if something didn't work properly you can always contact the Apple Developer Support Hot Line and the people there are very helpful and will help you as much as they can. Go get 'em tiger!
18.221.123.73