How to run a script after Xcode runs codesign on my iPhone app?

前端 未结 2 1332
梦谈多话
梦谈多话 2021-02-07 12:39

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 l

2条回答
  •  梦毁少年i
    2021-02-07 13:22

    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… and expand the Build side bar item, there you have the chance to run scripts before (Pre-actions) and after (Post-actions) 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 scm everybody can use it in the project.

提交回复
热议问题