Forked from dannote/final-cut-pro-trial-reset.swift
Created
November 23, 2018 03:23
-
-
Save ShichenLiu/a59f496fbb10852fee290913494ccbbd to your computer and use it in GitHub Desktop.
Revisions
-
dannote created this gist
Dec 8, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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")