Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rodrigoblz1/b51a7eea16650651be4ac1aa6a662515 to your computer and use it in GitHub Desktop.
Save rodrigoblz1/b51a7eea16650651be4ac1aa6a662515 to your computer and use it in GitHub Desktop.

Revisions

  1. @dannote dannote created this gist Dec 8, 2017.
    17 changes: 17 additions & 0 deletions final-cut-pro-trial-reset.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/usr/bin/swift

    import Foundation

    let path = NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath
    let data = NSKeyedUnarchiver.unarchiveObject(withFile: path) as! NSDictionary
    let mutableData = data.mutableCopy() as! NSMutableDictionary

    for (key, value) in mutableData {
    if value is NSDate {
    mutableData[key] = Date()
    }
    }

    NSKeyedArchiver.archiveRootObject(mutableData, toFile: path)

    print("You'd better buy it")