Xcodeproj เป็นห้องสมุดที่เขียนด้วย Swift สำหรับการแยกวิเคราะห์และทำงานกับโครงการ XCode มันได้รับแรงบันดาลใจอย่างมากจาก Cocoapods Xcodeproj และ Xcode
| โครงการ | ที่เก็บ |
|---|---|
| projlint | github.com/jamitlabs/projlint |
| Rules_xCodeProj | github.com/buildbuddy-io/rules_xcodeproj |
| รักบี้ | github.com/swiftyfinch/Rugby |
| แหล่งที่มา | github.com/krzysztofzablocki/sourcery |
| คนโผงผาง | github.com/tuist/tuist |
| Xcodegen | github.com/yonaskolb/xcodegen |
| XSPM | gitlab.com/pyroh/xspm |
| รายการความเป็นส่วนตัว | github.com/stelabouras/privacy-manifest |
หากคุณใช้ประโยชน์จาก Xcodeproj ในโครงการของคุณอย่าลังเลที่จะเปิดประชาสัมพันธ์เพื่อรวมไว้ในรายการด้านบน
เพิ่มการพึ่งพาในไฟล์ 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 คุณสามารถทำให้งานโครงการโดยอัตโนมัติโดยใช้สคริปต์ตัวอย่างเช่นเราสามารถสร้างสคริปต์ที่เก็บคีย์เวอร์ชันของโครงการไว้ในการซิงค์กับแท็ก GIT ปัจจุบันที่แสดงถึงเวอร์ชันของโครงการ:
#!/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.gitPackage.swift ด้วย xcode Xcodeproj เปิดตัวภายใต้ใบอนุญาต MIT ดูใบอนุญาตสำหรับรายละเอียด
ขอบคุณไปที่คนที่ยอดเยี่ยมเหล่านี้ (คีย์อีโมจิ):
Joseph Colicchio - | deatondg - | แดนเฟลมมิ่ง | Sascha Schwabbauer - | Marcin Iwanicki - | Adam Khazi - | เอลเลียตวิลเลียมส์ |
Muukii - | Yuya Oka | Keith Smiley - | Ian Leitch | Subbotin Daniil | Florentin Bekier | Vadim Smal - |
Freddi (Yuki Aki) | Kristopher Jackson | Jake Prickett | Jake Adams | มัตสึจิ | Bogdan Belogurov | Chuck Grindel |
Michael McGuire | C- 凡 | Maxwell Elliott | Brentley Jones | Teameh | Johannes Ebeling | Baegteun |
Alex Kovács | Christoffer Winterkvist | ทิโมธีคอสตา | แมรี่ | Md. Ibrahim Hassan | ยาทาทารากอรี่ | Ruslan Alikhamov |
Ladislas de Telli | Matt Massicotte | артемворхик | Jaewon-yun | Mike Gerasymenko | Filip Racki | Kelvin Harron |
George Navarro | สูงสุด |
โครงการนี้เป็นไปตามข้อกำหนดทั้งหมดของผู้เข้าร่วม การมีส่วนร่วมทุกชนิดยินดีต้อนรับ!