当我的iPhone连接在我的iPhone手机上时打开一些链接

时间:2015-07-03 09:54:30

标签: ios objective-c websocket wifi http-redirect

我们需要在iPhone手机上连接wifi。我们需要在浏览器中自动打开应用程序故事。我们有4个wifi的Himansu,点击,民意调查,热点。我们需要当wifi连接人类连接后它重定向到下面的链接

https://itunes.apple.com/in/app/facebook/id284882215?mt=8

请给我任何想法。首先告诉我有可能

1 个答案:

答案 0 :(得分:4)

使用代码apple提供here

#import <SystemConfiguration/CaptiveNetwork.h>

获取Wifi网络名称

第1步:

导入框架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";

第2步

  now you check your condition 

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

步骤3

SELECT e.ref,e.country , AVG(case when c.country = e.country then e.value end) as avge,SUM(volume)
FROM exchanges e left join valid_country as c on e.country = c.country
GROUP BY e.ref