2

I'm working on an app, and need to alter com.apple.loginwindow. Specifically I need to perform the equivalent of this command:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Howdy""

I've attempted to run this through a Process(), but I get an "Operation is not Permitted" error.

Would anyone know a solution to this? Or a better way to write to these defaults? I'm fairly new to Swift so any help is appreciated!

I'm using Swift4, with Xcode 9.1

JobClob
  • 21
  • 1
  • Did you try `let userDefaults = UserDefaults(suiteName: "com.apple.loginwindow")` `userDefaults!.set("Howdy", forKey: "LoginwindowText")` ? – Daniel May 22 '19 at 17:38

0 Answers0