networkextension

NetworkExtension connectOnDemand rules doesn't work

不想你离开。 提交于 2019-12-02 15:21:52
问题 I have an app with VPN config created by the new NetworkExtension framework. It works just fine, but now I need to add some rules to turn this VPN only when I'm trying to connect to a specific URL. I planed to use NEVPNManager's connectOnDemand feature, but it does`t seem to be working for me. When I'm opening http://some-site.com in safari my VPN connection should establish, but for some reason it does't. I tried a different type of configurations as well as using generated .mobileconfig

NetworkExtension connectOnDemand rules doesn't work

a 夏天 提交于 2019-12-02 03:10:25
I have an app with VPN config created by the new NetworkExtension framework. It works just fine, but now I need to add some rules to turn this VPN only when I'm trying to connect to a specific URL. I planed to use NEVPNManager's connectOnDemand feature, but it does`t seem to be working for me. When I'm opening http://some-site.com in safari my VPN connection should establish, but for some reason it does't. I tried a different type of configurations as well as using generated .mobileconfig files to make connectOnDemand work, but with no luck. Whats wrong with it? I'm testing on code like this:

“Error Domain=NEVPNErrorDomain Code=1 \\”(null)\\“” While connecting VPN server

让人想犯罪 __ 提交于 2019-11-30 22:42:58
I'm getting "Error Domain=NEVPNErrorDomain Code=1 \"(null)\"" only first time while connecting to VPN server, later onwards it works perfectly. I've checked NEVPNErrorDomain Error 1 when trying to start TunnelProvider network extension similar to my problem and followed the way its said in this solution but still getting same error. So here is my code for connecting to VPN Server using Network Extension. func initVPNTunnelProviderManager(){ self.vpnManager.loadFromPreferences { (error) -> Void in if((error) != nil) { print("VPN Preferences error: 1") } else { let p = NEVPNProtocolIKEv2() p

NEHotspotConfigurationErrorDomain Code=8 “internal error.”

戏子无情 提交于 2019-11-29 11:52:41
问题 I'm using NEHotspotConfigurationManager with on iOS 11 iPhone to connect to specific Wi-Fi spot and then disconnect from it. Here is the code: if (@available(iOS 11.0, *)) { NEHotspotConfiguration *configuration = [[NEHotspotConfiguration alloc] initWithSSID:self.specififcWiFiSSID passphrase:self.specififcWiFiPassword isWEP:NO]; configuration.joinOnce = YES; [[NEHotspotConfigurationManager sharedManager] applyConfiguration:configuration completionHandler:^(NSError * _Nullable error) { NSLog(@

NEHotspotHelper annotations not appearing

蓝咒 提交于 2019-11-26 14:09:47
问题 We tried out the new NetworkExtension API. We were successful in recreating all the steps in our app. But, we have an issue that we are still not seeing the custom annotation below the SSID name in the Wifi settings screen. We are on ios 9 Beta 3, xcode 7 beta 3. We have done these steps successfully: @note 1 The application's Info.plist MUST include a UIBackgroundModes array * containing 'network-authentication'. @note 2 * The application MUST set 'com.apple.developer.networking