Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Create iOS Build for iOS 11 with Unity 5.5.4p5

Discussion in 'iOS and tvOS' started by studio-fizbin, Sep 19, 2017.

  1. studio-fizbin

    studio-fizbin

    Joined:
    Mar 3, 2013
    Posts:
    9
    Is the iOS 11 SDK usable with the current Unity Build in 5.5.4p5 ? I tried an empty project with a spinning cube and xcode still spits out the following errors:

    UnityMetalSupport.h:20:20: error: typedef redefinition with different types ('NSUInteger' (aka 'unsigned long') vs 'enum MTLPixelFormat')
    UnityMetalSupport.h:23:5: error: redefinition of enumerator 'MTLPixelFormatBGRA8Unorm'
    MTLPixelFormatBGRA8Unorm,
    ^

    I already excluded Metal from the allowed Graphics APIs in the Player Settings.
     
  2. abhijeet1001

    abhijeet1001

    Joined:
    Jan 6, 2015
    Posts:
    65
    Are you trying to build simulation build ? I am trying to build a simulation build and getting same error as above :/ . My unity version is : 5.6.1f1 , Xcode : 9 ..
     
  3. mobadu

    mobadu

    Joined:
    Feb 24, 2015
    Posts:
    18
    These kind of errors I only see when I try to build for Simulator. There's no need to exclude Metal from Graphics API.
    In my case helped commeting line 20-25 in UnityMetalSupport.h
    It was only way for me to build for simulator without any errors.
    However remember to uncomment these when you build for Device SDK!
     
    DarkCooker likes this.
  4. zorgem80

    zorgem80

    Joined:
    Nov 9, 2017
    Posts:
    1
    Thanks mobadu

    I added #if !TARGET_OS_SIMULATOR at the line.
     
  5. kenwrotethis

    kenwrotethis

    Joined:
    Oct 21, 2016
    Posts:
    4
    Wow, thanks mobadu and zorgem80! This problem was killing me - costing precious time until I found your answer!
    Hopefully Unity fixes it soon.

    Unity 5.6.1f1 Xcode 9.2
     
  6. xpath

    xpath

    Joined:
    Dec 3, 2018
    Posts:
    20

    can you help me? I don't understand what I have to do here. :(

    https://forum.unity.com/threads/unitymetalsupport-h-xcode-error.791889/
     
    Last edited: Dec 10, 2019