Adding external scripts to Xcode4

旧城冷巷雨未停 提交于 2020-01-17 07:51:20

问题


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

Is there any way in Xcode to add a .sh or .py script run before Archive ?

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.

Thanks


回答1:


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.

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.



来源:https://stackoverflow.com/questions/8168294/adding-external-scripts-to-xcode4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!