Running Packet Tunnel Provider as App Extension


currently I am trying to build a VPN solution with the help of MOE and the Network Extensions framework from Apple.
I have got the necessary entitlements from my development team, created an App Extension target for my PacketTunnelProvider in XCode and set the required NSExtensionPointIdentifier key in its Plist file. The app gets build and uploaded, but at the “Installing:” section of Multi-OS Engines log inside of Android Studio, its stopping at [email protected]% VerifyingApplication. I have waited for minutes and also hours but it doesn’t continue.

The output of Android Studio:


:common:compileJava UP-TO-DATE
:common:processResources UP-TO-DATE
:common:classes UP-TO-DATE
:ios:compileJavaNote: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:ios:processResources UP-TO-DATE
Waiting for iOS Device…


Thank you in advance for any help you can provide!


One option you can try is to install from Xcode.

From Android Studio context menu use the Open in Xcode menu item, and then from Xcode just launch the app on your device and see what happens.

Best Regards,


i recreated my project and copied the code, it has launched now. But it doesn’t launch the App Extension, I will investigate this next.

Thank you!


I got one more question to this topic. Currently, my main application is run by MOE, my network extension is written in Objective C and both are working as intended. Now, I have to run Java in my extension too. My first thought has been the use of JNI inside my Objective C Code. I have worked myself through the fastJNI and JNIfromObjC sample code and tried to adapt them.

Therefore I came to question, if I am able to run a MOE VM inside of my extension or acces the VM of my main application. Furthermore, I have asked myself if its possible to deploy my extension with MOE, just like I did with my main app.

Many thanks in advance!