Swiftpack.co -  phimage/XcodeProjKit as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
phimage/XcodeProjKit
Parse project file and write it to open step format.
.package(url: "https://github.com/phimage/XcodeProjKit.git", from: "2.3.0")

XcodeProjKit

Parse project file and write it to open step format.

Project description

Plist files could be in binary, xml or open step format. All could be parsed natively using PropertyListSerialization.

:warning: But you cannot be written back into open step format.

This project aim to

  • check xcode project file. Error could occurs after merging file using git.
  • rewrite the file into open step format, if you edit it using some command line like plutil.

Alternatively you can use apple private framework DVTFoundation, like Xcodeproj do.

Usage

Read

let xcodeProj = try XcodeProj(url: url)
let project: PBXProject = xcodeProj.project

let mainGroup: PBXGroup? = project.mainGroup
let targets: [PBXNativeTarget] = project.targets
let buildConfigurationList: XCConfigurationList? = project.buildConfigurationList

Write

try xcodeProj.write(to: newURL, format: .openStep)

Setup

Using Swift Package Manager

let package = Package(
    name: "MyProject",
    dependencies: [
        .package(url: "https://github.com/phimage/XcodeProjKit.git", .upToNextMajor(from: "2.2.0")),
        ],
    targets: [
        .target(
            name: "MyProject",
            dependencies: ["XcodeProjKit"]),
        ]
)

Using Carthage

Carthage is a decentralized dependency manager for Objective-C and Swift.

Add the project to your Cartfile.

github "phimage/XcodeProjKit"

Run carthage update and follow the additional steps in order to add MomXML to your project.

Using Cocoapod

Add the project to your Podfile.

pod "XcodeProjKit"

Referenes

Thanks

TODO

  • Make a command line tools

Contribute

  • Fork
  • Make PR

GitHub

link
Stars: 4
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

📦 Swift Package Manager Product nodes
2 weeks ago
  • XCRemoteSwiftPackageReference
  • XCSwiftPackageProductDependency

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API