Home Features Docs Blog Support GitHub

Running Packet Tunnel Provider as App Extension


#1

Hi,

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 Upgrade@40% VerifyingApplication. I have waited for minutes and also hours but it doesn’t continue.

The output of Android Studio:

LOG

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

:ios:processResources UP-TO-DATE
:ios:classes
:ios:moeMainProGuard
:ios:moeMainRetrolambda
:ios:moeGenerateUIObjCInterfaces
:ios:moeMainDex
:ios:moeMainDebugArm64Dex2Oat
:ios:moeMainResourcePackager
:ios:moeMainStartupProvider
:ios:moeMainDebugArm64IphoneosXcodeProvider
:ios:moeMainDebugArmDex2Oat
:ios:moeMainDebugArmv7IphoneosXcodeProvider
:ios:moeMainDebugArmv7sIphoneosXcodeProvider
:ios:moeMainDebugIphoneosXcodeBuild
:ios:moeLaunch
Waiting for iOS Device…
Uploading:

  • FileUpload@4% MyVPN
  • FileUpload@8% 01J-lp-oVM-view-Ze5-6b-2t3.nib
  • FileUpload@12% Info.plist
  • FileUpload@16% UIViewController-01J-lp-oVM.nib
  • FileUpload@20% Info.plist
  • FileUpload@25% UIViewController-v9q-ps-C8H.nib
  • FileUpload@29% v9q-ps-C8H-view-VvG-xj-ANy.nib
  • FileUpload@33% Info.plist
  • FileUpload@37% MOE
  • FileUpload@41% CodeResources
  • FileUpload@45% Info.plist
  • FileUpload@50% PkgInfo
  • FileUpload@54% Info.plist
  • FileUpload@58% CodeDirectory
  • FileUpload@62% CodeEntitlements
  • FileUpload@66% CodeRequirements
  • FileUpload@70% CodeRequirements-1
  • FileUpload@75% CodeResources
  • FileUpload@79% CodeSignature
  • FileUpload@83% embedded.mobileprovision
  • FileUpload@87% CodeResources
  • FileUpload@91% application.jar
  • FileUpload@95% embedded.mobileprovision
  • FileUpload@100% preregister.txt

Installing:

  • Upgrade@5% CreatingStagingDirectory
  • Upgrade@15% ExtractingPackage
  • Upgrade@20% InspectingPackage
  • Upgrade@20% TakingInstallLock
  • Upgrade@30% PreflightingApplication
  • Upgrade@30% InstallingEmbeddedProfile
  • Upgrade@30% InstallingEmbeddedProfile
  • Upgrade@40% VerifyingApplication

Thank you in advance for any help you can provide!


(Gergely Kis - Migeran) #2

Hi,

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,
Gergely


#3

Hi,

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!


#4

Hi,

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!