Hello everyone, I'm currently facing issues developing an app permitting VPN connections on iPhone using Xamarin.iOS ...
My setup:
- Visual Studio on Win10 (tried with VS19 community and VS22 community)
- Remote Mac build host
- Local iPhone 10 test device
What I did was:
- Created a binding library for a native framework (OpenVPNAdapter) (which compiles succesfully)
- Added reference for this binding library in a new app extension project (which compiles succesfully)
- Updated app extension and app container info.plist and entitlements.plist so they match (matching CFBundleId, CFBundleVersion for info.plist, checked NSExtension fields for app extension info.plist, matching application-groups, ...)
- Activated Mono interpreter on app extension and app container
- Disabled Linking on app extension and app container
- Set up correct provisioning profile for app extension, another one for app container
- Added reference for App extension project, tried also adding reference for app extension built DLL
Now my project compiles, but when the extension should be called, it appears it is not registered.
Does anyone have any idea what I could be doing wrong ? I'm stuck here.
iPhone log:
Dec 7 12:35:39 [myDevice] Notice 23836 nesessionmanager Found 0 (0 active) registrations for com.ghost.GhostSurf.VPNExtension (com.apple.networkextension.packet-tunnel)
Debug log:
https://gist.github.com/dantoine/048f2df7b848dbcc0a3358b186bbde08
Verbose build log:
https://gist.github.com/dantoine/b7c6abc17d281654906cdaf73e17fc2b
What I'm thinking is that Visual Studio successfully compiles my app into an .IPA file, containing my extension DLL, but for some reasons it is not treated as an app extension. (Extension DLL size: 12kb, native library bindings size: 18mb, final app .IPA size: 52mb)
I tried updating solution start-up to extension project, but I then can not deploy it on my iPhone (Error: choose a valid local device).