Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

iOS and MacOS / Setting up AGK for iOS with Lion/XCode 4

Author
Message
PaulTR
12
Years of Service
User Offline
Joined: 25th Oct 2012
Location: Fresno, CA
Posted: 22nd Dec 2012 21:15
I found AL's post from a while back and these instructions:

• Copy the entire IDE folder from the AppGameKit 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 "Validate Settings" in the middle at the bottom of the interface and click on "Perform Changes" in the popped up dialog (it's up to you whether you enable or disable automatic snapshots in the next pop up)
• Click on the folder icon under tab-like thing with label "agkinterpreter.xcodeproj"
• To rename the basic project:
⁃ Click on "agk_interpreter, 1 target, iOS SDK 5.1" 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 AppGameKit 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
⁃ 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'
⁃ 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


but I'm getting stuck on "Quit the application and collect the byte code and media files you sourced at the start of this guide" as I didn't see an instruction to move code or media files at the beginning. Any help on where I can find these so I can continue along? Thanks!
PaulTR
12
Years of Service
User Offline
Joined: 25th Oct 2012
Location: Fresno, CA
Posted: 22nd Dec 2012 23:05
Scratch that, I found this post and watched the video, and it helped me out a ton.

http://forum.thegamecreators.com/?m=forum_view&t=202262&b=41

Now I just need to look up how to turn it into a landscape application :p
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 22nd Dec 2012 23:26 Edited at: 22nd Dec 2012 23:26
i remember there were some issues with landscape on xcode4 and ios6.

have these been solved in the latest beta?
PaulTR
12
Years of Service
User Offline
Joined: 25th Oct 2012
Location: Fresno, CA
Posted: 23rd Dec 2012 09:21
I've got it turned to landscape, but the splash screen (Default.png) comes up in portrait. I'm still trying to figure out how to include external headers and .m files. When I copy over what I used for Android and change .cpp to .m, it crashes.
PaulTR
12
Years of Service
User Offline
Joined: 25th Oct 2012
Location: Fresno, CA
Posted: 23rd Dec 2012 09:44
Got the game up and running now. Just need to figure out the splash screen now. On the iPad sim it's too large and only shows a portion, on the iPhone sim it's in portrait rather than landscape.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jan 2013 15:58
Are you using AGKSplash.png? That is now a 'deprecated' method. But, if you want to keep using it, just create your landscape image and then flip it to portrait.

There are also ways to tell iOS to start in Landscape mode. I can help more later (my app only works in landscape), but I just got back from vacation and am busily catching up. (And the buzzer just went off on the washer.)

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 2nd Jan 2013 21:26
just got my new macbook with Mountain Lion and installed the very latest version of Xcode 4.5

Now I need to copy over the latest AppGameKit folder and find a suitable template from somewhere!!!!

I know that submitting with the latest 1085 will cause a rejection because of the twitter api. Were there any good news on this?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jan 2013 22:00
You can get good templates from the AGK Wiki Templates page. It has both v1076 and v1085 iOS templates. I have not been able to get v1085 to compile properly in Xcode, yet.

If your Macbook can see your Windows computer (via your common network), just copy the IDE directory from the Windows computer to the Macbook and delete the following directories from your Macbook (they are not needed for building):
1. Compiler
2. Editor
3. Help
4. Utilities

If you cannot 'see' your Windows computer, zip up the IDE directory from your Windows machine, put it on a thumb drive, unzip on your Macbook and delete the directories above (if you included them in your zip file).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Jan 2013 13:03
i will share my windows directory and copy everything, its faster that way.

i am using xcode 4.5 and agk 1085, so i am worried!

what are the xcode 1085 templates for ios on the wiki, if they don't compile?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jan 2013 16:32
The ones on the Wiki do compile.

I just don't have ones for Mac templates. The iOS ones work.

And they were done with Xcode 4.5, so you should be fine.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Jan 2013 22:26
thanks AL i'm only interested in ios not mac apps

i plan to set this up tomorrow unless i get new PS3 games in the mail!!!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jan 2013 22:42
Excellent!

Have fun!

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 4th Jan 2013 08:43
beta6 is out, just in time so that i can install the new version!!!

i suppose the 105 template will work unchanged, how many things could they possibly have changed in the template itself?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 4th Jan 2013 16:11
Part of what is in the templates are AppGameKit specific files that may change for each version.

If I have time today, I will download v1086 and compare the files in question.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Jan 2013 14:32
tried to set it up but i got an error related to facebook, even though the facebook framework was included in the project
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Jan 2013 17:14
My understanding is that the facebook sdk got scrambled when they zipped it. Paul (I think) posted a clean one in the 108 beta thread stickied at the top in AppGameKit Product Chat (I think).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Jan 2013 17:40
AL, yes now it worked fine with the latest FB zip from Paul!

I used your 1085 template with the latest xcode4 + agk 1086

the google & twitter frameworks were included in 2 places don't know why so i cleaned up a bit the project structure.

also, did you include the storekit framework yourself, or maybe we can expect some gamecentre commands soon?!!!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Jan 2013 18:02
I'm not sure about the StoreKit framework. I may have added it based on instructions somewhere. But I don't remember. The v1085 template has a lot more frameworks than the v1076 template.

PaulTR has a stickied thread about game centre.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Jan 2013 22:06
AL that thread does not contain step by step instructions how to set up gamecenter in the standard template... too bad. we will have to wait for tgc to put in gamecenter commands

Login to post a reply

Server time is: 2024-11-21 13:37:07
Your offset time is: 2024-11-21 13:37:07