Final Cut Pro X trial reset
This file contains 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") |
Hello! I am trying to run this on my Intel Mac running Monterey and I keep getting the error code "zsh: event not found: /usr/bin/swift"
How do I solve this? This is running in Terminal, it seems that's how it needs to be done.
Hello! I am trying to run this on my Intel Mac running Monterey and I keep getting the error code "zsh: event not found: /usr/bin/swift"
How do I solve this? This is running in Terminal, it seems that's how it needs to be done.
@scriptivRED, try this script instead: https://gist.github.com/TehBrian/bf82c7505b647d423da6d5abbe2b95a3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi guys, I'm trying to run the command on my M1, but it still give me the error message "no such file or directory". Ran it on my intel mac and worked. Can you help me?