2014-03-26 2 views
5

XCode를 사용하지 않고 XCode 프로젝트에서 파일을 제거하거나 파일을 추가하는 방법이 있습니까? 즉, 그것을 수행 할 터미널 명령이나 프로그램이 있습니까? 나는 파일을 추가/제거하기 위해 cpmvrm을 할 수 있지만 실제 프로젝트 파일에는 반영되지 않았다. 감사합니다. 사용에 복사 한 후XCode 프로젝트 : 터미널에서 파일을 제거/추가하는 방법 (스크립트, 명령 등)

+0

나는 그렇게 생각하지 않지만, Xcode는 AppleScript 가능하고 아마 파일을 추가/제거 할 수 있습니다. –

+1

Ruby를 알고 계시면 https://github.com/CocoaPods/Xcodeproj를 방문하십시오. –

답변

0

시도 건물 this

가 작동하는지

모르는 하지만 가치가 시도 :

1

는 루비 보석이에서 XCodeProject의 조작을 허용하는 xcodeproj라고있다 명령 행.

프로젝트에 파일을 추가하는 예제를 제공하는 Using the Xcodeproj Ruby Gem을 확인하십시오.

# Open the existing Xcode project 
project_file = product_name + '.xcodeproj' 
project = Xcodeproj::Project.new(project_file) 

# Add a file to the project in the main group 
file_name = 'Message.m' 
group_name = product_name 
file = project.new_file(file_name, group_name) 

# Add the file to the main target 
main_target = project.targets.first 
main_target.add_file_references([file]) 

# Save the project file 
project.save_as(project_file) 
관련 문제