Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
played with xcode 4.5 and ios6 — Gideros Forum

played with xcode 4.5 and ios6

alexzhengalexzheng Guru
edited September 2012 in Bugs and issues
I have just played with the lastest iOS sdk and xcode.

1. the minimal deployment target has change to 4.3, it is said armv6 is deprecated.
2. autorotation setting did not work.

Maybe some modification is needed for gideros.

Comments

  • I think yes one application of mine rejected because of this reason any idea


    We found that your app crashed on the iPad, running iOS 6, which is not in compliance with the App Store Review Guidelines. Your app crashed on both Wi-Fi and cellular networks immediately after launch.
  • Looks like there's problem with Gideros on iOS 6?

    Hopefully this issue could be handled soon, we will push our first game using Gideros in near future.
    have fun with our games~
    http://www.nightspade.com
  • atilimatilim Maintainer
    Accepted Answer
    I also want to release a new version in a week after testing on iOS 6. @talis, did you build your project with Xcode 4.5? also did you use iAds?

    @alexzheng Btw, moving to Xcode 4.5 means you cannot use arm6 anymore. If you want to continue to use arm6, you should stick with Xcode 4.4.1. I'll also look at autorotation issue.

    @all if you're about to release a new game, don't move to Xcode 4.5 (until we release the new version).
  • @atilim cool, thank you for informing us. We wont move to Xcode 4.5 yet.
    have fun with our games~
    http://www.nightspade.com
  • I also want to release a new version in a week after testing on iOS 6.
    @Atilim - will the new version have options for iPhone 5 / new iPod touch resolutions both standard and retina? (ie 320x568 and 640x1136)

    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
  • atilimatilim Maintainer
    edited September 2012
    uhh.. I almost forgot to add the new resolutions. Let me add it now :)

  • @atilim, if you are looking in the area of autorotation on IOS and you have time (??) could you take a look at the problem that was brought up in this thread?

    The issue is that the UI layer doesn't come up in the right orientation when using the player; one has have autorotation turned and to rotate the device back and forth to get it to recognise the orientation change when starting an app in the player.

    I think it works okay in a deployed app so it's not that serious - it's just a bit annoying when debugging.

    best regards
  • atilimatilim Maintainer
    edited September 2012
    I see. I've searched a way to force UIViewController to call shouldAutorotateToInterfaceOrientation manually. This is the only way I've found: http://goodliffe.blogspot.com/2009/12/iphone-forcing-uiview-to-reorientate.html (tl;dr remove the view and add again)

    But, I'm a bit hesitant about adding this workaround. Let me search more if there is a better way.
  • @atilim, if you're in the slightest doubt it might break something, then defer it to another version when you have more time for testing. I just thought it might be an easy fix.

    Likes: evs

    +1 -1 (+1 / -0 )Share on Facebook
  • atilimatilim Maintainer
    Let me postpone it to another version. I was aware of this problem but couldn't find a good way previously.
  • bowerandybowerandy Guru
    edited September 2012
    Okay, good. Anyway, I can give it some testing for you. I added the following to my init.lua right after the set up for Wax.
    -- Temporary fix for the issue of device orientation when operating under the Gideros player.
    -- <a href="http://www.giderosmobile.com/forum/discussion/1737/played-with-xcode-4.5-and-ios6#Item_8" rel="nofollow">http://www.giderosmobile.com/forum/discussion/1737/played-with-xcode-4.5-and-ios6#Item_8</a>
    -- Fix is from:
    -- <a href="http://goodliffe.blogspot.co.uk/2009/12/iphone-forcing-uiview-to-reorientate.html" rel="nofollow">http://goodliffe.blogspot.co.uk/2009/12/iphone-forcing-uiview-to-reorientate.html</a>
    --
    local window=UIApplication:sharedApplication():keyWindow()
    if window then
    	-- If we are running as a standalone app then (window) will be nil.	
    	local view=toobjc(window:subviews()):objectAtIndex(0)
    	view:removeFromSuperview()
    	window:addSubview(view)
    end
    I can confirm that, it appears to work as expected.

    best regards

    EDIT: I noticed that the original version of this fix would only work in the Gideros player and would crash any standalone exported app. I guess this is because the key window is not available right at the start. Still, providing you have AutoRotation turned on for your project, standalone apps will get their orientation correct anyway. Hence the fix (that I've made in the code above) is to first check that the key window is not nil before using it.
  • atilimatilim Maintainer
    edited September 2012
  • bowerandybowerandy Guru
    edited September 2012
    OFFTOPIC: You know, for years (!) when I was writing the image picker plugin, I thought the native image picker controller would only work in portrait mode on the iPad. I wrote a load of autorotation code in Gideros to ask the user to rotate the device before bringing up a picker. I evet thought about writing my own ObjectiveC picker instead of using the built-in one.

    Anyway, it turns out that this was all caused by a misconception brought about by this bug. The native picker *does* work in landscape. With the above fix, a landscape image picker works fine:

    image

    best regards

    Likes: atilim

    +1 -1 (+1 / -0 )Share on Facebook
  • I have rebuilded some games with xcode4.5, No other big issues come out.

  • talistalis Guru
    edited September 2012
    @atilim i submitted my application with Gideros version 2.2.2 it was an old version.

    I didn't use iads and my xcode version is the latest one. I am using a macincloud computer they are always keeping up to date all programs but let me check and tell me xcode version also, just to be in sure it is the latest.

    Now i will recompile with the newest Gideros Bulit and try.
  • So basically it means, if you want to support Iphone5/ IOS 6, you need to drop supporting Iphone to Iphone 3g and Ipod 1 and 2 generation, which are based on armv6?
    Or older xcode as 4.4.1 will also run on Iphone5/ios6?
  • atilimatilim Maintainer
    edited September 2012
    > older xcode as 4.4.1 will also run on Iphone5/ios6?
    It should. There are many applications on App Store build with Xcode 4.4.1 (or earlier).
    I think upgrading to Xcode 4.5 is not (should not) necessary to support iPhone 5/ iOS 6.
  • alexzhengalexzheng Guru
    edited September 2012
    Yes,after upgrade to iOS6, the game build with xcode4.4.1 and ios sdk5.1 still run on my device.

    Likes: atilim

    +1 -1 (+1 / -0 )Share on Facebook
  • RickyngkRickyngk Member
    edited October 2012
    I'm using xcode 4.5

    For autorotate for iOS6, this is my approach:

    + In AppDelegate.m, replace
    [self.window addSubView:self.viewController.view]
    by
    [self.window setRootViewController:self.viewController]
    + ViewController.m, add
    - (BOOL) shouldAutorotate
    {
        return YES;
    }
     
    -(NSUInteger)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskLandscape; //my game support landscape only
    }
    However, there's an issue. If my device is in portrait when game launched, my game keep in portrait until I rotated device :D
    -- Updated: add
    application.statusBarOrientation = UIInterfaceOrientationLandscapeRight;
    to force app run in landscape when launched @.@
    https://devforums.apple.com/message/733673#733673

    For iOS6 device, Xcode 4.5 support fps measuring, see in Debug Navigator tab

    http://stackoverflow.com/questions/12520030/how-to-force-a-uiviewcontroller-to-portait-orientation-in-ios-6/12522119#12522119
    http://stackoverflow.com/questions/12537541/supportedinterfaceorientations-method-not-working-on-ios-6-uiviewcontroller
    http://stackoverflow.com/questions/12447552/ios6-supportedinterfaceorientations-not-working-is-invoked-but-the-interface-s
    http://www.cocos2d-x.org/news/73

    Likes: phongtt

    +1 -1 (+1 / -0 )Share on Facebook
  • Where does this line go?

    application.statusBarOrientation = UIInterfaceOrientationLandscapeRight;

    Thanks
  • atilimatilim Maintainer
    @Tom2012 we already support autorotation for iOS 6 with 2012.09. You don't need to add this line anymore.
  • alexzhengalexzheng Guru
    edited October 2012
    hi @atilim, is autorotation support for portait orientation project?
    I tried with example project jumping ball, it does not work.
    And for landscape project, it works now.
  • ar2rsawseenar2rsawseen Maintainer
    edited November 2012
    Yes,after upgrade to iOS6, the game build with xcode4.4.1 and ios sdk5.1 still run on my device.
    Yes but for example I can't launch an app from 4.4.1 xcode on IOS6, so I can practically only debug apps on older xcode using IOS 5.1

    If older apps on Appstore will run on IOS 6, there must be a way to test apps from 4.4.1 xcode on IOS 6, isn't there?

Sign In or Register to comment.