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.

AppGameKit Classic Chat / Xcode and iOS 6.0 - stick with Xcode 4.4.1

Author
Message
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 12th Oct 2012 20:28
When I updated my iPad 2 to iOS 6.0, I also let my Mac upgrade Xcode from 4.4.1 to 4.5.1.

This broke orientation control for Tier 1. My very simple app:


When compiled with Xcode 4.5.1, it would report the correct orientation when rotated but the actual display would not change for Tier 1. When compiled with Xcode 4.4.1, it works correctly.

Xcode 4.5.1 is set up to use some of the new view controller functions related to iOS 6.0 and causes some things to behave differently.

The exact same project was used, the only difference was the compiler.

So, for now anyway, I would recommend that anyone doing iOS AppGameKit should stick with Xcode 4.4.1 and continue to keep the Deployment Target at 4.3 (or 4.2). This keeps your app working for all of the iOS versions.

Cheers,
Ancient Lady
AGK Community Tester
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 12th Oct 2012 21:13
TGC should better fix this then.
If the old landscape/portrait method is depreciated, it's better to support the latest Xcode
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 12th Oct 2012 21:24
This is an issue with Xcode, not AGK.

There are some differences in iOS 6.0 that AppGameKit will need to look at since they do provide the UntitledViewController.h/m and there are new elements in View Controllers for iOS 6.0. I tested adding the code the way the Apple Developer site indicated and it made no difference. There is probably some interaction somewhere in the guts of iOS 6.0 that AppGameKit needs to be aware of.

But, since apps built for iOS 4.3 work fine on all the platforms, that is not a high priority (in my mind, anyway).

It is safest to code for the lowest common denominator. You can be sure that Apple is likely to test all submissions for running in the older OS versions.

Cheers,
Ancient Lady
AGK Community Tester
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 12th Oct 2012 23:44
Forget AppGameKit for now.
Is the new way of doing orientation in ios6 backward compatible with older iOS versions?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 12th Oct 2012 23:57
Quote: "Is the new way of doing orientation in ios6 backward compatible with older iOS versions?"

Yup, use Xcode 4.4.1 instead of Xcode 4.5.1.

Cheers,
Ancient Lady
AGK Community Tester
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th Oct 2012 10:11
using 441 is not the ultimate solution. New hardware is coming out all teh time, so we have to keep updating Xcode
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 13th Oct 2012 12:25
The ultimate solution, is that AppGameKit is changed, to use the latest Xcode. Until that is done, we have to use xcode 4.4.1

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
SolusHunter
13
Years of Service
User Offline
Joined: 18th May 2011
Location: Kent, United Kingdom
Posted: 7th Feb 2013 09:44 Edited at: 7th Feb 2013 10:13
Has there been a fix found for the orientation issue yet?

We just installed XCode 4.6.x (because of the ios 6.1 release) and compiled the AppGameKit Player for the first time and found that our 'Landscape only' app (Tier 1) is showing in portrait mode only, and rotating the device does nothing.

We've tried selecting and deselecting various orientation options in XCode but nothing helps.

Using AppGameKit 107 (latest release) if that matters.

Update: Turns out we're using XCode 4.6

DarkBasic Pro 7.7 U77RC7 - AppGameKit 107
Windows 7 x64
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Feb 2013 10:04
I'm not sure if Paul is already aware of this but I'll let him know. Hold the phones...


this.mess = abs(sin(times#))
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Feb 2013 16:06
I just discovered that Xcode 4.5.1 doesn't talk to my iPad anymore, since it upgraded to iOS 6.1. I am in the process of updating my Xcode (Apple is almost as bad as Microsoft sometimes).

Then I'll see if my standard tests still work.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Feb 2013 17:43 Edited at: 7th Feb 2013 18:40
I just tested my Tier 2 orientation projects with Xcode 4.6 on both my iPad iOS 6.1 and iPod Touch iOS 5.1.1.

And they worked properly.

I've attached the project for the Single Orientation test that shows the proper setup, both in the Xcode project and in code, for sticking to one orientation.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Feb 2013 17:46
Excellent AL, thanks for sharing!


this.mess = abs(sin(times#))
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Feb 2013 20:10 Edited at: 7th Feb 2013 20:20
Okay, I just tried a Tier 1 version. The Tier 1 setup is very simple:


It did not work through the Player for either iOS 5.1 or iOS 6.1 device.

It did work as a standalone on the iOS 5.1.

EDIT: I made sure that the .plist file for the Tier 1 landscape had the same settings as the Tier 2 version and this fixed the iOS 5.1 app (it opened and stayed in Landscape Right):


For a general test of orientation, I used the following code:


It works when being run through the Player, the orientation changes and reports appropriately, for both iOS devices.

When run as a standalone app on my iOS 5.1.1 device, it works just fine as well.

When run as standalone on my iOS 6.1 device, it does not change orientation and I get the following message in the Xcode Output Window:
2013-02-07 13:42:18.790 T1 All Orient[776:907] Application windows are expected to have a root view controller at the end of application launch

One of the differences between the Tier 1 and Tier 2 Xcode projects is that Tier 1 uses the EAGLView.m/.h instead of UntitledViewController.m/.h. The include is in Core.h and Core.m.

I tried copying all of the Tier 2 Classes files into the Tier 1 one (changing '#include "template.h"' to '#include "interpreter.h"' where appropriate) and got the same error message and a white screen.

The Tier 2 versions work across the board, without the error message.

When I ran the Player from Xcode, it produced the same error message.

So there is something in the interpreter code or in the Xcode project specific files that needs to connect/create a root display when working on iOS 6.1 devices (and possibly iOS 6.0 as well).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 7th Feb 2013 20:36
i downloaded the 1088 template by AL from the wiki

by default is this set to landscape or portrait?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Feb 2013 21:05
By default it is set to allow all orientations and should start up in the orientation of the device.

Since it only has the one image, a Portrait one, it looks like it is starting in portrait.

On an iPhone and iPod Touch, since the default orientation for that device is assumed to be Portrait, it starts in Portrait and will flip to whatever orientation the device was actually held at when started.

If you need to fix it in one orientation, change the setup in app::Begin and the allowed orientations in the Xcode configurations.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Feb 2013 21:19
I just made the Tier 1 version of all orientations in v1088 from my v1088 iOS Player.

And it worked flawlessly on both iOS devices.

Including returning one on GetResumed() when returned from the background.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Feb 2013 21:45 Edited at: 7th Feb 2013 21:46
I just updated the Core.m file in my V1076 Tier 1 project with some things form the Tier 2 version and it all works perfectly on all iOS devices!

I have attached the file. Place this in the Classes directory for all of your v1076 Tier 1 iOS Xcode projects. Only do this for v1076. Putting in v1088 projects will break them.

EDIT: The posted Core.m also gets rid of the error message mentioned earlier.

It almost fixes the Tier 1 issue for fixed single orientation.

Single orientation on the iOS 5.1 comes up strait away as the correct one and stays there.

On the iOS 6.1, it starts in the correct landscape right, but still changes orientation when the device is rotated.

This can be fixed by editing Core.m in supportedInterfaceOrientationsForWindow. Change UIInterfaceOrientationMaskAll to UIInterfaceOrientationMaskLandscapeRight (or whatever orientation you want to force).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Attachments

Login to view attachments
SolusHunter
13
Years of Service
User Offline
Joined: 18th May 2011
Location: Kent, United Kingdom
Posted: 8th Feb 2013 13:53
Thanks for the detailed information.

The apps we're currently working on are a long way away from distribution, so I'm wondering if the simplest solution at this time is to use the latest 108 beta if that works correctly in XCode 4.6.1.

Is there a release date for a final v108?

DarkBasic Pro 7.7 U77RC7 - AppGameKit 107
Windows 7 x64
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Feb 2013 15:58
I don't know when the final release for v108 is. But there are some basic things (like EditBox) that don't work properly in v1088.

Unless you specifically need something from v108, you are better off sticking with v1076. Simply use the Core.m file I uploaded on my last post, and that fixes the problem for iOS 6.1.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Greenster
19
Years of Service
User Offline
Joined: 3rd Feb 2005
Location: US ©
Posted: 9th Feb 2013 10:46 Edited at: 9th Feb 2013 10:48
Has anyone reported this to Apple? If it's xcode which is broken by the update, as stated here, I'm sure they will want to know about it..

P.S. Isn't it the responsibility of TGC to fix this?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Feb 2013 17:06
Xcode isn't broken. It is the interface to it created by TGC that needed to be updated. And the update I made in the posted file handles the problem.

Quote: "Isn't it the responsibility of TGC to fix this?"

They made the fix in the v108+ files, it just needed to be propagated to the older v1076.

Now that they are aware of it, how would you suggest they get the fix to everyone working with v1076? I posted a file that fixes it.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 09:11:12
Your offset time is: 2024-11-24 09:11:12