Skip to content

Package used to work with XcodeProject files within Swift. Note: This projects still in beta

License

Notifications You must be signed in to change notification settings

TheAngryDarling/SwiftXcodeProj

Repository files navigation

Xcode Project

swift >= 4.0 macOS Linux Apache 2

A package used for reading/writing PBX Project Files and Xcode Projects.

The XcodeProj package uses its own wrapper around file system object so that file system providers can be created when wanting to access objects remotly. The idea behide this is using the XcodeProj packing on a mobile device like iPad that accesses the project which is on a remote server. This allows developers to write custom file system providers to suite their communication needs and not require that the whole project be downloaded locally before working on it. A file system provider for local files is provided within the project, and local constructor methods have been provided for both XcodeProject and XcodeWorkspace

Usage

import XcodeProj
    let project = try XcodeProject(fromURL: url) // URL is a local file URL
    project.targets // Get an array of targets
    project.resources // Access to the files/groups within the project
    
import PBXProj
    let pbxFile = try PBXProj(fromURL: url) // URL is a local file URL
    pbxFile.project // The project for this file
    pbxFile.mainGroup // Access tot he files/groups within the project
    pbxFile.objects // The array of objects within the file

Dependencies

  • Codable Helpers - A collection of helper methods, classes, and protocols when working with Encodable and Decodable
  • Code Timer - Provides a few help functions attached to the Timer class for timing code blocks (closures).
  • Nillable - Package used to identify nil/NSNull objects when stored in Any format
  • Raw Representable Helpers - Provides helper methods for interchanging between a RawRepresentable and its RawValue
  • String IANA Character Set Encoding - IANA Character Set Encoding Conversion
  • Swift Class Collections - Package used to work with swift class based collections that are equivalent to Array and Dictionary
  • Swift Patches - Provides some of the missing classes/method when changing between different swift versions
  • Version Kit - Provides the ability to store, parse, edit, and compare version strings

Author

License

This project is licensed under Apache License v2.0 - see the LICENSE.md file for details

Acknowledgments

While try to map out the format of the PBX Project File and other Xcode project files I used the following references: Wikipedia Monobjc Serialization