HomeiDevBlogADayMany From One, Again


Many From One, Again — 6 Comments

  1. Thanks for the post. For all these extra schemes, is the only different is the signing and provisioning? If so, maybe it’s possible to just feed in a little xcconfig file with these settings in it, that would override anything provided in the actual project file and schemes (I think, I’ve not used this particular mechanism before). You can also specify the config file using the XCODE_XCCONFIG_FILE environment variable.

    xcodebuild -scheme “MyApp” -xcconfig Distribution.xcconfig archive

    I wouldn’t shy away from the command line though… if it doesn’t run from the command line, it’s not running on my continuous integration server, and it a lot less useful to me.

  2. That might be a great solution! Creating one or more .xcconfig files (I’m thinking 1 per target, because each requires its own provisioning profile), and then creating in Xcode an “aggregate target” that runs a shell command to utilize the appropriate .xcconfig file for each target (or something like that) might just do the trick. I’ll have to look into it! I did some work over a year ago with .xcconfig files for a CI project. I had forgotten about all that stuff, so thanks for the reminder.

  3. We use xconfig files in our build process, specifically to switch out profiles and signing. So I can confirm that it works. 🙂 also, remember that you can re-sign the binary when you upload in Xcode, so you don’t necessarily need a separate release target anymore.

    I’d be happy to chat on Tuesday as well, if you’re still struggling with it. I’ve lost a LOT of sleep over Xcode and building, so I know how it goes. I’m @bdebow on twitter.

  4. Thanks for this. Glad to know it can be done this way. I am going to try tackling this over the weekend, I think. But I may be in touch just the same. 🙂

    I had read you can re-sign a binary. But can you then archive it as well? Or is the resigning actually resigning the archive? I’ll have to look into that too!

  5. The re-signing is part of the share or submit process. So first you archive and then, when you go to submit or share, it offers you a selection of signing profiles. So we typically archive every build with the signing for ad hoc. Then we re-sign that archived bundle and submit to apple from within the Xcode organizer – no need to rebuild

  6. Nice. I wondered if it was that easy. I thought there were 2 separate signing points: When you actually build/archive, and when you submit. But it sounds like the whole point of Xcode asking which profile to use when “sharing” the build is to be able to re-sign if you need to. Makes sense.

Leave a Reply

Your email address will not be published. Required fields are marked *

HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>