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 / Lesson learned the hard way

Author
Message
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th May 2012 19:01
When v1070 came out, I was ready to update my Mac files and did exactly what I would have done in Windows. I simply copied the directories from the zip file to the right place in my AppGameKit directory.

In windows, it would have simply replaced any existing files, without affecting anything that didn't appear in the copied directories.

On a Mac, it completely replaces the directory, wiping out anything you had added since it was originally created.

My game project directory disappeared completely.

It allowed me to go through the steps for setting up an Xcode 4 project and fine tune my instructions, given the changes in the interpreter.cpp file.

So, if/when you update your Mac AppGameKit setup, copy any of your project directories to somewhere above AGK/IDE and AGK/Projects.

Once you've updated your basic AppGameKit setup, you can copy your projects back. Then do the following (for Tier1 projects):
1. replace the 'UntitledViewController.m' file in your Classes subdirectory with the one from the new interpreter_ios
2. add the line '#define STANDALONE' as the third line in the 'interpreter.h' file

It doesn't appear that you need to do anything for Tier2.

In both tiers, make sure to clean your project and rebuild it.

Good luck!

Cheers,
Ancient Lady
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 8th May 2012 23:28
So I'm not the only "stupid" guy in this world!!!!

You can image what kind of words came out of my mouth when this same thing happened to me!!!

So I can really understand your pain!!

Luckily it only took 15 minutes to rebuild the current project at hand!!!!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th May 2012 00:39
Yup, there is a learning curve when working in a new environment. I only started using a Mac (again) a few months ago. I had used one of the original Apple boxes back in the eighties.

I have a lot of 'fun' going between Windows, Mac and Linux boxes.

And it gets even more interesting when coding PHP or Perl (both require a semi-colon, like C and C++, at the end of statement) after spending time in Tier1 Basic, which does not use a semi-colon.

Oh well, it helps keep my brain active and agile.

Cheers,
Ancient Lady
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th May 2012 14:30
Only thing I hate is that VS wants UINT uppercase and Xcode want it lowercase!!!

Is there a fix for this?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th May 2012 17:22
You could try creating a 'mydefines.h' file like this:


And make sure that it is the very first file included in your main app file.

That might work.

Cheers,
Ancient Lady
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th May 2012 18:24
Thanks a lot!!! seems to work!!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th May 2012 18:52
Yup. I just 'installed' v1072 for the Mac and followed my own instructions and it came up with no problems at all.

Cheers,
Ancient Lady
gsdblack
12
Years of Service
User Offline
Joined: 6th Dec 2011
Location:
Posted: 13th May 2012 07:54
I've actually been scared to download v107 because v106 has been going so well for me. For v106 I downloaded the windows version, installed it, put the agk folder on my mac, and used the xcode ios templates to start my project. Ancient Lady do you think I should take the same steps to move to v107? I'm using t2.
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th May 2012 12:59
move to 1073 it seems good
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th May 2012 19:20
I just downloaded 1073 today and haven't installed it on my Mac, yet.

I'm currently doing my Windows box. I'll work on the Mac one tomorrow.

I strongly suggest copying your Tier2 Xcode project directories outside of the Projects path. Then you should be able to do the Mac install and copy the directories back.

Don't delete the outside-Projects directories until you've rebuilt and tested the 1073 version.

I don't know if the templates for Xcode4 have changed from 106. I know the ones for Tier1 did, to fix some directory issues.

I don't have any Tier2 projects on my Mac, but I'll try compiling one of the example ones and see what happens.

Cheers,
Ancient Lady
gsdblack
12
Years of Service
User Offline
Joined: 6th Dec 2011
Location:
Posted: 15th May 2012 02:42
Thanks lady I'll download it tonight n try it out.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th May 2012 16:11
I installed v1073 on my Mac yesterday and Tier1 still works fine.

I was distracted yesterday.

I might try a Tier2 example app today to see if it behaves.

I hope it went/goes well for you.

Cheers,
Ancient Lady
gsdblack
12
Years of Service
User Offline
Joined: 6th Dec 2011
Location:
Posted: 24th Jun 2012 01:47
Ancient Lady, I'm having a problem with v1076 now. I read in another topic that you said
Quote: "3d, I have v1076 working fine in Mac and iOS.

What sort of problems are you having?

Did you download the 1076 zip file?

If you did, did you copy all of the directories to your Mac:
+ Code Snippet

AGK/IDE/apps
AGK/IDE/common
AGK/IDE/platform
AGK/IDE/templates (optional)



And, if you haven't, before you do, remember to copy any of your project directories in AGK/IDE/apps to a directory elsewhere so they don't get lost when you copy the AppGameKit directories. Macs wipe any everything when you replace a directory (unlike Windows which just replaces and adds).

And, having done all the above, did you replace the files in the Classes directory in your project with the ones from the new interpreter_ios/Classes directory? Some have changed since 1074 (I think).

What version of Xcode are you using?"
I followed these steps and now my project wont run. I get his in the output window

Quote: " 2012-06-23 16:57:54.335 Template[236:307] -[EAGLView view]: unrecognized selector sent to instance 0x229fc0
2012-06-23 16:57:54.407 Template[236:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[EAGLView view]: unrecognized selector sent to instance 0x229fc0'
*** Call stack at first throw:
(
0 CoreFoundation 0x35f08c7b __exceptionPreprocess + 114
1 libobjc.A.dylib 0x30186ee8 objc_exception_throw + 40
2 CoreFoundation 0x35f0a3e3 -[NSObject(NSObject) doesNotRecognizeSelector + 98
3 CoreFoundation 0x35eaf467 ___forwarding___ + 506
4 CoreFoundation 0x35eaf220 _CF_forwarding_prep_0 + 48
5 Template 0x0001d568 _ZN3AGK3agk20PlatformSetDevicePtrEPv + 40
6 Template 0x0003fa64 _ZN3AGK3agk6InitGLEPv + 88
7 Template 0x0000387c -[UntitledViewController awakeFromNib] + 284
8 UIKit 0x33aab974 -[UINib instantiateWithOwner:options + 1336
9 UIKit 0x33aad640 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options + 140
10 UIKit 0x3386cb18 -[UIApplication _loadMainNibFile] + 144
11 UIKit 0x338669ec -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden + 256
12 UIKit 0x338202e4 -[UIApplication handleEvent:withNewEvent + 1476
13 UIKit 0x3381fb1c -[UIApplication sendEvent + 68
14 UIKit 0x3381f3b4 _UIApplicationHandleEvent + 6824
15 GraphicsServices 0x35262c88 PurpleEventCallback + 1048
16 CoreFoundation 0x35e9a5cb __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 28
17 CoreFoundation 0x35e9a589 __CFRunLoopDoSource1 + 164
18 CoreFoundation 0x35e8c835 __CFRunLoopRun + 580
19 CoreFoundation 0x35e8c50b CFRunLoopRunSpecific + 226
20 CoreFoundation 0x35e8c419 CFRunLoopRunInMode + 60
21 UIKit 0x33865554 -[UIApplication _run] + 548
22 UIKit 0x33862558 UIApplicationMain + 972
23 Template 0x00002990 main + 88
24 Template 0x00002934 start + 40
)
terminate called after throwing an instance of 'NSException'
"
I left my game folders in the agk when I copied over the new agk folder. Do you think that's the issue? another thing my game folders are in the template folder. Do you think thats part of the as well?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Jun 2012 03:34
Unfortunately, the templates have not been kept up to date.

This thread shows how to build an Xcode app from the templates (lots of edits and things needed): http://forum.thegamecreators.com/?m=forum_view&t=198029&b=41

I haven't watched the video, but the feedback is positive.

Cheers,
Ancient Lady
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 24th Jun 2012 15:03
I just need 1 edit, the opengl init line.

It seems that the templates were not even tested once, I wonder if they are any good at all or built to fully function properly with 1076 without hidden problems!
gsdblack
12
Years of Service
User Offline
Joined: 6th Dec 2011
Location:
Posted: 25th Jun 2012 01:11
thanks, Ancient. I found this link http://code.google.com/p/agk/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=327 that says theres some issue with a method called so I just went back to v 1074.

Login to post a reply

Server time is: 2024-03-28 22:44:59
Your offset time is: 2024-03-28 22:44:59