XcodeProj
8.26.0
Xcodeproj는 Xcode 프로젝트를 구문 분석하고 작업하기 위해 Swift로 작성된 라이브러리입니다. Cocoapods xcodeproj 및 Xcode에서 크게 영감을 받았습니다.
| 프로젝트 | 저장소 |
|---|---|
| projlint | github.com/jamitlabs/projlint |
| 규칙 _xcodeproj | github.com/buildbuddy-io/rules_xcodeproj |
| 럭비 | github.com/swiftyfinch/rugby |
| 사워 | github.com/krzysztofzablocki/sourcery |
| Tuist | github.com/tuist/tuist |
| xcodegen | github.com/yonaskolb/xcodegen |
| XSPM | gitlab.com/pyroh/xspm |
| 프라이버시가 나타납니다 | github.com/stelabouras/privacy-manifest |
프로젝트에서 Xcodeproj를 활용하는 경우 위의 목록에 포함시키기 위해 PR을 열어주십시오.
Package.swift 파일에 종속성을 추가하십시오.
let package = Package (
name : " myproject " ,
dependencies : [
. package ( url : " https://github.com/tuist/XcodeProj.git " , . upToNextMajor ( from : " 8.12.0 " ) ) ,
] ,
targets : [
. target (
name : " myproject " ,
dependencies : [ " XcodeProj " ] ) ,
]
) swift-sh 사용하면 스크립트를 사용하여 프로젝트 작업을 자동화 할 수 있습니다. 예를 들어 프로젝트 버전 키를 유지하는 스크립트를 만들 수 있습니다.
#!/usr/bin/swift sh
import Foundation
import XcodeProj // @tuist ~> 8.8.0
import PathKit
guard CommandLine . arguments . count == 3 else {
let arg0 = Path ( CommandLine . arguments [ 0 ] ) . lastComponent
fputs ( " usage: ( arg0 ) <project> <new-version> n " , stderr )
exit ( 1 )
}
let projectPath = Path ( CommandLine . arguments [ 1 ] )
let newVersion = CommandLine . arguments [ 2 ]
let xcodeproj = try XcodeProj ( path : projectPath )
let key = " CURRENT_PROJECT_VERSION "
for conf in xcodeproj . pbxproj . buildConfigurations where conf . buildSettings [ key ] != nil {
conf . buildSettings [ key ] = newVersion
}
try xcodeproj . write ( path : projectPath ) 그런 다음 저장소에 저장 (예 : scripts/set-project-version 에 저장 한 다음 실행할 수 있습니다.
$ scripts/set-project-version ./App.xcodeproj 1.2.3
$ git add App.xcodeproj
$ git commit -m " Bump version "
$ git tag 1.2.3 향후 적응에는 버전을 쉽게 결정하고 자동으로 충돌하는 것이 포함될 수 있습니다. 그렇다면 Version 객체를 제공하는 라이브러리를 사용하는 것이 좋습니다.
[email protected]:tuist/xcodeproj.git .Package.swift 엽니 다. Xcodeproj는 MIT 라이센스에 따라 릴리스됩니다. 자세한 내용은 라이센스를 참조하십시오.
이 멋진 사람들에게 감사합니다 (이모티콘 키) :
조셉 콜리 치오 ? | deatondg ? | 댄 플레밍 | Sascha Schwabbauer ? | Marcin Iwanicki ? | 아담 카지 ? | 엘리엇 윌리엄스 |
muukii ? | 유야 오카 | 키이스 스마일 ? | 이안 리치 | Daniil 서브 보틴 | Florentin Bekier | Vadim Smal ? |
프레디 (Freddi) (유키 아키) | 크리스토퍼 잭슨 | 제이크 시작 | 제이크 아담스 | 마츠지 | Bogdan Belogurov | 척 그린델 |
마이클 맥과이어 | C- 凡 | 맥스웰 엘리엇 | 브렌 틀리 존스 | Teameh | 요하네스 에벨 링 | Baegteun |
Alex Kovács | Christoffer Winterkvist | 티모시 코스타 | 메리 | Md. Ibrahim Hassan | Tatagrigory | Ruslan Alikhamov |
Ladislas de Telli | Matt Massicotte | артем 그림 이었어요 | Jaewon-Yun | Mike Gerasymenko | 필립 랙키 | 켈빈 해론 |
조지 나 바로 | 격언 |
이 프로젝트는 All-Contritors 사양을 따릅니다. 모든 종류의 공헌을 환영합니다!