Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在iPhone手机中连接wifi时打开一些链接_Ios_Objective C_Websocket_Wifi_Http Redirect - Fatal编程技术网

Ios 在iPhone手机中连接wifi时打开一些链接

Ios 在iPhone手机中连接wifi时打开一些链接,ios,objective-c,websocket,wifi,http-redirect,Ios,Objective C,Websocket,Wifi,Http Redirect,我们需要在iPhone mobile中连接wifi时。我们需要在浏览器中自动打开应用程序故事。例如,我们有4个wifi的Himansu、hits、poll、hotspot。我们需要在连接wifi后连接人类时重定向到下面的链接 请告诉我任何想法。首先告诉我是否可以使用苹果提供的代码 获取Wifi网络名称 步骤1: 导入框架导入 步骤2 步骤3 @谢谢你的回复。请给我一些清晰的信息,比如我的iPhone有himansu wifi,所以我们需要显示警报或重定向到某个页面。如果其他网络不需要重定向其他页

我们需要在iPhone mobile中连接wifi时。我们需要在浏览器中自动打开应用程序故事。例如,我们有4个wifi的Himansu、hits、poll、hotspot。我们需要在连接wifi后连接人类时重定向到下面的链接


请告诉我任何想法。首先告诉我是否可以使用苹果提供的代码

获取Wifi网络名称

步骤1:

导入框架导入

步骤2

步骤3


@谢谢你的回复。请给我一些清晰的信息,比如我的iPhone有himansu wifi,所以我们需要显示警报或重定向到某个页面。如果其他网络不需要重定向其他页面,请检查更新的代码和您需要添加的内容,并优化工作
Reachability *reach = [Reachability reachabilityForInternetConnection];
[reach startNotifier];

NetworkStatus status = [reach currentReachabilityStatus];

if(status == NotReachable) 
{
    //No internet
}
else if (status == ReachableViaWiFi)
{
    //WiFi
         [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://itunes.apple.com/in/app/facebook/id284882215?mt=8"]];

}
else if (status == ReachableViaWWAN) 
{
    //3G
     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://itunes.apple.com/in/app/facebook/id284882215?mt=8"]];
}
implement the method in 

     CFArrayRef myArray = CNCopySupportedInterfaces();
    CFDictionaryRef myDict =   CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));

   NSLog(@"Connected at:%@",myDict);
   NSDictionary *myDictionary = (__bridge_transfer   NSDictionary*)myDict;

   NSString *  SSID = [myDictionary objectForKey:@"SSID"];
   NSLog(@"bssid is %@", SSID);

  // your console output is just like 
   SSID = "Eqra'aOrange";
  now you check your condition 

    if ([SSID isEqualToString:@"Himansu"])
    {
      // customize your code
     }
    else
     {
     // do your stuff
    }