Xcode targets -- programmatic creation [closed]
Asked Answered
R

0

8

I have an iOS project in which there will be >100 targets created from the same code base. The targets have many similar characteristics, but different info.plist, Default.png files, etc...

I'm considering generating (or mutating) the project file programmatically. Since project file formats are versioned, I should be safe in the short term. Longer term this might not be the most ideal solution though. I'm also looking at scripting Xcode with applescript. It seems like there is a robust dictionary with target objects.

I'm looking for some input on a good approach to managing this. Anyone with experience doing this like to make a recommendation?

UPDATE: I ended up using applescript to script Xcode. This worked great, until XC4 broke everything...

Redistrict answered 11/11, 2010 at 19:48 Comment(2)
A great approach is to use GYP (Generate Your Project), a tool developed by Google. You specify the targets as a Python array including all the different properties of each target. You can version this file, and, using the gyp command, you can generate the required .xcodeproj project file.Ataman
I've done some research on gyp and zerg_xcode. Neither one of these solutions are ideal for my situation. I've opted to build a shared library and move all but the main.m into it. I'm creating a Cocoa app to script target creation on my apps project. It is slow going but when I'm done I'll be able to leverage it for future projects as well.Redistrict

© 2022 - 2024 — McMap. All rights reserved.