Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog
Main Page About Help FAQ Special pages Log in

StepByStep to iOS

From ShiVa Wiki

Contents

Video

Step by Step Tutorial: From ShiVa to the iOS AppStore

Step 1 - Inside ShiVa

1. From ShiVa in the Game Editor, click on Game->Export and go to the export window
2. In the Export window, name your app (Export Name), Choose a local folder to export to, Select RUNTIME PACKAGE (.stk) and select iOS from the dropdown (This will reduce the filesize considerably due to being specific as to which platform you are creating for. If you choose all, you will be adding an additional 4-5MB or so as per our experience)
3. Hit the Export button and wait for the export to happen (Depending on size of app, this could take a few minutes to an hour!)
4. Copy exported file from your system/folder to the MAC (Assuming you are using Shiva in Windows. If not simply move the exported file to another folder on your mac where you will be doing all the final work. This will make things much easier!)
5. Copy ALL Required Icon Files and Splash Screens to the same folder (It would be wise to add an icon of 57x57 (iPhone), another icon of size 72x72 (iPad) and an icon of 114x114 (iPhone 4 Retina) as well as several versions of splash screens (320x480 - iPhone, 768x1024 - iPad, 640x960 - Retina
NOTE: In this tutorial we will be creating a UNIVERSAL binary that will work on iPhone and iPad. I will not be focusing too much on Retina display, I will just be adding the icon into our final app, thats about it for retina. Also copy over another MASTER ICON as I like to call it, of size 512x512 which will be what is used on iTunes. You will also need 4 screenshots, so copy those as well. Make sure all your Icons look the same or you'll get rejected if they are off.
NOTE 2: Make sure your Splash screens are the same as well (Like not the same as icon, but you can't be having an iPhone splash screen that is waayyyy different than your iPad splash screen.

Here's a quick list of things to copy so you know (NEW APPS ONLY):

Step 2 - UAT (MAC)

1. Now that we have the app copied to the Mac and all required files (Or placed in a new folder where we will be doing all our work), we will start by opening up the Shiva Authoring Tool (UAT)
2. In UAT we will start by creating an iphone development app the same way you would as before, but make sure this time you fill in all required icons and splash screens. SPECIFICALLY


3. Click Build and you will see it go to xCode. Keep the xCode window open, but return BACK to the UAT as we need to now create the iPad version as well. (If you are not doing a UNIVERSAL BINARY then you can skip the next steps as this is specific to a UNIVERSAL binary. The rest of the process however is pretty similar, so you can read through this and use many of the same steps for an individual submission)
4. Back in the UAT select iPad and do the exact same steps as in part 2 from above (UAT Step 1, UAT Step 2, UAT Step 3) but for the iPad. Hit Build and it will take you to xCode again.
5. Once in xCode, close off the iPad version that has been generated as we will no longer be using that.
6. Follow this guide here to build an Universal iOS application.
NOTE: I know it can be confusing at first so I am going to do these things step by step the way that we usually now do it on our end that has worked for us. The steps are a bit of a variation from what is outlined in the wiki but its the same steps pretty much in a different order with some slight additions here and there.

7. First thing that we do on our end here is that we need to go to the FINDER and go to the folder where you compiled the app. You should see 2 folders there, one for iPad and one for iPhone. SPECIFICALLY: APPNAME_iPad.s3dxproj and APPNAME_iPhone.s3dxproj
8. Go into the iPad folder and COPY the file "S3DClient_iPad.a" into the iPhone folder
9. Go back into the iPad folder and go to the Resources folder (APPNAME_iPad.s3dxproj->Resources) and rename "Default.png" to "Default-landscape.png". LEAVE THIS WINDOW OPEN and place it off to the side as we will be using it in our next steps. WE WILL CALL THIS THE IPAD FOLDER FOR THE REST OF THE TUTORIAL.
10. Lets go back to xCode and you should see the iPhone version in the xCode window. In the left side of the window it should say "Groups & Files". Under that section you should see a file that says "S3DClient_iPhone.a". DELETE the REFERENCE to this file by using control+click on your mac and hitting Delete. MAKE SURE you select DELETE REFERENCES and not to delete the file as well. You simply dont want the program to reference this file in the program, you dont want to delete the actual file itself off your computer.
11. Okay so now we are going to add in resources, so once again under the "Groups & Files" section, click on the ARROW next to the "Resources" folder and it should list all the file resources. Specifically you should see: Icon_57x57.png, Default.png, Info_Phone.plist, MainWindow_Phone.xib and S3DMain.stk
12. Now keep the IPAD FOLDER on the right side so you can select files and drag them into the resources section in xCode. DONT DRAG ANYTHING YET, We will do this one file at a time.
13. Click and Drag "Icon_72x72.png" from the IPAD FOLDER to xCode Resources folder (You will see a line in the area you are going to drop the file onto. Drop it anywhere in the RESOURCES folder section)
14. There will be a WINDOW THAT POPS UP! Depending on your Finder window location, you may be covering this window so be careful. It will ask you if you want to copy the files as well to the project folder location. CHECK THE FIRST BOX OFF TO ACCEPT THE COPY OF THOSE FILES and hit the ok/accept button.
15. Repeat step 13 and 14 but now from the IPAD FOLDER copy over "Default-landscape.png"
16. Repeat step 13 and 14 but now from the IPAD FOLDER copy over "MainWindow_Pad.xib"
17. Repeat step 13 and 14 but this time we want to find the "Icon_114x114.png" file which SHOULD BE in the folder one above the IPAD FOLDER (Where we kept all the other icon files). You want to copy that for Retina display over to the Resources list in xCode.

Step 3 - Targeting

1. This next step has 2 parts. xCode has two areas where the next steps take place. A MASTER project area and a BINARY SPECIFIC area. The MASTER project area for targeting of the project can be accessed by clicking Project Menu and then Edit Project Settings (Project->Edit Project Settings). The second area is the BINARY SPECIFIC area and can be accessed by looking under the "Groups & Files" section again on the left side of your window and you will see something called Targets with a bullseye icon (Red icon). Click the arrow beside it and it will show you your application name. USING CONTROL+CLICK on the application name, you will get a sub-menu which you will then select "Get Info". This is the BINARY SPECIFIC part which is EXACTLY where you need to do the steps in the wiki. That is a BIG confusing point because people end up editing the MASTER project area and you should not be touching that. Make sure you have NOT touched the MASTER project area, (You will know because if you go to the MASTER project settings, under "Code Signing Identity" under the "Code Signing" section, it should ALL BE BLANK).
2. In the BINARY SPECIFIC section we will start off with the first option to be changed (This is following the wiki now which is the same steps. Photos can say a thousand words. There is one step here that they dont show in the wiki that will cause issue if you dont know so I will outline that here so not to worry). Select Architectures and choose Standard (armv6 armv7)
3. Make sure Valid Architectures now shows armv6 and armv7
4. IN THE CODE SIGNING SECTION (Code Signing) Make sure the "Code Signing Identity" is your DISTRIBUTION identity and not your development one! VERY IMPORTANT STEP! If you dont have a DISTRIBUTION provisioning profile yet, you need to set it up on your Apple Developer account. I will not go into details on that, I'm assuming you already have it.
5. Under the "Deployment" section near the end, make sure "Targeted Device Family" is set as iPhone/iPad. Right below this make sure the "iOS Deployment Target" is set as iOS 3.2
6. Now comes the confusing part. Under the "Linking" section near the middle you will see the option called "Other Linker Flags". It might be empty or it might say "-all_load" (WITHOUT QUOTES). If it is empty, double click on the textbox next to "Other Linker Flags" and you will see a window pop up. Press the + button and add the following:

-all_load

and hit ok. MAKE SURE THE - (DASH) is there infront and the underscore as well. Refer to the wiki to see what I mean.
7. Next (After closing that previous window to add the "-all_load" command), click on and make sure that the "Other Linker Flags" line is highlighted and at the bottom left of the window you will see a GEAR icon (Bottom left icon) with a little arrow pointing down on it. Press that and it will show a sub menu. On that sub menu select "Add Build Setting Condition" and you will see it load a line that says Any SDK/Any Architecture. Change the Any Architecture part to ARMv6.

8. Next double click the empty box next to the ARMv6 line. It may already have the -all_load command in it, which is fine. We need to have both the -all_load command and you will add the following command as well using the + button:

S3DClient_iPhone.a

NOTE: After adding this command, click and drag it BELOW the -all_load command so that it is in the right order!!! Also if you dont see the -all_load command, go ahead and add it as well. 9. Repeat step 7 and 8 but this time change the Any Architecture to ARMv7 and the command in step 8 change to S3DClient_iPad.a instead.
10. You should now see the screen looking the same as the WIKI. Look at the wiki image and make sure you see:

Other Linker Flags -all_load
Any SDK ARMv6 -all_load S3DClient_iPhone.a
Any SDK ARMv7 -all_load S3DClient_iPad.a

NOTE: IF YOU DONT SEE IT LIKE THIS then you did something wrong. Go back and repeat the steps until you get it right. Dont forget to drag the S3DClient_iPhone.a or S3DClient_iPad.a below the -all_load when you are adding them in the window.

Step 4 - info.plist

1. Okay now close off the target window and lets go back to the Resources section under "Groups & Files" on the left side.
2. Select Info_Phone.plist
3. On the right side will come up several listed items. We will go through what items you need to have.
4. Select the "Icon File" line and hit the + button that shows up beside it to add a line.
5. Name this line "CFBundleIconFiles"
6. Control+click the Icon File line and hit CUT (We basically want to delete that line, but it doesnt have a delete option on the submenu that shows up so I'm just going to CUT it)
7. Control+click the WHITE AREA (Text area) of the "CFBundleIconFiles" line and set the Value Type as Array.
8. Click the CFBundleIconFiles line and an arrow on the left side will show up. Click this arrow so it is pointing down and you will see the + sign change to a 3 line icon.
9. Select the 3 line icon and it will allow you to add a new item to the array.
10. Add the following lines:

Icon_57x57.png
Icon_72x72.png
Icon_114x114.png

Add these to separate lines, so you should have 3 entries inside of CFBundeIconFiles.
10. Next set your bundle identifier. IT CAN BE ANYTHING YOU LIKE HOWEVER MUST BE IN THIS FORMAT: com.YOURCOMPANYNAME.YOURAPPNAME
For example for our first game Melina's Conquest our bundle identifier is: com.gamescorpion.melinasconquest

11. Next go down and make sure your Bundle version is set right. If this is an update, make sure you increment it EX. 1.0.1 If its the first app, you can leave it at 1.0
12. Next go to MinimumOSVersion and set this to 3.2 even if it says 3.0. CFBundleIconFiles only works with 3.2 and above.
13. Next select the line that says "Main nib file base name" and hit the + button beside it and add the following:

NSMainNibFile~ipad

14. Select the new line you made called NSMainNibFile~ipad andin the text area write:

MainWindow_Pad

15. Now we are done, so lets move onto the final build.

Step 5 - Building

NOTE: MAKE SURE That you have set the output to Device and not Simulator (You will see in the top left of the window if it says Simulator or Device. Simply select this dropdown and click on Device) 1. DO NOT HIT BUILD AND RUN!
2. Go to the Build menu and hit Build (Build->Build)
3. It will ask you if you want to save Info.plist, hit YES and let it build. You will get 1 warning about the User supplied UIDeviceFamily key, just ignore it.
4. If everything was done correctly, it should say build succeeded. Lets move to the iPhone directory (APPNAME_iPhone.s3dxproj)where you should now have a file with your app name. It wont say that it is a .app file, but if you control+click it, and hit Get Info, it should say under Kind: APPLICATION.
5. Control+click this app file and we are going to select Compress "APPNAME" and it will create a zip file in the same folder. This is the file that we will be submitting to apple.
6. We are now ready to SUBMIT TO APPLE!

Step 6 - Apple Submission

NOTE: WE ASSUME YOU ARE ALL SETUP FOR ITUNES CONNECT.

1. Go to itunesconnect.apple.com
2. Log in using your developer information
3. Select "Manage Your Applications"
4. On the top left click on "Add New App"
5. For App Name put the name of your application. This is how it will appear in the app store.
6. Enter any SKU number you want, this is your own personal thing, but just put something there that you can refer to. Like an inventory part number.
7. Under Bundle ID you will see your ID with a * next to it most likely. Just select that and you will see a new text box appear that says Bundle ID Suffix. This is where you will be entering your Bundle Identifier that we put in the Info.plist step above. MAKE SURE IT IS THE EXACT SAME or your upload wont work! Go ahead and enter your Bundle Identifier. EX. com.YOURCOMPANYNAME.YOURAPPNAME
8. You should now hit Continue
9. This next part is based on you specifically. When do you want to release it? What price tier do you want? (You can actually setup various price tiers and it will automate sales, but thats outside the scope of this tutorial). Most likely you wont be having a Custom B2B app as this is a game in most cases so you can leave that unchecked. Discount for Educational Institutions is up to you as well. Once you finish just hit continue.
10. Next fill in all the information that is required such as version number, the app description, the categories on the app store that it should be in, keywords people can use to search, copyright info, contact email address, support url, etc. Some neat notes:

11. If all you put all the files in the the same directory (As I outlined above) you should be able to find all the files (512x512 icon, iPhone/iPad touch screenshots 960x640 size, and iPad screenshots 1024x768 size) easily.
12. Hit save.
13. Now you should come to a screen with a yellow status stating "Prepare for Upload"
14. Click on View Details under the Current Version of your app
15. On the screen that shows up on the TOP RIGHT click on "Ready to Upload Binary"
16. The next question will ask you if your app uses cryptography. Most likely you've created a game and dont have any encryption in it, so your answer should be no, however you'll know whether your app uses it or doesn't so I cant really guide you on that. My apps dont so I hit no.
17. The next screen makes sure you have the Application loader and shows you how to use it. Hit continue as I'm going to guide you through the Application loader here.
18. You should now see a screen with a yellow status orb saying "Waiting For Upload". Now we will use the application loader to upload our app.

Step 7 - Upload

1. Open Finder and under "Devices" on the left side select your hard drive "Macintosh HD" or whatever your hard drive is called.
2. Now you should see the Developer folder, go to the following area:

Developer->Applications->Utilities->Application Loader

3. If this is the first time using it, just follow the instructions to connect to your itunes account.
4. Next you should see a drop down allowing you to choose an appliction. You should see the newly created app in that list. Select it and hit next.
5. Choose the ZIP FILE that we created in the previous steps (MASTER STEP 5, step 5) and follow the steps. It should begin uploading. NOTE: A MAJOR ISSUE that comes up many times is the "Application Failed codesign verification" error. You can fix that by following the instructions in this forum post.
6. If all is successful, your app should be uploaded within 30 minutes to an hour and you should now be sitting there WAITING FOR APPROVAL!

Credits

user gamescorpion



Retrieved from "http://www.stonetrip.com/developer/wiki/index.php?title=StepByStep_to_iOS"

This page has been accessed 2,546 times. This page was last modified on 3 August 2012, at 10:30.