Skip to content

Commit

Permalink
Merge branch 'bug_fix/wifi_scan_cap_fix' into 'master'
Browse files Browse the repository at this point in the history
Bug fix: Check Wi-Fi scan capability

See merge request idf/esp-idf-provisioning-ios!12
  • Loading branch information
shahpiyushv committed Jul 17, 2020
2 parents 6502f0d + 0e7e70a commit 7927f58
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ESPProvision.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = "ESPProvision"
spec.version = "2.0.2"
spec.version = "2.0.4"
spec.summary = "ESP-IDF provisioning in Swift"
spec.description = "It provides mechanism to provide network credentials and/or custom data to an ESP32, ESP32-S2 or ESP8266 devices"
spec.homepage = "https://github.com/espressif/esp-idf-provisioning-ios"
Expand Down
14 changes: 9 additions & 5 deletions ESPProvision/ESPDevice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,15 @@ public class ESPDevice {
}

private func scanDeviceForWifiList(completionHandler: @escaping ([ESPWifiNetwork]?,ESPWiFiScanError?) -> Void) {
self.wifiListCompletionHandler = completionHandler
let scanWifiManager: ESPWiFiManager = ESPWiFiManager(session: self.session!)
scanWifiManager.delegate = self
wifiListCompletionHandler = completionHandler
scanWifiManager.startWifiScan()
if let capability = self.capabilities, capability.contains(ESPConstants.wifiScanCapability) {
self.wifiListCompletionHandler = completionHandler
let scanWifiManager: ESPWiFiManager = ESPWiFiManager(session: self.session!)
scanWifiManager.delegate = self
wifiListCompletionHandler = completionHandler
scanWifiManager.startWifiScan()
} else {
completionHandler(nil,.emptyResultCount)
}
}
/// Initialise session with `ESPDevice`.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@
baseConfigurationReference = 6666AA3DAEAA14F81770F363 /* Pods-ESPProvisionSample.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
APP_DISPLAY_NAME = "ESP PROV DEMO";
APP_DISPLAY_NAME = "ESP Prov";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "ESPProvisionSample/ESP BLE PROV.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand All @@ -723,7 +723,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.2;
MARKETING_VERSION = 2.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.espressif.provsoftap;
PRODUCT_NAME = "ESP PROV SAMPLE";
PROVISIONING_PROFILE_SPECIFIER = "ESP SoftAP Provisioning With Capability";
Expand All @@ -737,7 +737,7 @@
baseConfigurationReference = A600497E31230F4B3C5197C8 /* Pods-ESPProvisionSample.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
APP_DISPLAY_NAME = "ESP PROV DEMO";
APP_DISPLAY_NAME = "ESP Prov";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "ESPProvisionSample/ESP BLE PROV.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand All @@ -755,7 +755,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.2;
MARKETING_VERSION = 2.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.espressif.provsoftap;
PRODUCT_NAME = "ESP PROV SAMPLE";
PROVISIONING_PROFILE_SPECIFIER = "ESP SoftAP Provisioning With Capability";
Expand Down Expand Up @@ -912,7 +912,7 @@
baseConfigurationReference = EC84FE067C3D5E9CDC5AEF05 /* Pods-ESPProvisionSample.ble.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
APP_DISPLAY_NAME = "ESP PROV BLE";
APP_DISPLAY_NAME = "ESP BLE Prov";
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-BLE";
CODE_SIGN_ENTITLEMENTS = "ESPProvisionSample/ESP BLE PROV.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand All @@ -930,7 +930,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.2;
MARKETING_VERSION = 2.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.espressif.provble;
PRODUCT_NAME = "ESP PROV SAMPLE";
PROVISIONING_PROFILE_SPECIFIER = "ESP BLE Provisioning App Development";
Expand Down Expand Up @@ -1043,11 +1043,11 @@
baseConfigurationReference = B36C550D24F7A5870D2A8184 /* Pods-ESPProvisionSample.softap.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
APP_DISPLAY_NAME = "ESP PROV SOFTAP";
APP_DISPLAY_NAME = "ESP SoftAP Prov";
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-SoftAP";
CODE_SIGN_ENTITLEMENTS = "ESPProvisionSample/ESP BLE PROV.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = QWXF6GB4AV;
ESP_ALLOW_PREFIX_SEARCH = YES;
Expand All @@ -1061,10 +1061,10 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.2;
MARKETING_VERSION = 2.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.espressif.provsoftap;
PRODUCT_NAME = "ESP PROV SAMPLE";
PROVISIONING_PROFILE_SPECIFIER = "ESP SoftAP Provisioning With Capability";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down

0 comments on commit 7927f58

Please sign in to comment.