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

XcodeEditor for Unity problems

Discussion in 'Unity Build Automation' started by alan_motionlab, Dec 1, 2014.

  1. alan_motionlab

    alan_motionlab

    Joined:
    Nov 27, 2014
    Posts:
    99
    Hi,

    I use the Xcode Editor for Unity within my cloud build and while it appears to be executing (I have logs in the post build script), when I actually run the game, its not been added in. I use it to add the -ObjC linker flag in automatically which is needed for AdMob.

    The build works correctly when I build it straight out of Unity, but not when I use Cloud.

    Thanks
     
  2. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Hi, welcome to the forums!

    Have you already seen the Advanced Build Settings in UCB? They should make it possible for you to run post scripts.
     
  3. alan_motionlab

    alan_motionlab

    Joined:
    Nov 27, 2014
    Posts:
    99
    Hi David,

    I've seen that, but I'm not exactly sure how to use it. I can see about adding frameworks in there, but not about adding linker flags?

    As I say, on the output log of my build, I can see that calls are being made to the post script code, but when its built, the app crashes. Symbols point to a known error with the linker flag missing.
     
  4. alan_motionlab

    alan_motionlab

    Joined:
    Nov 27, 2014
    Posts:
    99
    ah ha - I see it now. sorry... I'll have a go and see if this fixes things for me. Thanks David
     
  5. alan_motionlab

    alan_motionlab

    Joined:
    Nov 27, 2014
    Posts:
    99
    I tried with that log and I get the same issue. it seems to be missing the linker flag still

    Edit:

    Definitely missing the linker flag. the error I see on my device is:

    Code (csharp):
    1.  
    2. <Error>: +[NSDecimalNumber gad_negativeOne]: unrecognized selector sent to class 0x34dcb7cc
    3.  
    Which is what happens when you don't set the link flag
     
    Last edited: Dec 1, 2014
  6. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Have you already seen the XCode Manipulations API which you can use with your advanced settings?
    It includes a example here which shows you how to set the linker flag.

    Code (CSharp):
    1. // Set a custom link flag
    2. proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC");
    Let me know if this helps.
     
  7. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    Is this supported on any version of Cloud Build?
     
  8. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Yes, the necessary post-process steps can be run on any Unity Cloud Build Tier, you don't need the advanced settings if you do not use per platform post process steps! :)
     
  9. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    Is there anywhere that has decent instructions on how to use it? The bitbucket has nothing about it just one line what it is for.
     
  10. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    Sure, check out the Native Library Demo which is uses advanced settings, but you only need to adjust the code to use post process attributes. Code how to do it is mentioned here.
     
  11. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    Thanks, I will have a look at this. Using the xcode thing isn't considered per platform?
     
  12. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    The XCode manipulation API is only available on iOS as you need it to modify the XCode project. But the post process attribute is Unity specific and available on all platforms to do whatever you need to do in a post process step.
     
  13. hypeNate

    hypeNate

    Unity Technologies

    Joined:
    Apr 4, 2014
    Posts:
    272
    @Saxi - as David said, you should be able to use the Xcode Manipulation API via the postProcess Build attribute, but if you really want to unleash the full power of Unity Cloud Build, you should consider trying out the Studio plan for a month and seeing what you think (you don't have to commit to a full year, its month to month).

    You'll get faster builds, the ability to submit support tickets, higher repo size limits, custom pre- and post- process options for each platform, and lots of other additional features. And you can add up to 20 collaborators (it doesn't matter what plan they have).

    If you decide to give it a shot, please let us know what you think!