PBXProject API Missing Features.... (Unity 2020.1.6f1)

Hello! Let me explain my problem.

I’m currently working on a game for iOS. Our workflow is quite simple: we build the Xcode project with Unity, and then we build the app with Xcode. However,we are using a framework that is distributed with carthage (GitHub - Carthage/Carthage: A simple, decentralized dependency manager for Cocoa), so after the project building, I always have to make manual edits to the project to make it build. Of course I looked at the PBXProject API, that indeed it allows to edit the project file…but it is missing a couple of features that I would really find useful. In particular:

  • There should be a way to edit the output paths when adding a ‘Run Script’ phase. Currently (Unity 2020.1.6f1) it is only possible to modify the ‘Input Files’ section of the phase, not the ‘Output Files’. By that, I mean having a method that is like: public string AddShellScriptBuildPhase(string targetGuid, string name, string shellPath, string shellScript, List<string> inputPaths, List<string> outputPaths);

  • Editing of the ‘Embed’ option when adding a new framework (see attached screenshot for info).

It’s really a bummer, because without those two features I cannot build the game inside our CI, and is time wasted babysitting Xcode instead of working on the game itself.

Looking at the source code for the PBX modification API (at GitHub - zxsean/Unity-Technologies-xcodeapi: fork from https://bitbucket.org/Unity-Technologies/xcodeapi/) , the requested functionality looks like it’s there, but is ‘trapped’ as internal class code.

I have a question for the mobile development team: will this functionality be available some day, or the only solution for me is to extend the current code? And why has the “xcodeapi” repository disappeared from the official unity repo (Bitbucket)? Is it not open source anymore?

1 Like

I second this. What happened to the xcodeapi here: https://bitbucket.org/Unity-Technologies/xcodeapi/

perhaps this?