Search Unity

XCodeAPI support under 4.6

Discussion in 'iOS and tvOS' started by jerome-lacoste, Jun 26, 2015.

  1. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    Hello,

    The Xcode API project was announced by Unity a few months back and is https://bitbucket.org/Unity-Technologies/xcodeapi/

    This resulting DLL is packaged with Unity 4.6 and 5.x.

    E.g. /Applications/Unity4.6.5f1/Unity.app/Contents/PlaybackEngines/iossupport/UnityEditor.iOS.Extensions.Xcode.dll

    But Unity behaves differently when it comes to compiling [PostProcessBuild]. It fails with 4.6 until I copy the UnityEditor.iOS.Extensions.Xcode.dll under Plugins/.

    Why is Unity behaving differently between 5.x and 4.6 ?

    I had reported #685717 as part of porting a project to 5.x but got no answer.
     
  2. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Hi,

    As I understood from the bug report, you're adding the Xcode API dll to assets in 5.x too. Don't do that. Unity 5.x bundles the Xcode API by default. The bundled dll is a bit newer and may contain more functionality than the plugin from the bitbucket repo. Consequently, if Unity tries to use your version of the plugin, there's high probability the build process will break.

    On 4.6 Xcode API is not bundled with Unity, so you need to use the version from our bitbucket repo.
     
  3. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    The fact that the library count by found under

    /Applications/Unity4.6.5f1/Unity.app/Contents/PlaybackEngines/iossupport/UnityEditor.iOS.Extensions.Xcode.dll

    and isn't used by unity is a bit strange, isn't it ?
     
  4. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Sorry, I forgot that we do include Xcode API into 4.6 (the original plan was to do that differently), didn't read your comment throughly and confused myself.

    Basically, we only officially support the Xcode API on 5.x. The Xcode API dll is included into 4.6 too, but it conforms to an older version of the API for stability reasons and its usage is not supported.

    The open source dll is mostly for 4.6 users, who want to use a newer dll with less bugs and better documentation (http://docs.unity3d.com/ScriptReference/iOS.Xcode.PBXProject.html applies for the open source version too). The problem is that the namespaces conflict, so in order to use the dll and not break Unity, the user needs to modify the sources. The same caveat applies if you want to use the dll on 5.x for some reason.

    I'll update the README in the repository to clarify the situation.