First up, I’m only able to help with supported techniques, so no monkeying around with preferences files directly. However, it’s useful to understand these preferences files because they impact on how the API is structured. Specifically,
/Library/Preferences/SystemConfiguration/preferences.plist
is fronted by the SCPreferences API; almost everything in that file can be changed in a supported way via that API. OTOH,
/Library/Preferences/com.apple.networkextension.plist
and its friends are less accessible. To understand this, you have to understand a little bit about the history of System Configuration framework.
Way back in the day, at the dawn of Mac OS X, when dial-up networking was still a thing, there was only
preferences.plist
. You could create dial-up interfaces using SCPreferences and control them using SCNetworkConnection. Life was good.
Eventually things got more complex. First, VPN was introduced, piggybacking on the dial-up infrastructure (which makes sense when you think about early VPNs, like PPTP). Second, both dial-up and VPN got the notion of sub-configurations that were independent of the interface configuration. These were modelled outside of the SCPreferences world partly because, at least in the VPN space, such configurations are both complex and interface-specific.
Historically there’s been no API-level access to these VPN configurations. It was still possible to set up VPN via SCPreferences and control it via SCNetworkConnection, but it [wasn’t much fun][nofun] and you definitely couldn’t get to all the features.
Network Extension framework represents the ultimate solution to this. It’s not what folks really want (which is an API that gives them total control) but it is what we can give you given the direction our platforms are moving (with sandboxing, privacy concerns, and so on). Unless we change direction here your options are:
play in the Network Extension sandbox, which is where all the new cool stuff is being added
try to get things limping along with all the old stuff
I know which approach I’d take (-:
Perhaps using Configuration Profiles is the way to go?
Possibly. Profiles work best in a managed environment, so it kinda depends on the context. And you haven’t really explained much of your context. Why are you distributing via Developer ID?
Is there a recommended way to install programatically?
No. You can install a profile using
profiles
, but I’d hardly call that
recommended.
Is System Configuration Framework still supported?
Yes.
I could not find the MoreSCF example.
The sample has been retired because its primary focus was setting up the network, and it uses the low-level SCPreferences API to do that. With the introduction of
<SystemConfiguration/SCNetworkConfiguration.h>
in 10.4, that approach was no longer recommended. And, alas, I’ve never had time to update the sample.
What time zone are you in?
GMT+1 (although I’ll be GMT+7 next week and the week after).
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
WWDC runs Mon, 13 Jun through to Fri, 17 Jun. During that time all of DTS will be at the conference, helping folks out face-to-face. http://developer.apple.com/wwdc/