Skip to content

Latest commit

History

55 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

XcodeManager

Build StatusCarthage compatiblePlatform

The better way to manage the Xcode project file (project.pbxproj) in swift. This swift module lets you automate the modification process.

Requirements

  • macOS 10.12+
  • Xcode 8+

Integration

Swift Package Manager

.package(url:"https://github.com/0x973/XcodeManager.git", from:"0.2.0")

Carthage

You can use Carthage to install XcodeManager by adding it to your Cartfile:

github "0x973/XcodeManager" ~> 0.2.0

Usage

  1. import module.
import XcodeManager
  1. Initialize the Xcode project file.
varproject=try?XcodeManager(projectFile:"../.../xxx.xcodeproj", printLog:true)
  1. How to add static library in Xcode project?
project.linkStaticLibrary("../.../test.a")
  1. How to add framework in Xcode project?
project.linkFramework("../.../test.framework")
  1. How to add resources folder in Xcode project?
project.addFolder("../.../test/")
  1. How to add a single resources file in Xcode project?
project.addFile("../.../test.txt")
  1. How to modify the product name (display name)?
project.setProductName("TestProduct")
  1. How to modify the Bundle Identifier?
project.setBundleId("cn.x0x01.TestProduct")
  1. How to add new value?
project.setLibrarySearchPathValue("$(PROJECT_DIR)/TestProduct/Folder")
  1. How to add new value?
project.setFrameworkSearchPathValue("$(PROJECT_DIR)/TestProduct/Folder")
  1. How to control the CodeSignStyle(manual OR automatic)?
project.setCodeSignStyle(type:.automatic)
project.setCodeSignStyle(type:.manual)
  1. Complete modification? Write to a .pbxproj file!
letisSaveSuccess=try? project.save()if(isSaveSuccess){print("Done!")}

About

A swift module to manipulate Xcode projects(project.pbxproj),written in swift

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages