Xcode 在我的 iPhone 应用程序上运行 codesign 后如何运行脚本?
我编写了一个脚本,它执行一些步骤来将我的构建打包为临时发行版。我的第一个猜测是在我的 Ad Hoc 目标中使用运行脚本阶段。但看起来协同设计被固定在构建 iPhone 应用程序链的最后位置。
有人知道如何在构建过程的最后一刻运行我的脚本?
更新:查看下面这个答案介绍了如何在 Xcode 4 中运行脚本。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关于该主题的简短更新:因为现在我们都使用 Xcode 4。通过引入方案,Apple 改进了在构建过程中的多个事件上运行脚本的过程。
转到产品→编辑方案...并展开构建侧栏项目,您有机会在之前(前操作)和之后(后操作)运行脚本构建、调试、归档等事件。从
gitdescribe
输出设置版本号或将 .xcarchives 上传到 TestFlight 和 HockeyApp。如果您想与有权访问您的代码存储库的其他团队成员共享您的前/后脚本,您可以转到 产品 → 管理方案... 并将您的方案标记为共享。签入
…{project_name}.xcodeproj/xcshareddata/xcschemes/{project_name}.xcscheme
到您首选的 scm 每个人都可以在项目中使用它。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 Product → Edit 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 Product → Manage 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.您可以创建一个包含“Ad hoc”目标和运行脚本构建阶段(在“Ad hoc”目标之后运行)的聚合目标吗?
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)?