Search Unity

Xcode frameworks

Discussion in 'Unity Build Automation' started by MythicalCity, Dec 9, 2014.

  1. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    420
    Hi,

    I'm trying to use the Xcode API so that the MessageUI.framework is included in my xcode project when using Cloud Build, but I'm not clear on how this is done, there don't seem to be any instructions available, only the sample project which is a bit mysterious.

    I added the files in the Assets/Editor folder to my project's Assets/Editor folder. Then I modified the "XcodeProjectUpdater.cs" file by adding:

    proj.AddFrameworkToProject(target, "MessageUI.framework", false);

    and commenting out:

    Code (CSharp):
    1. CopyAndReplaceDirectory("NativeAssets/TestLib.bundle", Path.Combine(path, "Frameworks/TestLib.bundle"));
    2.             proj.AddFileToBuild(target, proj.AddFile("Frameworks/TestLib.bundle",
    3.                                                      "Frameworks/TestLib.bundle", PBXSourceTree.Source));
    4.            
    5.             CopyAndReplaceDirectory("NativeAssets/TestLib.framework", Path.Combine(path, "Frameworks/TestLib.framework"));
    6.             proj.AddFileToBuild(target, proj.AddFile("Frameworks/TestLib.framework",
    7.                                                      "Frameworks/TestLib.framework", PBXSourceTree.Source));
    but now the project no longer opens in Xcode upon build, and there are no errors in Unity. I get this error in xcode when I try to open the project manually:

    "cannot be opened because the project file cannot be parsed."
     
  2. CaseJnr

    CaseJnr

    Joined:
    May 14, 2014
    Posts:
    43
    Did you ever figure this out?
     
  3. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    745
  4. -Aymeric-

    -Aymeric-

    Joined:
    Oct 21, 2014
    Posts:
    110
    Hey guys,

    Do you know how to include a dylib library inside a Unity Cloud build?
     
  5. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    745
    What do you specify as dylib and what do you need on your local build to add it to your application?
     
  6. -Aymeric-

    -Aymeric-

    Joined:
    Oct 21, 2014
    Posts:
    110
    I need the libc++.dylib for a third part library.

    On my local build, I just linked the Xcode project with that lib and it works. No other thing to change.
     
  7. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    745
    You probably want to have a look into the XCode manipulation API which might be necessary to add the external library.
     
  8. -Aymeric-

    -Aymeric-

    Joined:
    Oct 21, 2014
    Posts:
    110
    Yeah, I had a look on it. It's defintely missing informations / a real tutorial. Moreover dylib aren't mentionned at all.