Reputation: 1
how I can start a system service for example wifi, when an application is launched on ios? my application just run in one specific wifi connection only....... i am using Reachability and also cheched wifi connections but i want to provide specific custom wifi credentials.
Reachability* wifiReach = [Reachability reachabilityForLocalWiFi];
NetworkStatus netStatus = [wifiReach currentReachabilityStatus];
if (netStatus!=ReachableViaWiFi){
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No WIFI available!", @"AlertView") message:NSLocalizedString(@"You have no wifi connection available. Please connect to a WIFI network.", @"AlertView")delegate:self cancelButtonTitle:nil otherButtonTitles:@"Ok", nil];
[alertView show];
}else{
printf("\n wifi");
}
Upvotes: 0
Views: 116
Reputation: 1367
It's not possible to establish a WiFi connection from within your app (at least not without using private APIs or a jailbroken device). It can only be configured by the user from the iOS Settings.
If you're developing an Enterprise app usually devices can have their WiFi pre-configured either by using Apple Configurator or a MDM (Mobile Device Management) software.
Upvotes: 2