diff --git a/demos/iOS-Demos/PolarSDK-ACC-Demo/PolarSDK-ACC-Demo/ViewController.swift b/demos/iOS-Demos/PolarSDK-ACC-Demo/PolarSDK-ACC-Demo/ViewController.swift index 4bd6dd5b..b47a1a26 100644 --- a/demos/iOS-Demos/PolarSDK-ACC-Demo/PolarSDK-ACC-Demo/ViewController.swift +++ b/demos/iOS-Demos/PolarSDK-ACC-Demo/PolarSDK-ACC-Demo/ViewController.swift @@ -2,7 +2,12 @@ import UIKit import PolarBleSdk import RxSwift -class ViewController: UIViewController, PolarBleApiObserver, PolarBleApiPowerStateObserver, PolarBleApiDeviceFeaturesObserver, PolarBleApiLogger { +class ViewController: UIViewController, + PolarBleApiObserver, + PolarBleApiPowerStateObserver, + PolarBleApiDeviceFeaturesObserver, + PolarBleApiLogger { + func message(_ str: String) { NSLog(str) } @@ -35,7 +40,7 @@ class ViewController: UIViewController, PolarBleApiObserver, PolarBleApiPowerSta api.powerStateObserver = self api.deviceFeaturesObserver = self //api.logger = self - _ = api.startAutoConnectToPolarDevice(-50, polarDeviceType: nil).subscribe() + _ = api.startAutoConnectToDevice(-50, service: nil, polarDeviceType: nil).subscribe() connectionStatus.text = "" } @@ -93,16 +98,16 @@ class ViewController: UIViewController, PolarBleApiObserver, PolarBleApiPowerSta NSLog("FTP CONNECTED") } - func polarDeviceConnecting(_ identifier: PolarDeviceInfo) { + func deviceConnecting(_ identifier: PolarDeviceInfo) { connectionStatus.text = "Connecting" } - func polarDeviceConnected(_ identifier: PolarDeviceInfo) { + func deviceConnected(_ identifier: PolarDeviceInfo) { deviceId = identifier.deviceId connectionStatus.text = "Connected" } - func polarDeviceDisconnected(_ identifier: PolarDeviceInfo) { + func deviceDisconnected(_ identifier: PolarDeviceInfo) { connectionStatus.text = "Disconnected" } diff --git a/demos/iOS-Demos/PolarSDK-Exercise-Demo/PolarSDK-Exercise-Demo/ViewController.swift b/demos/iOS-Demos/PolarSDK-Exercise-Demo/PolarSDK-Exercise-Demo/ViewController.swift index bbe35950..26fb1809 100644 --- a/demos/iOS-Demos/PolarSDK-Exercise-Demo/PolarSDK-Exercise-Demo/ViewController.swift +++ b/demos/iOS-Demos/PolarSDK-Exercise-Demo/PolarSDK-Exercise-Demo/ViewController.swift @@ -3,9 +3,14 @@ import UIKit import PolarBleSdk import RxSwift +import CoreBluetooth -class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, PolarBleApiObserver, PolarBleApiPowerStateObserver, PolarBleApiDeviceInfoObserver, PolarBleApiDeviceFeaturesObserver { - +class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, + PolarBleApiObserver, + PolarBleApiPowerStateObserver, + PolarBleApiDeviceInfoObserver, +PolarBleApiDeviceFeaturesObserver { + var api: PolarBleApi! var deviceId: String? @IBOutlet weak var connectionStatus: UILabel! @@ -32,7 +37,7 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour api.powerStateObserver = self api.deviceInfoObserver = self api.deviceFeaturesObserver = self - _ = api.startAutoConnectToPolarDevice(-50, polarDeviceType: "OH1").subscribe() + _ = api.startAutoConnectToDevice(-50, service: CBUUID.init(string: "180D"), polarDeviceType: "OH1").subscribe() connectionStatus.text = "Disconnected" } @IBAction func listExercises(_ sender: Any) { @@ -112,18 +117,18 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour } } - func polarDeviceConnected(_ identifier: PolarDeviceInfo) { + func deviceConnected(_ identifier: PolarDeviceInfo) { NSLog("Device connected " + identifier.deviceId) deviceId = identifier.deviceId connectionStatus.text = "Connected" } - func polarDeviceConnecting(_ identifier: PolarDeviceInfo) { + func deviceConnecting(_ identifier: PolarDeviceInfo) { NSLog("Device connecting " + identifier.deviceId) connectionStatus.text = "Connecting" } - func polarDeviceDisconnected(_ identifier: PolarDeviceInfo) { + func deviceDisconnected(_ identifier: PolarDeviceInfo) { NSLog("Device disconnected " + identifier.deviceId) connectionStatus.text = "Disconnected" deviceId = nil diff --git a/examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj b/examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj index 0ddad4e3..753bc9ff 100644 --- a/examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj +++ b/examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj @@ -343,7 +343,7 @@ CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 96TQ43SDNE; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(PROJECT_DIR)/../", @@ -371,7 +371,7 @@ CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 96TQ43SDNE; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(PROJECT_DIR)/../",