Search Unity

Unity + Xcode 5 Developer Preview and iOS 7

Discussion in 'iOS and tvOS' started by fraques, Jun 11, 2013.

  1. fraques

    fraques

    Joined:
    Aug 9, 2012
    Posts:
    8
    Has anyone tried to build Unity apps for iOS 7 with the preview of Xcode 5? Does it work out of the box?
     
  2. PuriPuri

    PuriPuri

    Joined:
    Apr 19, 2009
    Posts:
    30
    Unity 4.1.5f1 (latest version) projects do not compile with XCode 5 -- I tested with a near-empty project as well as complex projects with multiple native Objective-C plugins. I'd wait on updating until Unity issues a fix.

    EDIT

    Projects do actually compile and deploy properly -- it just takes about 5 minutes to compile one of the dll files -- this may get faster as newer builds of Xcode 5 get issued.
     
    Last edited: Jun 12, 2013
  3. agentsmith

    agentsmith

    Joined:
    May 1, 2010
    Posts:
    132
    Yea I tested with 4.1.3f1 and xcode 5 didn't work for me either... However I was able to compile my game in the current release of xcode and test on ios 7.
     
  4. fraques

    fraques

    Joined:
    Aug 9, 2012
    Posts:
    8
    Thanks PuriPuri and agentsmith for your replies! I will try you method, agentsmith!

    Cheers
     
  5. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,855
    Please post more details on what errors do you get and what OSX version do you use.
     
  6. DuncanMJA

    DuncanMJA

    Joined:
    Jul 18, 2012
    Posts:
    3
    Is a unity engineer able to say whether you're planning to update 3.x too?

    Apologies but I'm assuming the issues will affect both versions as I'm not able to take the leap and test it out.

    TIA
     
  7. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,855
    To properly answer to this question we need at least one detailed issue report. So far we haven't received one (if you have your case number please PM me). And please keep in mind that new Apple tools are very early developer previews and are subject of further improvement in nearest future.
     
  8. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,382
  9. PuriPuri

    PuriPuri

    Joined:
    Apr 19, 2009
    Posts:
    30
    I just tried to compile again and evidently I didn't wait long enough -- it took about 6 minutes for the compiler to compile mscorlib.dll.s but it did eventually.

    On Xcode 4x the build would take about 15 seconds, so something is definitely different, but it does actually build and deploy properly to an iOS 7 device from Unity 4.1.5f1! I'll still submit the bug report.

    EDIT

    Should also add that installing the command line tools in Alexey's post likely fixed the problem. Xcode will appear to hang when compiling but it should work after 5 to 6 minutes of working on mscorlib.dll.s

     
    Last edited: Jun 12, 2013
  10. CatchCo

    CatchCo

    Joined:
    Nov 27, 2012
    Posts:
    17
    I'm seeing the same 5 minute build times for mscorelib, so nothing new to report there. I was able to build and debug my app.

    Something else I've noticed, though, is that backgrounding the app and then returning to it seems to lower the framerate dramatically. I know this is all Beta software, but i'm wondering if anyone else is seeing this?
    Hmm never mind, I can't seem to reproduce this behavior anymore. The overall framerate of my app is down in iOS7 but i'll investigate a little more.
     
    Last edited: Jun 12, 2013
  11. shaddadjr85

    shaddadjr85

    Joined:
    Jul 28, 2012
    Posts:
    13
    I am trying to use Xcode 4.6.2 to build for iOS 7, but it doesn't list my phone as a devices it can build to. In Organizer - Devices it says this "The version of iOS on “XYZ's iPhone” is not supported by this installation of the iOS SDK. Please restore the device to a version of the OS listed below, or update to the latest version of the iOS SDK" Is there something in addition I need to do to build? I haven't tried with XCode 5 yet.
     
  12. CatchCo

    CatchCo

    Joined:
    Nov 27, 2012
    Posts:
    17
    You must use XCode 5 Developer Preview to build for iOS7. Good thing is that it installs along side of the current version of XCode.
     
  13. PuriPuri

    PuriPuri

    Joined:
    Apr 19, 2009
    Posts:
    30
    On a somewhat-related note, it looks like iOS 7 will support external game controllers now. Hopefully the Unity guys can tie it into the Input class ASAP. :)
     
  14. SL-Paul

    SL-Paul

    Joined:
    Sep 20, 2012
    Posts:
    8
    Hope Unity will support Bots in XCode 5

    1) continuously builds

    2) nightly bots with app archiving

    3) code control
     
  15. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,855
    It's a bug in Xcode 5 toolchain. We are submitting bug to the Apple.
     
  16. CatchCo

    CatchCo

    Joined:
    Nov 27, 2012
    Posts:
    17
    @Mantas, cool, thanks for the update. I have a feeling that there will be a lot of these temporary bugs prior to iOS 7 being released. Should we open up a sticky thread for these issues or tag iOS 7 beta related forum posts in any way?
     
  17. mattssonon

    mattssonon

    Joined:
    Mar 13, 2013
    Posts:
    4
    I have Xcode 4 and 5 installed, and Unity automatically tries to open Xcode Projects in Xcode 5 when using Build and Run, does anyone know how to change this?
     
  18. musikit

    musikit

    Joined:
    Jan 30, 2012
    Posts:
    160
    xcode 5 on install most likely changed the mime type or metadata to open .xcodeproj files with it instead of xcode4. you most likely have to manually reset it. though i forget where.
     
  19. ivomarel

    ivomarel

    Joined:
    May 4, 2012
    Posts:
    6
    Of course you can just build it without running it and open the proj-file with Xcode 4 - that's what I do right now ;)
     
  20. PuriPuri

    PuriPuri

    Joined:
    Apr 19, 2009
    Posts:
    30
    Just tried building a Unity 4.1.5f with the today's Xcode 5 Developer Preview 3 and it now compiles projects as fast as Xcode 4 did -- it can now be used to test without having to wait five minutes for it to compile! :D

    There is a new problem though: on my iPhone 5 running iOS7 beta 3 the text from the status bar (and battery status icon) is being overlaid on top of the Unity GL view...This didn't happen with earlier betas, nor with iOS 6 and below (AFAIK) :(
     
    Last edited: Jul 9, 2013
  21. n8

    n8

    Joined:
    Mar 4, 2010
    Posts:
    147

    I get this same bug, but i was getting on beta 2 as well. I would love to be able to figure out how to hide that during gameplay.
     
  22. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,382
    It is fixed for 4.3
     
  23. n8

    n8

    Joined:
    Mar 4, 2010
    Posts:
    147
    Awesome! any idea when we might be able to get our grubby hands on it?
     
  24. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,382
    when 4.3 is out? 8-P
    The point is - it is not a serious enough bug to consider fixing it in 4.2 (as in - we kinda expect to ship 4.3 before ios7 goes public).
     
  25. n8

    n8

    Joined:
    Mar 4, 2010
    Posts:
    147
    Alexey you are right, it is very much not a big enough deal to fix right now. In fact a quick search in the dev forums for iOS 7 (obviously you must be a registered dev) will give you some easy to implement solutions to get you through the beta.

    As you all should know, I cannot post the fix here, if you are a registered apple dev and can't find what I am talking about PM me and i will send you the link.
     
  26. deekpyro

    deekpyro

    Joined:
    Oct 16, 2012
    Posts:
    57
    I am having an issue getting the latest preview of Xcode5 to work with Unity 4.2. When building the project Xcode5 launches but Unity can't seem to connect with it. Here's what the console spits out:

    I have the latest command line tools installed too. Any ideas?
     
  27. SpiriTx

    SpiriTx

    Graphics QA Unity Technologies

    Joined:
    Apr 12, 2012
    Posts:
    251
    Build run is broken right now. Use build and when open project yourself instead.
     
  28. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    347
    Any update on building to iOS 7?
    I've got two updates finished for the 'old' iOS, unity, Xcode etc Not sure whether to risk it.
     
  29. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Maybe this might help.

    I've just had an App Rejected because it crashed on iPad (3rd Gen) running iOS 7.0. I had no way of testing it for iOS 7 because it wasn't out.

    I'd make sure that your updates work with iOS 7 before submitting.
     
  30. hermesdavidms

    hermesdavidms

    Joined:
    Jul 3, 2012
    Posts:
    181
    i built angrybots with Xcode 5 and tried it with my ipad 2 with ios 7 and no problems what so ever
     
  31. WarbladerToo

    WarbladerToo

    Joined:
    Nov 2, 2009
    Posts:
    96
    What Unity version do you use?
     
  32. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    I used 4.2.1f4
     
  33. UVMarko

    UVMarko

    Joined:
    Sep 22, 2013
    Posts:
    9
    To hide the status bar simply add "View controller-based status bar appearance" and value NO to the info.plist
     
  34. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    'Build and Run' or 'Build and Open Project' (as per SpiriTx three posts back)?

    As we've learned over the many years and many updates to everything and anything Apple, I've become trigger shy.
     
  35. _Max_

    _Max_

    Joined:
    Feb 21, 2013
    Posts:
    160
    iOS7 has gone public, am I missing something here. So you will not be releasing a patch version 4.2.2.
    I assume you working on 4.3 Beta? With a few limited people testing this. I hope it comes out soon as really some small issues need be resolved.
    Could have had one small release before 4.3 final. Also this would resolve some Android bugs as well.
    Reason I'm pushing is because your timing is so bad, no one in company know when iOS7 be official, all the public did.
    Easily could have got more publicity aswell - piggy back on the iOS7 launch, but marketing team if one exists, did not think of this.
     
  36. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    I just did a quick build of my project to the iPad Mini; you can indeed build from iOS Pro 4.2.1f4 with Xcode 5 deployed to iOS 7.0, but as noted Unity will fail to connect to Xcode 5, so you have to open the project manually and run it (I just used Open Recent...).

    Good deal then.
     
  37. NoseKills

    NoseKills

    Joined:
    Jun 4, 2013
    Posts:
    25
    You're missing the fact that the quotation is 2 months old :)


    Just tried with 4.2 and XCode5. Works OK indeed if you manually run the .xcodeproject
     
  38. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    I'm on 4.2 and XCode 5 - I run the app manually in Xcode but it freezes on the unity splash screen on my iPad Mini with OS7 - Any Thoughts?
    -rich
     
  39. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,855
    Look at the Xcode debugger console for error messages and stack traces.
     
  40. IQpierce

    IQpierce

    Joined:
    Jan 24, 2011
    Posts:
    43
    So the Unity devs' answer above was "Build Run for iOS 7 is fixed, but we won't bother to put it out yet... we'll just put it in 4.3 because that will be out before iOS 7 anyway."

    Now iOS 7 is out aaaand my workflow for Unity->iOS is F***ed by this.

    So. Any chance of a minor 4.2 update that has this fix? Or at least a release date for 4.3 so we know how long we have to put up with this problem?
     
  41. IQpierce

    IQpierce

    Joined:
    Jan 24, 2011
    Posts:
    43
    This is continuing to derail my workflow significantly, every day. Sure would be nice if a dev would answer my question above!

    If this was fixed as one Unity dev claimed, why isn't it available now in a minor update? Why are we having to wait for 4.3 for this?
     
  42. alok1974

    alok1974

    Joined:
    Jul 24, 2013
    Posts:
    1
    Just to add quickly, I was able to compile and run on ios 7 - iPad using xCode 5. Just build and clean once you get the errors. The next time it compiles and runs, Had no issue at all. Btw I am using Unity 4.2.
     
  43. IQpierce

    IQpierce

    Joined:
    Jan 24, 2011
    Posts:
    43
    That's a good reminder, but isn't my concern here. My concern is that my workflow is much much worse.

    I can't hit "Build Run" and trust everything to happen on its own, I have to watch the process and baby-sit it, and perform several steps manually that were previously done automatically. It's a pain, and it leads to more human error in the process of building testing. But my biggest concern is that it breaks my "flow" as a developer, which is anathema to productivity.
     
  44. Dgizusse

    Dgizusse

    Joined:
    Feb 1, 2012
    Posts:
    30
    Looks like ADInterstitialAd is broken. It won't un-pause the game when the ad is closed.

    Here a simple way to test it:
    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class iAdSample : MonoBehaviour {
    5.  
    6.   public Transform t;
    7.  
    8.     private ADInterstitialAd iAdFullScreenView = null;
    9.  
    10.     // Update is called once per frame
    11.     void Update () {
    12.         t.Rotate(1.0f, 1.0f, 0.0f);
    13.     }
    14.  
    15.     void OnGUI() {
    16.         if (GUILayout.Button("PreCache")) {
    17.             iAdFullScreenView = new ADInterstitialAd();
    18.         }
    19.  
    20.         if (iAdFullScreenView != null  iAdFullScreenView.loaded  GUILayout.Button("Show Ad")) {
    21.             iAdFullScreenView.Present();
    22.         }
    23.     }
    24. }
     
  45. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,855
    What's your case number?
     
  46. Dgizusse

    Dgizusse

    Joined:
    Feb 1, 2012
    Posts:
    30
    I've just reported it (minutes ago, after posting here) using the in editor bug reporter so I'm not sure how to find the case number.
     
  47. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,855
    You should receive e-mail with it.
     
  48. Dgizusse

    Dgizusse

    Joined:
    Feb 1, 2012
    Posts:
    30
    Yup, got it:
    Case number 568643
     
  49. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,855
    Found it, thanks!
     
  50. IQpierce

    IQpierce

    Joined:
    Jan 24, 2011
    Posts:
    43
    I just wanted to update this thread to point out that the latest 4.2 update (4.2.2 I think?) added this and XCode 5 is now launched fine by Unity. The devs got me grumbling at them above - so now they get me thanking them heartily for putting out this fix!

    I'm glad they didn't hold this back for 4.3! I can't wait for 4.3 though, hope it comes soon!
     
unityunity