XCodeProj ist eine Bibliothek, die in Swift zum Parsen und Arbeiten mit Xcode -Projekten geschrieben wurde. Es ist stark von Cocoapods XCodeProj und Xcode inspiriert.
| Projekt | Repository |
|---|---|
| Projlint | github.com/jamitlabs/projlint |
| Rules_xcodeProj | github.com/buildbuddy-io/RULES_XCODEPROJ |
| Rugby | github.com/swiftyfinch/rugby |
| Sourcery | github.com/krzysztofzablocki/sourcery |
| Tuist | github.com/tuist/tuist |
| Xcodegen | github.com/yonaskolb/xcodegen |
| xspm | gitlab.com/pyroh/xspm |
| Privatsphäre manifestiert | github.com/stelabouras/privacy-manifest |
Wenn Sie auch XCodeProj in Ihrem Projekt nutzen, können Sie eine PR in die obige Liste aufnehmen.
Fügen Sie die Abhängigkeit in Ihr Package.swift hinzu.
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 " ] ) ,
]
) Mit swift-sh können Sie Projektaufgaben mithilfe von Skripten automatisieren. Zum Beispiel können wir ein Skript erstellen, das den Versionstaste eines Projekts synchronisiert mit dem aktuellen GIT-Tag, das die Version des Projekts darstellt:
#!/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 ) Sie können dies dann in Ihrem Repository speichern, zum Beispiel bei scripts/set-project-version und dann ausführen:
$ scripts/set-project-version ./App.xcodeproj 1.2.3
$ git add App.xcodeproj
$ git commit -m " Bump version "
$ git tag 1.2.3 Die zukünftige Adaption könnte leicht die Version und das Anheben automatisch bestimmen. In diesem Fall empfehlen wir die Verwendung einer Bibliothek, die ein Version bereitstellt.
[email protected]:tuist/xcodeproj.git .Package.swift mit Xcode. XCodeProj wird unter der MIT -Lizenz veröffentlicht. Weitere Informationen finden Sie in Lizenz.
Vielen Dank an diese wunderbaren Menschen (Emoji -Schlüssel):
Joseph Colicchio ? | Deatondg ? | Dan Fleming | Sascha Schwabbauer ? | Marcin Iwanicki ? | Adam Khazi ? | Elliott Williams |
Muukii ? | Yuya Oka | Keith Smiley ? | Ian Leitch | Daniil Subbotin | Florentin Bekier | Vadim Smale ? |
Freddi (Yuki Aki) | Kristopher Jackson | Jake Prickett | Jake Adams | Matsuji | Bogdan Belogurov | Chuck Grindel |
Michael McGuire | C- 凡 | Maxwell Elliott | Brentley Jones | TeamEH | Johannes Ebeling | Baegteun |
Alex Kovács | Christoffer Winterkvist | Timothy Costa | Maria | Md. Ibrahim Hassan | Tatagrigory | Ruslan Alikhamov |
Ladislas de Tellei | Matt Massicotte | Артеgst в хлик | Jaewon-yun | Mike Gerasymenko | Filip Racki | Kelvin Harron |
George Navarro | Maxime |
Dieses Projekt folgt der All-Contributors-Spezifikation. Beiträge jeglicher Art willkommen!