fixed ios wifi part support. retry 1.
This commit is contained in:
1 parent
faa51215f3
commit
521c14b2fc
4 files changed
+7
-3
No files matched your search
@@ -288,6 +288,7 @@ static NSString * const BluememeDeviceKeyDefaultsKey = @"bluememe_utils_device_k
|
||||
NSString *security = [[self stringFromDictionary:options key:@"security"] lowercaseString];
|
||||
BOOL isWep = [security isEqualToString:@"wep"] || [self boolFromDictionary:options key:@"isWep" defaultValue:NO];
|
||||
BOOL joinOnce = [self boolFromDictionary:options key:@"joinOnce" defaultValue:defaultJoinOnce];
|
||||
BOOL hiddenSsid = [self boolFromDictionary:options key:@"hiddenSsid" defaultValue:NO];
|
||||
|
||||
if (ssid.length == 0) {
|
||||
[self sendErrorForCommand:command code:@"INVALID_WIFI_OPTIONS" message:@"ssid is required."];
|
||||
@@ -308,6 +309,9 @@ static NSString * const BluememeDeviceKeyDefaultsKey = @"bluememe_utils_device_k
|
||||
} else {
|
||||
configuration = [[NEHotspotConfiguration alloc] initWithSSID:ssid passphrase:password isWEP:isWep];
|
||||
}
|
||||
if (@available(iOS 13.0, *)) {
|
||||
configuration.hidden = hiddenSsid;
|
||||
}
|
||||
configuration.joinOnce = joinOnce;
|
||||
|
||||
[[NEHotspotConfigurationManager sharedManager] applyConfiguration:configuration completionHandler:^(NSError *error) {
|
||||
|
||||
Reference in new issue
Block a user