Forked from dannote/final-cut-pro-trial-reset.swift
Created
October 17, 2023 09:51
-
-
Save madebydor/5f9f1ec0ec7ec3bbc31518e8b24b0fa3 to your computer and use it in GitHub Desktop.
Final Cut Pro X trial reset
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 characters
| #!/usr/bin/swift | |
| import Foundation | |
| let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath) | |
| let data = try! NSData(contentsOf: path) as Data | |
| let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary | |
| let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary | |
| for (key, value) in mutableDictionary { | |
| if value is NSDate { | |
| mutableDictionary[key] = Date() | |
| } | |
| } | |
| try! NSKeyedArchiver.archivedData(withRootObject: mutableDictionary, requiringSecureCoding: false).write(to: path) | |
| print("You'd better buy it") |
mv -v ~/Library/Application\ Support/.ffuserdata ~/.Trash
פשוט להריץ את זה
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mv -v ~/Library/Application\ Support/.ffuserdata ~/.Trash