Search Unity

iOS8 / XCode6 compatibility

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

  1. lukelutman

    lukelutman

    Joined:
    Feb 20, 2013
    Posts:
    5
    @TeorikDeli: I'm having the same issue trying to build for the iOS 8 Simulator with the Xcode 6 GM (builds for an actual device seem fine). I need to build for the Simulator to test the new iPhone 6 and iPhone 6 Plus screen sizes.

    If you go to Player Settings > Other Settings > SDK Version and set it to Simulator SDK, all of the 200-ish errors except the "_clock$UNIX2003" one disappear. I have the same problem on a brand new Unity project (Unity 4.5.3f3).
     
    clar likes this.
  2. Zwilnik

    Zwilnik

    Joined:
    Jul 22, 2014
    Posts:
    62
    I'm having a different problem. Just installed the Yosemite Dev Preview 7 and the Xcode 6 GM seed and Unity seems to have a problem with the "closing open Unity projects" stage. If there's a project open in Xcode, it either closes Xcode or Xcode pops up with the "Container for this project has been removed, Close or Re-Save" dialog. Either way, the only way to actually build the project on Xcode is to re-open it from the open recent menu.
     
  3. clar

    clar

    Joined:
    Sep 11, 2014
    Posts:
    1
    I got the same error when using Simulator SDK too . here is the error messages

    Undefined symbols for architecture i386:
    "_clock$UNIX2003", referenced from:
    _substanceHandleSwitchHard in libiPhone-lib.a(apihandle.o)
    _mainRenderProcess in libiPhone-lib.a(mainrenderprocess.o)
     
  4. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    Bump... same error here.... undefined symbols... clock$UNIX2003 ... hoping for a quick fix ?
     
  5. BehindTheCode

    BehindTheCode

    Joined:
    Nov 18, 2013
    Posts:
    2
    Yes, with the new iOS8 minimum required architectures are armv7 + arm64. I'm getting the same error
     
  6. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    We were able to submit empty app made with Unity 4.5.x without a problem. Probably this was temporal glitch in iTunes Connect submission verification system. Everyone who got rejected some time ago due this issue, could you please retry submission and post your results?
     
  7. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    You can work around this issue by adding following code at the end of main.mm file in Xcode project:
    Code (csharp):
    1.  
    2. #include <time.h>
    3.  
    4. extern "C"
    5. {
    6. clock_t
    7. clock$UNIX2003(void)
    8. {
    9.     return clock();
    10. }
    11. }
     
  8. lukelutman

    lukelutman

    Joined:
    Feb 20, 2013
    Posts:
    5
    That works for me. Thanks!
     
  9. stdout

    stdout

    Joined:
    Jul 4, 2014
    Posts:
    4
    For me, updating to the Xcode 6 GM broke Build and Run. I was able to resolve it by adding
    C4A681B0-4A26-480E-93EC-1218098B9AA0 to the
    DVTPlugInCompatibilityUUIDs section in
    /Applications/Unity/Unity.app/Contents/PlaybackEngines/iOSSupport/Tools/OSX/Unity4XC.xcplugin/Contents/Info.plist.
     
  10. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Which Unity version are you on? Unity 4.5.3/4 should work fine with it
     
  11. 3dgrinder

    3dgrinder

    Joined:
    Oct 21, 2008
    Posts:
    249
    We are able to get everything working with Xcode6 and Unity4.5.4f1 except following case.

    iOS 5 (iPod 3rdGen) is crashing when we are trying to use unity video player, but it's working for iOS 6 or upper OS version device. I have attached screen shot where it's crashing. Already did following test:
    • iOS 5.1.1 (iPod 3rdGen) - Xocde 5.1.1 and Unity 4.5.4f1/4.5.3 it's crash.
    • iOS 5.1.1 (iPod 3rdGen) - Xocde 6 and Unity 4.5.4f1/4.5.3 it's crash.
    • iOS 5.1.1 (iPod 3rdGen) - Xocde 5.1.1 and Unity 4.3.4 - It's work! No issue with this version.
    Code is plain and simple:
    Code (CSharp):
    1.  
    2. public class logosCopyrightVideo : MonoBehaviour {
    3.  
    4.    public void Awake (){
    5.    }
    6.  
    7.     // Use this for initialization
    8.     void Start () {
    9.        
    10.         StartCoroutine ( PlayIntroVideo() );
    11.     }
    12.    
    13.     IEnumerator PlayIntroVideo(){
    14.        
    15.         Handheld.PlayFullScreenMovie ("intro_960.mp4", Color.black, FullScreenMovieControlMode.CancelOnInput);
    16.  
    17.         //Wait to a sec
    18.         yield return new WaitForSeconds( 2f * Time.timeScale );
    19.        
    20.     }
    21.  
    22. }
    23.  
    That's playing video from StreamingAssets directory. Basically it's crashing at this code:
    Code (CSharp):
    1. 0x91d828:  beq    0x91db68                  ; -[MoviePlayerContext actuallyStartTheMovie:] + 1052 at iPhoneVideo.mm:166
     

    Attached Files:

    MrEsquire likes this.
  12. stdout

    stdout

    Joined:
    Jul 4, 2014
    Posts:
    4
    4.5.3f3. But I see that 4.5.4 is posted so I'll update.
     
  13. 3dgrinder

    3dgrinder

    Joined:
    Oct 21, 2008
    Posts:
    249
    Another issue:

    Code (CSharp):
    1.         NotificationServices.RegisterForRemoteNotificationTypes ( RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound );
    It's returning:
    Code (CSharp):
    1. 2014-09-11 13:19:32.248 XXXXXX[238:22952] registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.
    Please note that I'm using Xcode6 + Unity 4.5.4f1
     
    MrEsquire likes this.
  14. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    Another issue for me with XCode 6. The XCode Project file that Unity 4.5.4 creates has a blank "general" and "capabilities" section in the target where you normally see access to the screen orientation settings, image assets catalogs for splash screen and icon resources, etc. Does anyone know how to get this "back"?
     
  15. epit

    epit

    Joined:
    Oct 2, 2012
    Posts:
    32
    I am answering my own question. The xcode project file I got out of Unity 4.5.4 has the base SDK set to "iphonesimulator (not found)" I set it to IOS 8 and the "general" section editor appeared suddenly
     
  16. WermHat

    WermHat

    Joined:
    Jul 13, 2012
    Posts:
    88
    Push registration has changed in iOS 8 (http://stackoverflow.com/questions/...ontypes-is-not-supported-in-ios-8-0-and-later). Hopefully Unity has a fix for this in the works
     
    3dgrinder likes this.
  17. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    We just confirmed that Xcode 6 GM broke build & run once again. Fix is on its way.
     
  18. labcave

    labcave

    Joined:
    May 29, 2013
    Posts:
    2
    Hi there,

    Any estimation about when a patch/new release with iOS8 support will be released?

    Thanks!
     
  19. coquifrogs

    coquifrogs

    Joined:
    Jan 17, 2012
    Posts:
    16
    I fixed the orientation issue in 4.6 beta by copying the trampoline code from 4.5.4. Had to comment out a line doing a forced frame update, but otherwise it worked perfectly.
     
  20. PAHeartBeat

    PAHeartBeat

    Joined:
    Jul 11, 2012
    Posts:
    76
    We are facing some diffrent error with our project we are using Unity 4.5.3, MAC OSX 10.9.4, XCode 6.0 (GSM SEED) and iOS 8.0 (GSM SEED) we are trying to write some data in Documents folder of Application.
    we get Application.persistentDataPath() as "/var/mobile/Containers/Documents/Application/2DDD15A2-****-****-****-64D3E8E93F08/Documents/" and iOS 8.0 gives "Access denied" error.
     
  21. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please submit a bugreport. Thanks!
     
  22. PAHeartBeat

    PAHeartBeat

    Joined:
    Jul 11, 2012
    Posts:
    76
    Hi Mantas,

    thanks for your reply.. but I thought we found the issue, and I thought this issue not from unity side, from our side, once I need check our app on public version of iOS 8 before sending bug report.
     
  23. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Whats the status with Metal support, any documentation, or we need to wait for next build?
     
  24. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  25. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Metal build with corresponding changes will be delivered to 5.0 beta groups.
     
    MrEsquire likes this.
  26. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,746
    Hey Mantas, do you mind explaining a couple of the 4.5.4 release notes?

    I just uploaded a build with 4.5.3/XCode 6/iOS8 for review (didn't know .4 was out) and I'm wondering if I should cancel it and build again with the new version.

    • iOS: Fixed handling of resolution preset in Player Settings.
    What did this fix exactly?
    • iOS: Fixed startup orientation handling on iOS 8.
    What was the problem here? As far as I can tell, I don't see anything abnormal with orientation and 4.5.3
     
  27. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    There were few problems related to specific set of supported screen orientations and autorotation in general. If you did testing on iOS 8 and didn't notice anything wrong, I think you are fine.
     
  28. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    >> iOS: Fixed handling of resolution preset in Player Settings.
    that was about picking non-native resolution preset in Player Settings resulting in black screen. If you dont use it (e.g. set resolution from script you are good to go)
    >>iOS: Fixed startup orientation handling on iOS 8.
    it was so long ago that i honestly dont remember already 8). So i'm with mantas - you are fine if you tested and everything is ok
     
  29. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,688
    Some articles on the web say that the iPhone 6 Plus is using a resolution of 1242 x 2208 for rendering and scaling it down to the native 1080 x 1920. They wrote this is always the case even for 3D apps unless they use Metal.

    Is that really true?
     
  30. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    138
    Unity4.5.4f1 and 4.5.4p1 looks like have problem in splash screen for XCode6, iOS8 and iPhone5/5s.
    I'm trying iOS8, iPhone5s, XCode6.0.1 and Landscape.
    So, wrong resolution selection.
    iPhone5 and iOS7 is successful.

    What do you make of this?
     
    Last edited: Sep 19, 2014
  31. PAHeartBeat

    PAHeartBeat

    Joined:
    Jul 11, 2012
    Posts:
    76
    Hi VIC20,

    can you share that article link so we can understand the rendering pipeline of iPhone 6+, it that is true then we have plan our shader programing accoriding to it.
     
  32. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,688
    I don't know if that is really true. But this german article clearly says that http://www.heise.de/ct/artikel/Appl...chirmaufloesungen-2394857.html?artikelseite=2

    Translation: Game developers who use Apple's Metal can access the screen of the iPhone 6 Plus directly in its native 1080 x 1920 resolution. Therefore no 3D performance will be lost due to being forced to render at an unnecessary high resolution.

    Sounds like until Unity 5 we will have to deal with a GPU that is just 1.5 times faster than the one of the 5S and a rendering resolution that is 3.77 times higher than the 5S screen resolution. That is almost as bad as the iPad 1 compared to the iPhone 3GS. http://forum.unity3d.com/threads/iphone-6-plus-performance-the-simple-math.267626/

    An english website http://www.paintcodeapp.com/news/iphone-6-screens-demystified but it does not say anything about 3D.
     
  33. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    So, can I safely upgrade my test iPad device to iOS 8? Will there be any issues if I do so?
     
  34. PAHeartBeat

    PAHeartBeat

    Joined:
    Jul 11, 2012
    Posts:
    76
    it' solved in our case, we have make some provision to save data in app sandbox for may be iOS 5 / 6 /7 (i don't sure for which one) but that providsion change data path and we getting that issue;

    In any one of above said iOS "/DATA/" folder get at end of foder hierarchy and that data folder is not accesible in particular iOS, so we have use string.replace() command to replace "DATA" to "DOCUMENTS".

    Now iOS 8 it's get in midddle like 2nd / 3rd folder hierarchy which is correct and that after we get our app sandbox folder and there we need Documents folder, but old provision replace all "DATA" words in path to "DOCUMENTS" so we are getting error of "Access Denied" so we put a condition if iOS version is older then 8 then only that provision code take action otherwise not.

    And problem is solved.
     
  35. shockreel

    shockreel

    Joined:
    Mar 25, 2013
    Posts:
    3

    I had some issues with the build breaking after updating to iOS 8, Mac OSX 10.9.5 and Xcode 6.0.1.

    Aperture.m threw up a bunch of Semantic Issue errors in Xcode. I reached out to the developers of Aperture at Scarlet and they got back to me within about 10 minutes (on a Saturday afternoon, I might add). In my particular case, Apple renamed/moved a bunch of OpenGL headers for iOS 8. This of course caused the Semantic issues and as a result, the whole build broke.

    He sent me a zip file with new library files in it and it fixed everything. I recommend emailing the developer directly if you're having troubles as a result of the update. He got back to me and solved my problem right away.
     
  36. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    442
    Any word on this?
     
    Last edited: Sep 21, 2014
  37. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    whith such a painful process with hack and compatibility to iOS 8 and Xcode 6 , apple would still accept a build with unity 4.5.xx and Xcode 5 with a minimum target of iOS 6.0 today?
     
    Last edited: Sep 21, 2014
  38. Naquatic

    Naquatic

    Joined:
    Jun 28, 2014
    Posts:
    2
    +1, we are seeing something similar. For some reason it is displaying Default@2x launch image on iPhone 5, 5s, and 6 (but not 6 Plus), and thus the image is horizontally stretched. We are confused by this because, when manually inspecting the asset package, it would appear that the Default-568h@2x and Default-667h@2x images are linked properly. However, in reality the Default@2x image is used instead.
     
  39. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Why can you not build in Unity and just do the screenshots and splashscreens within Xcode, delete default Unity ones and replace? Still a issue?
     
  40. 3dgrinder

    3dgrinder

    Joined:
    Oct 21, 2008
    Posts:
    249
    Nope, I didn't heard about it. I handled it myself.
     
  41. Naquatic

    Naquatic

    Joined:
    Jun 28, 2014
    Posts:
    2
    We can and will. Just confirming kyubuns' finding.
     
  42. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    138
    > Why can you not build in Unity and just do the screenshots and splashscreens within Xcode, delete default Unity ones and replace? Still a issue?

    I uses Unity's Build Settings.(don't touch XCode)
    All original splashscreens and using Landscape only.

    Mobile Splash Screen - 640*960
    iPhone 3.5"/Retina - 640*960
    iPhone 4"/Retina - 1136*640
    iPad Portrait - 640*960
    High Res. iPad Portrait - 640*960
    iPad Landscape - 1024*768
    High Res. iPad Landscape - 1024*768
     
  43. ichenxiaodao

    ichenxiaodao

    Joined:
    Dec 28, 2013
    Posts:
    3
    Hello kyubuns, Do you have solved this issue?
     
  44. RedDevil

    RedDevil

    Joined:
    Nov 19, 2013
    Posts:
    8
    Can you tell me how i can fix this fast because i am running into this problem and i really need to test some landscape games but it keeps going into portrait mode?Thx
     
  45. ichenxiaodao

    ichenxiaodao

    Joined:
    Dec 28, 2013
    Posts:
    3
    We have solved this issue.
    After Unity build, remove the Images.xcassets generated by Unity, and new Images.xcassets in Xcode.
    In the file iOS/Classes/UI/SplashScreen.mm

    Code (CSharp):
    1.      NSString* imageName = [NSString stringWithFormat:@"LaunchImage%s%s%s%s", iOS7Suffix, orientSuffix, szSuffix, ipadSuffix];
    2.  
    3.     if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone )
    4.     {
    5.         //iPhone5/5s/iPod5
    6.         if([[UIScreen mainScreen] bounds].size.height == 568 || [[UIScreen mainScreen] bounds].size.width == 568)
    7.             imageName = @"LaunchImage-568h@2x";
    8.         //iPhone6
    9.         if([[UIScreen mainScreen] bounds].size.height == 667 || [[UIScreen mainScreen] bounds].size.width == 667)
    10.             imageName = @"LaunchImage-800-667h@2x";
    11.         //iPhone6 Plus
    12.         if([[UIScreen mainScreen] bounds].size.height == 736 || [[UIScreen mainScreen] bounds].size.width == 736)
    13.             imageName = @"LaunchImage-800-Landscape-736h@3x";
    14.     }
    15.     //NSLog(@"===\nLaunchIamgeName:%@\n===", imageName);
    16.  
    17.     NSString* imagePath = [[[[NSBundle mainBundle] pathForResource: imageName ofType: @"png"] retain] autorelease];
    18.  

    Unity 4.5.4f1 Xcode 6.0.1
     
    Last edited: Sep 24, 2014
    Nub3h, Afroman and MrEsquire like this.
  46. cdorf

    cdorf

    Joined:
    Jul 7, 2014
    Posts:
    1
    I have the same problem with my app, using Unity 4.5.4f1, xCode 6, Mavericks and iOS 8

    The default Application.dataPath from Unity does not work for iOS 8.
    Neither does removing the app-name from the path and exchanging "/Data" with "/Documents" (which was the default solution until iOS 8 arrived) or vice versa help any.

    Can somebody give me a detailed description what a _working_ dataPath on iOS8 looks like?

    And just to mention that, I find it pretty sad that Unity's Application.dataPath is completely useless on iOS and that I basically have to substring and replace it to make it even work for read/write access. Even before iOS 8.
    In a perfect Unity world, I would expect a working path regardless of what platform or software version I am on.
     
  47. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    I just updated my game and it uses Application.persistentDataPath with no problem. Is it only Application.dataPath that doesn't work for you or something?
     
  48. Afroman

    Afroman

    Joined:
    Aug 17, 2013
    Posts:
    43
    That solved the issue for me! Thanks!
     
  49. Tiktaalik

    Tiktaalik

    Joined:
    Apr 9, 2013
    Posts:
    5
    Upgraded to iOS8, Xcode 6.0.1, Unity 4.5.4 and it seems like my game just doesn't run or maybe even Unity isn't loaded or running correctly? All I get is the following:

    Code (csharp):
    1.  
    2. 2014-09-23 12:13:02.723 asdf[1585:619556] -> registered mono modules 0x1bcc590
    3. -> applicationDidFinishLaunching()
    4.  
    5. Mono path[0] = '/private/var/mobile/Containers/Bundle/Application/249BA105-0142-42D3-8586-41FEE73557C4/asdf/Data/Managed'
    6.  
    7. Mono config path = '/private/var/mobile/Containers/Bundle/Application/249BA105-0142-42D3-8586-41FEE73557C4/asdf/Data/Managed'
    8. -> applicationDidBecomeActive()
    9.  
    Edit: Ok I've tested running on a iPhone 3GS running iOS 4.3 and I'm getting the same issue, so it's certainly not an iOS issue. Maybe on the Unity 4.5.4 side? Have tried 4.5.4p as well.
     
    Last edited: Sep 23, 2014
  50. jeremyhu

    jeremyhu

    Joined:
    Sep 23, 2014
    Posts:
    1
    Do NOT do this. You will simply be masking a deeper problem. The issue is that you have some object file (or static library that contains a bunch of object files) that was built against the OS X SDK. The iOS Simualor runtime and OS X runtimes are not binary compatible at this layer. Your addition of clock$UNIX2003 is simply masking this deeper problem, and you may run into runtime issues due to binary incompatibilities.

    The correct way to solve this problem is to rebuild the object files in question (or the static library) against the iOS Simulator SDK and use that when building a simulator project rather than using the OS X compatible library.