How to read the VPN profile- that is deployed via MDM- from the app?

I deployed a custom VPN configuration on the device via an MDM profile. The field "Identifier" of the VPN configuration has the value same as that of my app's bundle identifier. But, loadAllFromPreferences method is returning an empty list and the app is not able to detect/read/modify this VPN profile. How do I associate this VPN configuration with my app?

Accepted Reply

To start, what platform are you working on?

Next, you wrote:

The field "Identifier" of the VPN configuration …

What field exactly? If you look at the Configuration Profile Reference you’ll see that VPN payloads have two identifiers:

  • VPNSubType
    — This is meant to be the bundle identifier if the app hosting your provider.
  • ProviderBundleIdentifier
    — This is meant to be the bundle identifier of the provider itself. This one is optional in most cases, but I recommend that you always include it.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

To start, what platform are you working on?

Next, you wrote:

The field "Identifier" of the VPN configuration …

What field exactly? If you look at the Configuration Profile Reference you’ll see that VPN payloads have two identifiers:

  • VPNSubType
    — This is meant to be the bundle identifier if the app hosting your provider.
  • ProviderBundleIdentifier
    — This is meant to be the bundle identifier of the provider itself. This one is optional in most cases, but I recommend that you always include it.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks Eskimo! This resolved the issue.