PacketTunnelProvider - testing on Mac

Since testing my on-demand VPN app (with Packet Tunnel Provider) on my personal Mac has some problems (such as the VPN is not working as on-demand even it's suppose to do so), I want to test it on a virtual machine.

What should be my goal?

1. Build the app on my Mac, archive it, and then test it on the VM? because this would take a lot of time..

or

2. Build the app on the VM, which would also allow me to change the codes and rebuild it every time I want. This is much better, but how can I achieve it?

Accepted Reply

Option #2 isn’t going to work. The whole point of testing on a VM is that you want to isolate your testing from the wreckage created by development. If you do your development on your VM, there’s no difference from doing it on the host Mac.

With regards your specific issue, in working with another developer I’ve discovered that VPN On Demand will only work on the Mac if your provider’s host app was installed by an installer. Thus, you have two options:

  • Cons up a minimal installer just to test this (A)

  • Install the app via the store (details below) (B)

Option A is good for day-to-day development. Option B is a good test for how your app will behave on real user devices.

With regards option B, there’s no TestFlight on the Mac so you can’t use that approach. What you can do, however, is:

  1. Run the app through App Review

  2. Don’t release it to your users

  3. Generate a promo code for the new version

  4. Install the app using that promo code

Obviously there are multiple pain points here; feel free to file bug reports about the ones you find most painful. And, as always, please post your bug numbers, just for the record.

Share and Enjoy

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

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

WWDC runs Mon, 5 Jun through to Fri, 9 Jun. During that time all of DTS will be at the conference, helping folks out face-to-face. http://developer.apple.com/wwdc/

Replies

Option #2 isn’t going to work. The whole point of testing on a VM is that you want to isolate your testing from the wreckage created by development. If you do your development on your VM, there’s no difference from doing it on the host Mac.

With regards your specific issue, in working with another developer I’ve discovered that VPN On Demand will only work on the Mac if your provider’s host app was installed by an installer. Thus, you have two options:

  • Cons up a minimal installer just to test this (A)

  • Install the app via the store (details below) (B)

Option A is good for day-to-day development. Option B is a good test for how your app will behave on real user devices.

With regards option B, there’s no TestFlight on the Mac so you can’t use that approach. What you can do, however, is:

  1. Run the app through App Review

  2. Don’t release it to your users

  3. Generate a promo code for the new version

  4. Install the app using that promo code

Obviously there are multiple pain points here; feel free to file bug reports about the ones you find most painful. And, as always, please post your bug numbers, just for the record.

Share and Enjoy

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

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

WWDC runs Mon, 5 Jun through to Fri, 9 Jun. During that time all of DTS will be at the conference, helping folks out face-to-face. http://developer.apple.com/wwdc/

Thanks! Great workaround 🙂

Also, filled a bug report -

32375148

Which is marked as DUPLICATE OF 30195454 (OPEN)

Minor update: got this msg from Apple. Can't tell if the issue been fixed or just closed.


The original report on your issue has been closed recently. Please note that you will not be able to directly view the original report in order to keep its information confidential.

The original bug (r. 30195454) was reported as fixed in macOS 10.13 beta.

Share and Enjoy

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

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

Great to hear!🙂