Text of developer.apple.com › forums › thread › 857706 as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Can a Mac App Store (sandboxed) ap… | Apple Developer Forums

Can a Mac App Store (sandboxed) app create and delete VLAN interfaces with SCVLANInterfaceCreate? App & System Services Core OS Virtualization System Configuration App Sandbox You’re now watching this thread. If you’ve opted in to email or web notifications, you’ll be notified when there’s activity. Click again to stop watching or visit your profile to manage watched threads and notifications. You’ve stopped watching this thread and will no longer receive emails or web notifications when there’s activity.

Click again to start watching. rbmanian75 OP Created 4d Replies 5 Boosts 0 Views 132 Participants 2 We make a Mac App Store app that runs virtual machines with the Virtualization framework. It has the com.apple.vm.networking entitlement and already bridges VMs to physical interfaces through VZBridgedNetworkDeviceAttachment. We'd like users to manage 802.1Q VLAN interfaces from inside the app, so they can create a VLAN on an Ethernet port and bridge a VM to it.

The SystemConfiguration API for this is: var auth: AuthorizationRef? var item = AuthorizationItem(name: "system.services.systemconfiguration.network", valueLength: 0, value: nil, flags: 0) var rights = AuthorizationRights(count: 1, items: &item) AuthorizationCreate(&rights, nil, [.interactionAllowed, .extendRights, .preAuthorize], &auth) let prefs = SCPreferencesCreateWithAuthorization(nil, "MyApp" as CFString, nil, auth!)!

SCPreferencesLock(prefs, true) // fails in the sandbox let vlan = SCVLANInterfaceCreate(prefs, physicalInterface, 100 as CFNumber) SCPreferencesCommitChanges(prefs) SCPreferencesApplyChanges(prefs) SCPreferencesUnlock(prefs) What we see on macOS 27: Without the sandbox, SCPreferencesLock on preferences created with SCPreferencesCreateWithAuthorization succeeds. With com.apple.security.app-sandbox, the same call fails with kSCStatusAccessError ("Permission denied").

Read-only calls work in the sandbox: SCVLANInterfaceCopyAll, ACVLANInterfaceCopyAvailablePhysicalInterfaces and SCNetworkInterfaceCopyAll all return the expected results. Our questions: Can a sandboxed Mac App Store app create or delete VLAN interfaces in any supported way, through SystemConfiguration or another API? If not, is there an entitlement we could request for this, similar to com.apple.vm.networking? Or is a privileged helper (SMAppService.daemon) the only way?

As we understand it, the Mac App Store doesn't allow a privileged helper. Are VLAN interfaces (vlanN) meant to appear in VZBridgedNetworkInterface.networkInterfaces(update: it appears i create vlan interface using mac settings network settings) so a VM can be bridged to one? Does vmnet's bridged mode support them? If a VM is bridged to the physical Ethernet port and tags its own frames inside the guest, do the 802.1Q tags pass through the bridge unchanged?

If creating VLANs isn't possible from the sandbox, our fallback is to list the existing VLANs and send users to System Settings › Network › Manage Virtual Interfaces. We'd like to confirm that before building it. Thanks! Answered by DTS Engineer in 916794022 Written by rbmanian75 in 857706021 1- Can a sandboxed Mac App Store app create or delete VLAN interfaces in any supported way … ? No. You’ve found the correct way to set this up, that is, using System Configuration framework.

But that authorises the request using Authorization Services, and that’s blocked by the App Sandbox. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Replies 5 Boosts 0 Views 132 Participants 2 DTS Engineer OP Apple 2d Recommended Written by rbmanian75 in 857706021 1- Can a sandboxed Mac App Store app create or delete VLAN interfaces in any supported way … ?

No. You’ve found the correct way to set this up, that is, using System Configuration framework. But that authorises the request using Authorization Services, and that’s blocked by the App Sandbox. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Add comment rbmanian75 OP 2d So if i understand correctly there is no way i can do this with appstore sandboxed app.

I have to guide the user to use System Settings -> Network Settings to create VLAN? Is that right? Add comment DTS Engineer OP Apple 1d Written by rbmanian75 in 916798022 there is no way i can do this with appstore sandboxed app. I Correct. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Add comment rbmanian75 OP 1d It would be nich addition if i could allow the user to creat/delete VLAN in the app itself this avoid the user to get out of the app and dig into systen settings.

It would be very powerful feature for virutalization application to provide this option in the app itself. should i file a feedback or we can expect to have this available in the upcoming versions? Add comment DTS Engineer OP Apple 21h Written by rbmanian75 in 917142022 should i file a feedback … ? Yes. Please be specific about the user-level problem you’re trying to solve here. Historically, App Sandbox has prevented the app from making system-wide changes, even with the approval of the user.

That restriction has been somewhat relaxed recently — although the user still has to approve such changes, obviously — so there might be some scope for accommodating your requirements. However, it pays to be specific. A bug requesting the ability to make arbitrary network changes is less likely to get traction than a bug requesting a solution to a specific user-level problem. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Add comment