Question

I've got a script written which does some steps to package my build for an Ad Hoc distribution. My first guess was to use a run script phase in my Ad Hoc target. But it looks like codesigning is fixed at the last position in the chain of building iPhone apps.

Somebody has a clue how can I run my script at the very last possible moment in the build process?

Update: Look at this answer below on how to run scripts in Xcode 4.

Was it helpful?

Solution

Can you create an aggregate target that contains both your "Ad hoc" target and a run script build phase (that runs after the "Ad hoc" target)?

OTHER TIPS

A short update on that topic: Since we all use Xcode 4 these days. Apple has refined the process of running scripts on several events in the build process with the introduction of schemes.

Go to ProductEdit Scheme… there you have the chance to run scripts before/after a build, a debugging, archiving, etc event. It's pretty handy to set a version number from git describe output or upload .xcarchives to services like TestFlight and HockeyApp.

If you want to share your pre/post scripts with other team members who got access to your code repository, you can go to ProductManage Schemes… and mark your scheme as shared. After you checked in …{project_name}.xcodeproj/xcshareddata/xcschemes/{project_name}.xcscheme to your preferred everybody can use it in the project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top