将外部脚本添加到 Xcode4 [英] Adding external scripts to Xcode4

查看:55
本文介绍了将外部脚本添加到 Xcode4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Xcode 中启动任何存档之前,我需要执行一些任务.

I need to do some tasks before any Archive launched in Xcode.

在 Xcode 中有没有办法在 Archive 之前添加一个 .sh 或 .py 脚本运行?

PS:我可以手工完成这些任务,但需要时间,有些任务可能会被遗忘,或者如果过程由其他人完成,所有任务都可能被遗忘.问题是这些任务需要成功通过 Apple 验证.

PS : I can complete these tasks by hand but it requires time, some tasks might be forgotten or if the process is done by someone else all the tasks can be forgotten. The problem is that these tasks are required to have a successfull Apple validation.

谢谢

推荐答案

您可以在现有阶段之间的任何点添加脚本构建阶段.这是一篇向您展示如何操作的帖子.在 Xcode 4 中,您选择您的项目,然后转到构建阶段选项卡,如果您通常有目标依赖项"、编译源"、链接二进制与库"和复制捆绑资源"阶段,只需单击添加构建"阶段"并选择添加运行脚本".你可以选择你的 shell,但不能从那里选择 python 中的脚本.

You can add script build phases at any point between the existing phases. Here is a post which shows you how. In Xcode 4 you select your project, then go to the build phases tab were you usually have the "target dependencies", "compile sources", "Link binary with libraries" and "copy bundle resources" phases, just click on "Add build phase" and select "Add run script". You can select your shell, but not script in python from there.

您还可以查看从命令行构建 xcode 项目.您可以从 python 脚本调用该命令行,并从 Xcode 项目的外部"执行您想做的任何其他操作.

You can also look at building xcode projects from the command line. You could call that command line from a python script and do anything else you want from "outside" the Xcode project.

这篇关于将外部脚本添加到 Xcode4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆