Swiftpack.co - Package - ZhengShouDong/XcodeManager

XcodeManager

Travis CI Carthage compatible Platform

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/ZhengShouDong/XcodeManager.git", from: "0.1.0")

Carthage

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

github "ZhengShouDong/XcodeManager" ~> 0.1.0

Usage

  1. import module.
import XcodeManager
  1. Initialize the Xcode project file.
var project = try? XcodeManager(projectFile: "../.../projectTest.xcodeproj", printLog: true)
  1. How to add static library in Xcode project?
project.addStaticLibraryToProject("../.../test.a")
  1. How to add framework in Xcode project?
project.addFrameworkToProject("../.../test.framework")
  1. How to add resources folder in Xcode project?
project.addFolderToProject("../.../test/")
  1. How to add a single resources file in Xcode project?
project.addFileToProject("../.../test.txt")
  1. How to modify the product name (display name)?
project.updateProductName("TestProduct")
  1. How to modify the bundle id?
project.updateBundleId("cn.zhengshoudong.TestProduct")
  1. How to add new value?
project.addNewLibrarySearchPathValue("$(PROJECT_DIR)/TestProduct/Folder")
  1. How to add new value?
project.addNewFrameworkSearchPathValue("$(PROJECT_DIR)/TestProduct/Folder")
  1. How to control the CodeSignStyle(manual OR automatic)?
project.updateCodeSignStyle(type: .manual)
  1. Complete modification? Write to a .pbxproj file!
let isSaveSuccess = project.save()
if (isSaveSuccess) {
	print("Done!")
}

Github

link
Stars: 0
Help us keep the lights on

Dependencies