XcodeEditor for Unity problems

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

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.

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.

ah ha - I see it now. sorry… I’ll have a go and see if this fixes things for me. Thanks David

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:

<Error>: +[NSDecimalNumber gad_negativeOne]: unrecognized selector sent to class 0x34dcb7cc

Which is what happens when you don’t set the link flag

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.

// Set a custom link flag
proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC");

Let me know if this helps.

Is this supported on any version of Cloud Build?

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! :slight_smile:

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.

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.

Thanks, I will have a look at this. Using the xcode thing isn’t considered per platform?

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.

@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!