Xcodeproj est une bibliothèque écrite en rapide pour analyser et travailler avec des projets Xcode. Il est fortement inspiré par les cocoapods xcodeproj et xcode.
| Projet | Dépôt |
|---|---|
| Projlint | github.com/jamitlabs/projlint |
| règles_xcodeproj | github.com/buildbuddy-io/rules_xcodeproj |
| Rugby | github.com/swiftyfinch/rugby |
| Sourcil | github.com/krzysztofzablocki/sourcery |
| Tuyau | github.com/tUist/TUist |
| Xcodegen | github.com/yonaskolb/xcodegen |
| xspm | gitlab.com/pyroh/xspm |
| Manifeste de confidentialité | github.com/stelabouras/privacy-manifest |
Si vous tirez également parti de XCodeProj dans votre projet, n'hésitez pas à ouvrir un RP pour l'inclure dans la liste ci-dessus.
Ajoutez la dépendance dans votre fichier 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 " ] ) ,
]
) En utilisant swift-sh vous pouvez automatiser les tâches de projet à l'aide de scripts, par exemple, nous pouvons créer un script qui conserve la clé de version d'un projet en synchronisation avec la balise GIT actuelle qui représente la version du projet:
#!/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 ) Vous pouvez ensuite stocker cela dans votre référentiel, par exemple chez scripts/set-project-version , puis l'exécuter:
$ scripts/set-project-version ./App.xcodeproj 1.2.3
$ git add App.xcodeproj
$ git commit -m " Bump version "
$ git tag 1.2.3 L'adaptation future pourrait facilement inclure la détermination de la version et la heurter automatiquement. Si c'est le cas, nous vous recommandons d'utiliser une bibliothèque qui fournit un objet Version .
[email protected]:tuist/xcodeproj.git .Package.swift avec xcode. Xcodeproj est libéré sous la licence MIT. Voir la licence pour plus de détails.
Merci à ces gens merveilleux (clé emoji):
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 Smal ? |
Freddi (Yuki Aki) | Kristopher Jackson | Jake Prickett | Jake Adams | Matsuji | Bogdan belovov | Chuck Grindel |
Michael McGuire | C- 凡 | Maxwell Elliott | Brentley Jones | Équipe | Johannes Ebeling | baegteun |
Alex Kovács | Christoffer Winterkvist | Timothy Costa | Marie | Md. Ibrahim Hassan | tatagrigoire | Ruslan Alikhamov |
Ladislas de disdi | Matt Massicotte | Артем Ворхлик | Jaewon-yun | Mike Gerasymenko | Filip Racki | Kelvin Harron |
George Navarro | Maxime |
Ce projet suit les spécifications de tous les contributeurs. Contributions de toute nature bienvenue!