Created
February 25, 2015 02:42
-
-
Save poundbangbash/f7b2a54416a5d9c2382c to your computer and use it in GitHub Desktop.
Repro
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
First, create a plist file with the keys you want to manage. | |
defaults write my.great.app setting1 -string foobar | |
defaults write my.great.app setting2 -bool false | |
defaults read my.great.app | |
{ | |
setting1 = foobar; | |
setting2 = 0; | |
} | |
mcxToProfile to create a Profile to manage the domain "often". | |
mcxToProfile.py --plist ~/Library/Preferences/my.great.app.plist --identifier MyGreatApp --manage Often | |
Setup an unmanaged test VM or use a test machine running Yosemite. | |
Copy the profile to the test machine and install it | |
sudo profiles -IF MyGreatApp.mobileconfig | |
You can see the preferences have been applied by running | |
`defaults read my.great.app` | |
Add some custom preferences after the Profile was installed: | |
defaults write my.great.app setting3 -string Chickens | |
defaults write my.great.app setting4 -int 42 | |
defaults read my.great.app | |
{ | |
setting1 = foobar; | |
setting2 = 0; | |
setting3 = Chickens; | |
setting4 = 42; | |
} | |
Log out and back into OS X and read the plist again. | |
defaults read my.great.app | |
{ | |
setting1 = foobar; | |
setting2 = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment