Skip to content

Instantly share code, notes, and snippets.

@dannote
Last active April 17, 2024 10:39
Show Gist options
  • Save dannote/17e0396fe2e19c6e60c915838376d267 to your computer and use it in GitHub Desktop.
Save dannote/17e0396fe2e19c6e60c915838376d267 to your computer and use it in GitHub Desktop.
Final Cut Pro X trial reset
#!/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")
@adamaaaa-stack
Copy link

hey if anyone is looking for lpx 10.5.1 its here
i was just digging around on web archive and found this
hope it helps
(https://web.archive.org/web/20200813214541/https://www.apple.com/logic-pro/trial/)

@Urminhirpara
Copy link

can it work on new macos 14 sonoma

@tueng1
Copy link

tueng1 commented Oct 30, 2023

can it work on new macos 14 sonoma

Yes

@karanmgandhi
Copy link

@tueng1 I am trying to run your command in Sonoma but it doesn't work. Here's the error I get. Can you please help?

Screenshot 2024-02-20 at 5 29 33 PM
Screenshot 2024-02-20 at 5 30 28 PM

@TehBrian
Copy link

@tueng1 I am trying to run your command in Sonoma but it doesn't work. Here's the error I get. Can you please help?

@karanmgandhi, run it in the Terminal app.

Shortcuts is running it as administrator and therefore ~ refers to root's home (as opposed to your user's home) which is not where .ffuserdata is stored.

@karanmgandhi
Copy link

karanmgandhi commented Feb 21, 2024

Understood, tried it and it worked! Thanks a lot @TehBrian !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment