The most likely cause of this problem is bundle identifiers. You wrote:
<key>VPNSubType</key>
<string>App Extension Bundle ID Here</string>
I’m going to presume you used a real value here, and this placeholder is just for the sake of your DevForums post. However, you seem to be mixed up on the expected value, namely:
VPNSubType
should be the bundle identifier of the host appVPN
> ProviderBundleIdentifier
should be the bundle identifier of the provider within that host app.
At the end of this response you’ll find the payload that I use for one of my test apps.
IMPORTANT This is an app proxy provider rather than a packet tunnel provider, and thus doesn’t have the
ProviderType
property. When you want to run a packet tunnel provider in per-app mode, you must include that key with the value
packet-tunnel
, as shown by your example.
Finally, be aware that a lot of the properties in this list are optional, and they’re only present here because I created the initial configuration profile using Apple Configurator, and it’s rather enthusiastic about including optional properties.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
<dict>
<key>PayloadUUID</key>
<string>944561DB-AEAD-43FA-8DC0-F8661BF5CC9A</string>
<key>PayloadType</key>
<string>com.apple.vpn.managed.applayer</string>
<key>PayloadIdentifier</key>
<string>com.apple.vpn.managed.applayer.7EDB76A2-ADFC-4D2B-8831-0BA2B1C75579</string>
<key>VPNType</key>
<string>VPN</string>
<key>VPNSubType</key>
<string>com.example.apple-samplecode.QNEAppProxy-macOS</string>
<key>UserDefinedName</key>
<string>QNEAppProxy</string>
<key>PayloadDescription</key>
<string>Configures VPN settings</string>
<key>PayloadDisplayName</key>
<string>VPN</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>VPNUUID</key>
<string>83A8720B-2BD5-4B7E-921D-3D9E312B4ACD</string>
<key>VPN</key>
<dict>
<key>RemoteAddress</key>
<string>example.com</string>
<key>AuthenticationMethod</key>
<string>Password</string>
<key>AuthName</key>
<string>mrgumby</string>
<key>AuthPassword</key>
<string>opendoor</string>
<key>ProviderBundleIdentifier</key>
<string>com.example.apple-samplecode.QNEAppProxy-macOS.Provider</string>
<key>OnDemandMatchAppEnabled</key>
<true/>
</dict>
<key>Proxies</key>
<dict>
<key>HTTPEnable</key>
<integer>0</integer>
<key>HTTPSEnable</key>
<integer>0</integer>
</dict>
<key>SafariDomains</key>
<array>
<string>httpbin.org</string>
</array>
</dict>