After some time, research. I eventually turned to Apple Code Level Support for help. Apple claims that this problem is likely to occur when you reinstall the application. They say that this is probably due to the Image UUID of the main application and the reskinned applications are the same. When you install both of them on your phone, the system will consider the reskinned application as the same application compared to the main application. Thus, if one application cannot access the WLAN, it will also affect the other. In their opinion, this looks like a bug in iOS . And they do nβt currently have a solution for developers. This is the radar error number:
What I did to somehow reduce the occurrence of the problem was to add tracking to Network Restriction using the following code.
- (void)startCheckingNetworkRestriction { __weak AppDelegate *weakSelf = self; _monitor = [[CTCellularData alloc] init]; _monitor.cellularDataRestrictionDidUpdateNotifier = ^(CTCellularDataRestrictedState state) { [[NSOperationQueue mainQueue] addOperationWithBlock:^ { NSString * statusStr; switch(state) { case kCTCellularDataRestrictedStateUnknown: { statusStr = @"restriction status:Unknown"; } break; case kCTCellularDataRestricted: { statusStr = @"restriction status:restricted"; [weakSelf performUrlSession]; } break; case kCTCellularDataNotRestricted: { statusStr = @"restriction status:not restricted"; } break; default: { abort(); } break; } NSLog(@"Restriction state: %@", statusStr); }]; }; }
Please note that for this you need to import CoreTelephony.
@import CoreTelephony;
when I find that the network is limited. I will open a URL session to force access to the Internet and hope that a crash warning dialog box opens. As soon as the warning pops up, the WLAN Access settings that I spoke about will definitely appear under the settings. There are times when this does not work. If this happens, you just need to rename the package identifier and make a couple of changes to your code and then restore it several times (well, this is what I did when I experimented). Reinstalling the application will do nothing. Restarting and rebooting the phone will also not.
Hope this helps.
source share