Here is a the updated (for v1070) version of a portion of the guide for iOS development of Tier1 on a Mac using Xcode 4:
• Copy the entire IDE folder from the AGK installation to your Mac
• On the Mac copy of the files, delete the Compiler, Editor and Help folders
• Navigate to \IDE\Apps\interpreter_ios folder and duplicate it
• Rename the duplicate to your chosen app name (i.e. foo)
• Navigate into this folder and double click on agkinterpreter.xcodeproj (i.e. \IDE\Apps\foo)
• This should launch XCODE (4.3.2) with the iOS application project
• If you want your compiled project to end up in a friendly directory (the default is quite ugly):
⁃ Select Xcode -> Preferences from main menu
⁃ Click on the "Locations" tab/icon
⁃ Click on the "Advanced…" button
⁃ Select "Custom", click on the select list next to it and select "Relative to Workspace"
⁃ Click on "Done"
⁃ Do yourself a favor and click on the "Text Editing" tab/icon and check "Line numbers", this comes in handy later
⁃ Close the Preferences dialog box
• Click on the folder icon under tab-like thing with label "agkinterpreter.xcodeproj"
• To rename the basic project:
⁃ Click on "agkinterpreter, 1 target, <some other text, varies>" next to white right pointing triangle
⁃ In the area to the right, click on "agkinterpreter" under the word "PROJECT"
⁃ Click on "Build Settings" in the header in the area next to that one
⁃ In the far right column, under the heading "Identity", change 'Project Name' from 'agkinterpreter' to the new name of your application (foo) and then press the enter or return key
⁃ In the "Rename project content items?" dialog that pops up, click on the "Rename" button
⁃ Double click on "agk_interpreter" under "TARGETS" (beneath "PROJECTS")
⁃ Type in your preferred name (should be same as project, for simplicity) and press enter/return key
• Now, to rename the application itself:
⁃ Click on the name under "TARGETS" and select "Build Settings" from the set to the right
⁃ Scroll down to the "Packaging" header and open the section, if not already opened
⁃ Double click on "AGK Player" next to "Product Name"
⁃ Type the name you want to use for your app and press the enter/return key
• You probably will want to change the bundle identifier (certainly before you publish):
⁃ Select the target under "TARGETS" and select "Info" on the right
⁃ Double click on "com.thegamecreators.AGKTestApp" and change it to something appropriate for your app. "thegamecreators" should become your indie/company name (no spaces) and "AGKTestApp" should be your application name without spaces
• Select Product > Clean from the main menu (or click {apple}{shift}k)
• Select Product > Build from the main menu (or click {apple}b)
• If all goes well, your application will build successfully
• You can test your new application:
⁃ Select where to run it from the list that appears when you click on the text to the right of the faint right arrow next to "agk_interpreter" near the top of the interface, next to the two buttons (one with a big right triangle and the other with a square)
⁃ Click on the big right triangle
• You should see the AGK Player standby screen on your connected iOS device
• Your connected device could be an iPhone, iPad or 2nd gen iPod
• Quit the application and collect the byte code and media files you sourced at the start of this guide
• The byte code and media files should include the BYC file
• Copy these files into your new project folder
• Rename the .BYC file to 'bytecode.byc' exactly
• From the project project tree to the left, open up your project so you can see your project files
• Right click on the Resources item and select "Add Files to '<your project>'"
• Enter your project folder and select the media and BYC files you added earlier
• Click the ADD button when promoted to add these files to your project
• Modify the interpreter.cpp file to include the 'bytecode.byc' file:
⁃ Make sure the application tree is open, the right triangle next to the project name in the far left column is changed to a down triangle and a list of directory boxes appears
⁃ Open the "Classes" directory
⁃ For AGK v1065:
* Click on 'interpreter.cpp"
* Search for the text 'bytecode.byc' (it should be near line 145)
* Uncomment the line (delete the "//" on the left):
strcpy ( g_pInterpreterByteCodeFile, "bytecode.byc" );
* You can do this by doing a text search for 'bytecode.byc'
* Save the file
⁃ For AGK v1070:
* Click on 'interpreter.h"
* Add the following as the third line:
#define STANDALONE
* Save the file
⁃ All being well, when you click Build and Run you will see your Tier 1 BASIC app appear!
• You can find your final application binary at IDE\Apps\yourproject\Debug\Products\Debug\yourapp
There are other steps to be done to add signing certificates and switch to Release mode.
Cheers,
Ancient Lady