Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

iOS8 / XCode6 compatibility

Discussion in 'iOS and tvOS' started by JChilton, Jun 2, 2014.

  1. JChilton

    JChilton

    Joined:
    Jul 25, 2012
    Posts:
    21
    Has anybody had any attempt at upgrading projects and/or breaking everything, or other compatibility issues?

    Or is it too early to know yet?
     
  2. _Carl

    _Carl

    Joined:
    Jan 12, 2014
    Posts:
    5
    I'm upgrading now so will post back with results, although in the keynote they said they were working with Unity and the other big names I don't think Unity will take advantage of Metal until 5?
     
  3. GMM

    GMM

    Joined:
    Sep 24, 2012
    Posts:
    301
    I'm basing this on what Epic Games have said regarding Metal implementation in Unreal Engine 4, their situation regarding releasing new builds must be the same as Unity Technologies.

    There will not be any public builds that support Metal untill iOS8 publicly releases(by this i am assuming the Xcode 6 SDK). Due to a lack of iOS developer validation issues they cannot post a new build to developers that include Metal support as they would be breaking the NDA between Apple and the developer.

    Considering iOS7 launched last September after a similar timed announcement, you shouldn't be banking on there being any third party Metal supported builds out before the ending of July/the start of September. Knowing Unity, this feature will be a part of Unity 5 and any support would not be added untill a major release sometime in the fall or maybe even later.
     
  4. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    I've updated to OS X 10.10, and iOS 8.0, and tried building out my project using Xcode 6.0 beta and boy oh boy I can't figure out what's up... Errors abound!

    I haven't changed anything in the Unity project itself, nor clicked anything else extra in Xcode. This same build worked fine on iOS 7.1, same version of Unity, Xcode 5.1... So I'm not sure if it's just an adjustment that must be made on Apple's end with Xcode, or on Unity's end... I'm so confused haha. I never spend much time in Xcode since Unity makes it all magical and happens great. This is new to me!

    The errors are related to: GLeshelper.mm .... whatever that means, I assume something with OpenGL ES... I've tried automatic in Unity before export... I've tried Open GL ES 2.0 and forced ES 3.0... still... same thing. Both on my iPhone 5 and iPad Air!

    Any light to be shed would be wonderful. If I can help in any way, please let me know!
     
  5. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    We are looking into it(tm) :)
     
  6. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
  7. TDMIsh

    TDMIsh

    Joined:
    May 29, 2013
    Posts:
    9
    I loaded iOS8 on my iPad Mini Retina and OSX10.10 my MacBook. Had some build errors with Unity (but I honestly kind of expected as much, no fault to Unity).

    These have Semantic errors in CMVideoSampling.mm
    sampling->cvTextureCacheTexture = CreateTextureFromCVTextureCache(sampling->cvTextureCache, cvImageBuffer, w, h, GL_BGRA_EXT, GL_RGBA, GL_UNSIGNED_BYTE);
    ...
    GLES_CHK(glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, texData));

    I wouldn't recommend installing on a main development machine just yet, if you have any timely updates you need to work on in the interim. I'm sure there will be some known work arounds shortly.
     
  8. _Carl

    _Carl

    Joined:
    Jan 12, 2014
    Posts:
    5
    Have you tried using Xcode 5 within 10.10? I haven't tested yet but will do shortly.
     
  9. TDMIsh

    TDMIsh

    Joined:
    May 29, 2013
    Posts:
    9
    Actually, I did try that and it still worked however I couldnj't recognize the iPad with iOS8 unless XCode6 was also installed (till ran it with XCode5). My iPad went into recovery mode when I tried to upgrade it, ended up having to restore it as it went into recovery mode, but now seems ok.
    iOS8: Overall recommendation is only install this on a non-essential device for the time being. A few of the third party apps are failing (Google Hangouts, Facebook), overall unresponsiveness, and crashes. Stuff you would expect from a first beta.
    OSX 10.10: having issues with Unity Asset Server hosting. Unity itself runs fine (4.5.0). VMWare Fusion does not run on Yosimite at this time (neither v5 nor v6). So far seemingly stable from what I've played with so far.
    -Attempting to revert back to Mavericks on my Mac Mini for Asset Seerver using Time Machine Restore
    -Running on my MBP
     
  10. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    AHhh at least it isn't JUST my game build then. That really takes a load off... I should have figured it would be a beta issue. Stupid me.

    Either way, I always love testing betas. It's a sort of... Catch 22. Hate the issues, but love to help test the betas... Leaving me in quite the predicament when I face the true horrors while doing something I enjoy.

    Ugh.

    Here's to hoping the issue is fixed in Xcode 6 beta updates or a Unity mobile module update :)
     
  11. santi_sme

    santi_sme

    Joined:
    Jun 3, 2014
    Posts:
    2
    I just compile my game again substituting GL_BGRA_EXT for GL_RGBA.
     
    Guillaume-Swing and dpkonofa like this.
  12. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    Ahhh shoot, I wish mine worked that simply... I have a few errors aside from a GL_BGR8_OES or something... I have a few GL_DEPTH_COMPONENTS and things like that. Any clues?

    I haven't found a GL_BGRA_EXT in the Xcode project at all. :(
     
  13. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    Okay now I found it, changed the errors to something that would seemingly allow me to compile... but the screen is all rotated funky. Like in Portrait, it's trying to render it landscape, and in landscape its all stretched and squished super thin.

    Interesting lol
     
  14. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I can also confirm, number of errors popped up when trying compiled on iPad Mini.
    Xcode 6 + iOS8 - Unity 4.5 and Mavericks 10.9
    I understand its beta but good to be fast with these things, so hope a patch is released soon.
     
  15. santi_sme

    santi_sme

    Joined:
    Jun 3, 2014
    Posts:
    2
    You can change all the GL_XXXXX_OES stuff by GL_XXXXX and try to compile again.
     
  16. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    have you found it to build out and play properly doing this change??

    EDIT:

    Okay well I found out that even though I have a little "?" next to my iPhone in Xcode 5.1.1 since my phone is 8.0, I can still build in Xcode 5.1.1 with no issues whatsoever. That's awesome. Takes a load off.

    So keep using the ol' Xcode for now... Problem solved for the interim.
     
    Last edited: Jun 4, 2014
  17. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    There is patch to try..
    0) backup your Xcode project
    1) download fix.patch.zip
    2) unzip it into root Xcode project folder
    3) open Terminal and go to your Xcode project root folder
    4) run: patch -p1 < fix.patch
     

    Attached Files:

  18. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    Thanks for the prompt response in this fix! However, call me a bit of a noob... I'm not sure how to run the patch via terminal. It keeps saying the file doesn't exist... Am I missing something in the syntax?

    I copy my folder and paste the direct directory into terminal then type "patch -p1 < fix.patch" from that directory but it says it doesn't exist. I'm probably missing something very basic here haha I don't spend enough time in terminal :S
     
  19. rmeas

    rmeas

    Joined:
    Mar 11, 2014
    Posts:
    6
    Thanks for the quick fix, Mantas! I can confirm that the fixes work with Unity 4.5, Xcode 6 beta, iOS 7.1.

    The patch does not apply correctly though. I generated a new patch which is attached. It's a .txt so that it could be uploaded to the forum, but `patch` does not care what extension the patch file has.

    Follow the same instructions Mantas gave.
     

    Attached Files:

  20. hellaFont

    hellaFont

    Joined:
    Jun 6, 2013
    Posts:
    4
    Where do we download fix.patch.zip?
    Will it fix the landscape/portrait rendering problem?

    I'm running osx 10.10, ios8, and xcode 6.
    My game get's two errors (both of which are the same error in different spots):
    Classes > Unity > CMVideoSampling.mm
    Line 50 -> Use of undeclared identifier 'GL_BGRA_EXT'
    Line 64 -> Use of undeclared identifier 'GL_BGRA_EXT'

    I fixed these by replacing GL_BGRA_EXT with GL_RGBA in both instances.

    But when I run my game, I get the same odd landscape/portrait problem, see the attached image.
    My game is supposed to only support landscape, but it renders sideways with xcode6. Oddly enough, if I build my game with xcode5, and use ios7, but then upgrade to ios8 after the app is already on my iphone - it works as expected lol.
     

    Attached Files:

  21. hellaFont

    hellaFont

    Joined:
    Jun 6, 2013
    Posts:
    4
    I noticed that if I build the game in unity with all orientations supported (portrait, upside down, landscape left, landscape right), the landscape orientations work properly with xcode 6 and ios8. However I still have to replace GL_BGRA_EXT with GL_RGBA before building the game in xcode6.
     
  22. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    140
    You can still build to iOS 8 with latest release XCode version, works fine. Just XCode 6.0 beta that is giving the errors.
     
  23. CrossRiverGames

    CrossRiverGames

    Joined:
    Jul 8, 2013
    Posts:
    15
    I'm having a similar issue with my Unity project not compiling with the Xcode 6 beta and the iOS 8 SDK. Xcode 6 gives me five errors, all in the GlesHelper.mm file (which, if I'm not mistaken, is part of Unity). All five are semantic issues:
    • Line 63: Use of undeclared identifier 'GL_RGBA8_OES'
    • Line 123: Use of undeclared identifier 'glRenderbufferStorageMultisampleAPPLE'; did you mean 'glRenderbufferStorageMultisample'?
    • Line 133: Use of undeclared identifier 'GL_DEPTH_COMPONENT24_OES'
    • Line 135: Use of undeclared identifier 'GL_DEPTH24_STENCIL8_OES'
    • Line 143: Use of undeclared identifier 'glRenderbufferStorageMultisampleAPPLE'; did you mean 'glRenderbufferStorageMultisample'?
    For comparison, I built the exact same project in Xcode 5 with the iOS 7.1 SDK and it worked perfectly.
     
  24. musikit

    musikit

    Joined:
    Jan 30, 2012
    Posts:
    160
    Here is my guess as i do not have 10.10 xcode 6 or ios 8.....

    in opengl es 2.0 glRenderbufferStorageMultisample was an extention. i believe in this case an apple specific extentsion. so glRenderbufferStorageMultisampleAPPLE. similiarly with the _OES these were extensions.

    however in opengl es 3.0 they are part of the base API.

    so.. my guess is the fault is one of the following

    1. that apple changed their opengl 2.0 es header files are renamed those extensions OR
    2. that the default <OpenGLES/gles.h> (or similiar file) points to opengl es 3.0 in ios 8.

    if it is #2 then it should be very easy to go into that file and update the header location to the proper location. good luck.
     
  25. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Today we shipped Unity 4.5.1, it should fix for compilation issues. Though there is know problem of AA and Stencil always being disabled when building with Xcode 6. Another fix will follow soon.
     
  26. scsachira

    scsachira

    Joined:
    Jun 14, 2014
    Posts:
    1
    I was able to build the project by including

    #include <OpenGLES/ES2/glext.h>

    to

    CMVideoSampling.mm file. Project seems to work fine for now. Will update in here if I notice any abnormality.
     
  27. hellaFont

    hellaFont

    Joined:
    Jun 6, 2013
    Posts:
    4
    @scsachira, did you replace
    #include <OpenGLES/ES2/gl.h>
    with
    #include <OpenGLES/ES2/glext.h>

    or did you just add
    #include <OpenGLES/ES2/glext.h>

    ?
     
  28. mobiers

    mobiers

    Joined:
    Jun 18, 2014
    Posts:
    1
    As far as I am concerened, XCode 6 Beta needs a MAC based operating system X version i.e., 10.9.3 or 10.10. However, it may also include SDKs for OS X for all 3 versions including 10.9, 10.1 along with iOS 8.
     
  29. smorel

    smorel

    Joined:
    Jun 18, 2014
    Posts:
    1
    Quick fix -- not super clean by the way --


    in CMVideoSampling.mm



    adds

    #include <OpenGLES/ES3/gl.h>

    #include <OpenGLES/ES3/glext.h>



    in GlesHelper.mm

    adds

    #define GL_RGBA8_OES GL_RGBA8

    #define glRenderbufferStorageMultisampleAPPLE glRenderbufferStorageMultisample

    #define GL_DEPTH_COMPONENT24_OES GL_DEPTH_COMPONENT24

    #define GL_DEPTH24_STENCIL8_OES GL_DEPTH24_STENCIL8
     
    shanth likes this.
  30. dpkonofa

    dpkonofa

    Joined:
    Nov 6, 2012
    Posts:
    16
    Thanks for this... This got me back up and running temporarily. :)
     
  31. CrossRiverGames

    CrossRiverGames

    Joined:
    Jul 8, 2013
    Posts:
    15
    I just tried to compile my project with Unity 4.5.1 and Xcode 6 beta 2. It didn't work. This time, I took a screenshot of the error I got:

    xc6error.png

    Just to make sure it wasn't the project at fault, I compiled the same project in Xcode 5, and it worked. I thought that you folks at Unity would like to know about this error, so I'm posting it here.
     
    TeorikDeli likes this.
  32. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    This probably means that Unity 4.5.1 is not yet compatible with iOS8 Simulator. Please submit a bug report.
    Thanks!
     
  33. CrossRiverGames

    CrossRiverGames

    Joined:
    Jul 8, 2013
    Posts:
    15
    Bug reported.
     
  34. coquifrogs

    coquifrogs

    Joined:
    Jan 17, 2012
    Posts:
    16
    When running apps built with iOS 7 SDK on iOS 8 (betas 1-3) devices the orientation is wrong. For instance, we have "Landscape Right" selected in the resolution settings, but the app is running in portrait orientation. Is there an easy fix for this in the AppController? We'd like to get a fix pushed before iOS 8 is released. I'm working on getting a repro project but after I upgraded the device I'm testing with to iOS 8 beta 3 I can no longer build directly to it with Xcode 5.1.1...
     
  35. coquifrogs

    coquifrogs

    Joined:
    Jan 17, 2012
    Posts:
    16
    I figured out a fix. In UnityAppController.mm, I changed the line in the UnityInitTrampoline function that sets
    _ios80orNewer to just assign false. I didn't test other orientations but it fixes the issue I was having.
     
  36. petrapparent

    petrapparent

    Joined:
    Jun 6, 2011
    Posts:
    28
    I'm experiencing problems with iOS 8 beta 3, where Application.dataPath (i.e. $APPDIR/Documents) cannot be accessed with the following runtime error (note that I tried also stripping /private from the path with the same result.)

    This also happens after I try to see if the directory exists (it fails)

    Access to the path "/private/var/mobile/Containers/Bundle/Application/3AB3898E-12DE-48D5-840A-0BDAB88050A6/Documents" is denied.]
    at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0
     
  37. petrapparent

    petrapparent

    Joined:
    Jun 6, 2011
    Posts:
    28
    Still having the issue with /private/.../Documents not being accessible via Application.dataPath with Unity3d 4.5.2
     
  38. petrapparent

    petrapparent

    Joined:
    Jun 6, 2011
    Posts:
    28
    Ok, figured this out. Since I've been using Unity3D for a long time, I had some of the hacks to work around accessing the Documents directory using Application.dataPath before Application.persistentDataPath came along.

    If you used code like this:

    path = Application.dataPath.Substring (0, Application.dataPath.Length - 5);
    path = path.Substring(0, path.LastIndexOf('/'));
    path = path + "/Documents";


    This code will no longer work in iOS 8, even though its been working for me since iOS 4. Rather just use Application.persistentDataPath

    The main reason is that in iOS 8 the Documents directory is now situated in a root directory not under the application location, but under Data. This is to facilitate the new iCloud document sharing features between applications

    e.g. old style directory Document's directory used to be under:

    /private/var/mobile/Containers/Bundle/Application/<XXXXX>/App.app/Documents


    but now is under:

    /var/mobile/Containers/Data/Application/<XXXXX>/Documents

    Hopefully this will be useful to someone
     
    Last edited: Jul 22, 2014
  39. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    Xcode 6 looks interesting with the new "Swift" programming language.

    There's a job for a Unity intern. Convert all the Xcode unity outputs to Swift. :D

    Also. ANOTHER programming language? Who ordered that! I give up.
     
  40. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    So guys, I'm stuck on unity 4.3 because I really want to use glow11 and for some reason the developer hasn't updated it for 4.5. What is the horizontal screen fix on 4.3? It's like the device registers horizontal when vertical and vice versa. Gotta be a relatively simple fix.
     
  41. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    Fixed it! Just had to change two lines in the function TransformForOrientation in the class IphoneOrientationSupport.mm.

    Code (CSharp):
    1.  case landscapeLeft:         return CGAffineTransformIdentity;
    2.  case landscapeRight:        return CGAffineTransformIdentity;
     
  42. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    With the GM of Xcode 6 and iOS8 out now, what's the official stance of Unity + Xcode 6 - stable to use? @Mantas Puida
     
  43. tim_h

    tim_h

    Joined:
    Feb 13, 2014
    Posts:
    10
    So what is the expected build path now?
    Continue to build with Unity 4.5.x and XCode 5.x? Is it expected that iOS8 devices will run w/o issue?
    Upgrade pipeline to XCode 6.x? Will building with newer versions of either Unity or XCode affect iOS 7 (or older) users?

    We are planning to test our products on iOS8 before its release, but I want to make sure I'm testing the right thing.
     
  44. tr1stan

    tr1stan

    Joined:
    Jan 23, 2009
    Posts:
    150
    With Xcode 6 GM I found the build size dramatically increased. A build formerly was 110M now becomes over 270M. Why?
     
  45. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    275
    @tr1stan nothing else changed? Not set some geometry to static or anything (for example)?
     
  46. tr1stan

    tr1stan

    Joined:
    Jan 23, 2009
    Posts:
    150
    Well I figured it out. Xcode 6 changed the way to estimate App Store size. Previous it calculate the size after compression but now it just show the actual size of an installation. The generated IPA files are still the same size.

    But I've got a new problem when I uploading the game to App Store, the app loader shows:

    Anyone has an idea about this?
     
  47. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    iOS8 and Xcode 6 are on final GM versions from the developers portal.
    I hope the team can release a patch to provide support for all.
     
  48. tr1stan

    tr1stan

    Joined:
    Jan 23, 2009
    Posts:
    150
    I switch back to Xcode 5.1.1 and iOS 7.1. But still when I submit the same error occurs. Do that mean Apple changed it's submission policy to allow app build with architecture arm7+arm64 only?
     
  49. TeorikDeli

    TeorikDeli

    Joined:
    Apr 6, 2014
    Posts:
    151
    on Xcode 6 GM (since the second beta) build fails for me and the fail message (2 error):

    Apple Mach-O Linker Error

    Undefined symbols for architecture i386:
    "_clock$UNIX2003", referenced from:
    _substanceHandleSwitchHard in libiPhone-lib.a(apihandle.o)
    _mainRenderProcess in libiPhone-lib.a(mainrenderprocess.o)
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)


    I couldn't fix this problem. I tried to change Mach-o Linker settings; but when the build completed successfully, app chrashes without any error message (mach-o type = relocatable object file). If I change architecture, the number of errors increase to 203.
     
  50. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I dont think you should use betas anymore, GM release focus on this or downgrade back...using old betas will only confuse everyone and produce a bad fix!