Skip to content

Instantly share code, notes, and snippets.

@toshi0383
Created May 1, 2017 05:48
Show Gist options
  • Save toshi0383/e2cb1a99d0b7c0df90f46526a095bd36 to your computer and use it in GitHub Desktop.
Save toshi0383/e2cb1a99d0b7c0df90f46526a095bd36 to your computer and use it in GitHub Desktop.
import Foundation
import PathKit
var format = PropertyListSerialization.PropertyListFormat.xml
var raw = try! PropertyListSerialization.propertyList(from: data, format: &format)
(raw as AnyObject).setValue("3", forKeyPath: "archiveVersion")
// Using String Interporation is important and there is no other ways to write a valid pbxproj..
try! Path("./updated.pbxproj").write("\(self.raw)\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment