Hello!
We have problems with include Network Extension.
Network extension is not available.
We got a new template containing the Network Extension entitlements for our team. We created a new provisioning profile in the "Certificates, Identifiers & Profiles" section of the developer web site with NetworkExtension issue. We created app entitlements file and added "com.apple.developer.networking.networkextension" and "UIBackgroundModes" keys to plist. We have worked with NEHotspotHelper two days, then we added devices to certificate and NEHotspotHelper stopped working. The «registerWithOptions» command always return NO.
We try to create a new certificates, new app ID, but nothing helped.
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:@"Try here", kNEHotspotHelperOptionDisplayName, nil];
dispatch_queue_t queue = dispatch_queue_create("com.myapp.ex", 0);
BOOL isAvailable = [NEHotspotHelper registerWithOptions:options queue:queue handler: ^(NEHotspotHelperCommand * cmd) {
NSMutableArray *hotspotList = [NSMutableArray new];
NSString* command = (cmd.commandType == kNEHotspotHelperCommandTypeEvaluate) ? @"CommandTypeEvaluate" : @"CommandTypeFilterScanList";
NSLog(@"\n %@ \n",command);
if(cmd.commandType == kNEHotspotHelperCommandTypeEvaluate || cmd.commandType == kNEHotspotHelperCommandTypeFilterScanList) {
for (NEHotspotNetwork* network in cmd.networkList) {
NSLog(@"Hotspot is found ssid: %@, bssid: %@\n", network.SSID, network.BSSID);
[hotspotList addObject:network];
}
NEHotspotHelperResponse *response = [cmd createResponse:kNEHotspotHelperResultSuccess];
[response setNetworkList:hotspotList];
[response deliver];
}
}];G.R.A.P.E.entitlements file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>HRG8K62TZ7.com.aximediasoft.grape</string>
<key>com.apple.developer.networking.HotspotHelper</key>
<true/>
</dict>
</plist>
Info.plist file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>com.apple.developer.networking.networkextension</key>
<true/>
</dict>
</plist>