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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to add Xcode frameworks

Discussion in 'Unity Build Automation' started by AyreGuitar, Mar 10, 2015.

  1. AyreGuitar

    AyreGuitar

    Joined:
    Oct 12, 2013
    Posts:
    35
    I added a plugin yesterday that uses post processes to add the required frameworks to Xcode.
    Now when I try to Cloud Build it gives this error:

    [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Full log reveals it to be due to undefined symbols (I assume because my postprocess script hasn't run so is missing frameworks still:
    [xcode] Undefined symbols for architecture armv7:
    2826: [xcode] "_PostToServices_addMailCcList", referenced from:
    2827: [xcode] iOS_PostToServices_PostToServices_addMailCcList_m37(Object_t*, String_t*, MethodInfo*) in Bulk_Assembly-CSharp-firstpass_0.o
    etc.

    Any way to add required frameworks with Cloud Build without having to upgrade to Studio Plan (which I can see is required for Post Process in the Advanced iOS settings)

    Thanks in advance!
     
  2. AyreGuitar

    AyreGuitar

    Joined:
    Oct 12, 2013
    Posts:
    35
    Fixed the problem (was missing some .h and .mm files from my repository) so looks like it is possible without Studio Plan. Hopefully this will help somebody else!
     
  3. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    How did you setup your project? Most plugins should not need post process steps anyway :)
     
  4. AyreGuitar

    AyreGuitar

    Joined:
    Oct 12, 2013
    Posts:
    35
    Thanks for the reply.
    I only need post-process for one plugin to allow sharing via FB, Twitter etc. on iOS. Here's the Asset Store link: https://www.assetstore.unity3d.com/en/#!/content/9277
    It states:
    Must Link Frameworks in Xcode:
    - Twitter.framework (with "Optional")
    - Social.framework (with "Optional")
    - MessageUI.framework

    So I wrote a post-process script that handles it with a bit of python. Seems to work now anyway...
     
  5. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Brilliant! Yes, you can use the normal post process from Unity in Unity Cloud Build to set it up. Helpful, right? :)
     
  6. georgepiva

    georgepiva

    Joined:
    Dec 16, 2013
    Posts:
    14
  7. joonturbo

    joonturbo

    Joined:
    Jun 24, 2013
    Posts:
    75
    Hi @AyreGuitar or @David Berger, could you please explain what needs to be done to get frameworks to work on CB?
    I'm using the iOS native Multipeer Connectivity framework with an iOS native plugin that I wrote myself and it doesn't work on CB cause of linker errors due to the framework being missing (I had the same errors in XCode and then added the MP framework manually to fix it).

    How do I fix this in Unity5 and the new CB?

    I had several repo's with this MP plugin in Unity4, before 5 was released, and it worked without any issues. I'm having a hard time figuring out what has changed to make it so that this no longer works.
     
  8. hypeNate

    hypeNate

    Unity Technologies

    Joined:
    Apr 4, 2014
    Posts:
    272
  9. Ali_V_Quest

    Ali_V_Quest

    Joined:
    Aug 2, 2015
    Posts:
    138
    - is that script availabe ? because we have the exact same problem. Thx.