diff --git a/.gitignore b/.gitignore index 3f77e51d..a32cf53a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # build/ Build/ +.build/ *.pbxuser !default.pbxuser *.mode1v3 diff --git a/.swift-version b/.swift-version index 6e636605..a75b92f1 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -5.0 \ No newline at end of file +5.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b87f124..9993b2ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 6.1.0 +- Updated RxSwift version to 6.x.x +- Migrated Carthage to SPM +- Increased deployment target for iOS 13.0, macOS 10.14, watchOS 6.0, tvOS 13.0 + # 6.0.1 - iOS 17 support (#1, #2) diff --git a/Cartfile b/Cartfile deleted file mode 100644 index 300061ba..00000000 --- a/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "ReactiveX/RxSwift" ~> 5.1 diff --git a/Cartfile.private b/Cartfile.private deleted file mode 100644 index 8b137891..00000000 --- a/Cartfile.private +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Cartfile.resolved b/Cartfile.resolved deleted file mode 100644 index ec14f25d..00000000 --- a/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "ReactiveX/RxSwift" "5.1.1" diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 00000000..a89d00ca --- /dev/null +++ b/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "RxSwift", + "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", + "state": { + "branch": null, + "revision": "9dcaa4b333db437b0fbfaf453fad29069044a8b4", + "version": "6.6.0" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift index 47c8df2e..3c75a415 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -6,13 +6,13 @@ import PackageDescription let package = Package( name: "RxBluetoothKit", platforms: [ - .macOS(.v10_13), .iOS(.v9), .tvOS(.v11), .watchOS(.v4) + .macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6) ], products: [ .library(name: "RxBluetoothKit", targets: ["RxBluetoothKit"]) ], dependencies: [ - .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.1.1")) + .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.6.0")) ], targets: [ .target( diff --git a/RxBluetoothKit.podspec b/RxBluetoothKit.podspec index 366442a8..e003de4e 100644 --- a/RxBluetoothKit.podspec +++ b/RxBluetoothKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RxBluetoothKit" - s.version = "6.0.1" + s.version = "6.1.0" s.summary = "Bluetooth library for RxSwift" s.description = <<-DESC @@ -13,16 +13,16 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/polidea/RxBluetoothKit.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/polidea' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.13' - s.watchos.deployment_target = '4.0' - s.tvos.deployment_target = '11.0' - s.swift_version = '5.0' + s.ios.deployment_target = '13.0' + s.osx.deployment_target = '10.15' + s.watchos.deployment_target = '6.0' + s.tvos.deployment_target = '13.0' + s.swift_version = '5.1' s.requires_arc = true s.source_files = 'Source/*.swift' s.osx.exclude_files = 'Source/RestoredState.swift', 'Source/CentralManager+RestoredState.swift', 'Source/CentralManagerRestoredState.swift' s.frameworks = 'CoreBluetooth' - s.dependency 'RxSwift', '~> 5.1' + s.dependency 'RxSwift', '~> 6.6' end diff --git a/RxBluetoothKit.xcodeproj/project.pbxproj b/RxBluetoothKit.xcodeproj/project.pbxproj index 4cea5f43..38506962 100644 --- a/RxBluetoothKit.xcodeproj/project.pbxproj +++ b/RxBluetoothKit.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -11,7 +11,6 @@ 0A339D751FA1C10A008385C8 /* CBCentralManagerDelegateWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2FF3341F9EAF2B00A12E10 /* CBCentralManagerDelegateWrapper.swift */; }; 0A339D761FA1C10B008385C8 /* CBCentralManagerDelegateWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2FF3341F9EAF2B00A12E10 /* CBCentralManagerDelegateWrapper.swift */; }; 0A339D771FA1C10D008385C8 /* CBPeripheralDelegateWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2FF3311F9EAD5300A12E10 /* CBPeripheralDelegateWrapper.swift */; }; - 0A7B27D11F9F1710003F950E /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7B27D01F9F1710003F950E /* RxSwift.framework */; }; 0A7B27D51F9F176D003F950E /* CentralManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1299C0E1CBE3DEE005DEA5B /* CentralManager.swift */; }; 0A7B27D61F9F176D003F950E /* AdvertisementData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1299C0C1CBE3DEE005DEA5B /* AdvertisementData.swift */; }; 0A7B27D71F9F176D003F950E /* BluetoothState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26EF38C81D86EE1F00F9F468 /* BluetoothState.swift */; }; @@ -31,7 +30,6 @@ 0A7B27FC1F9F190F003F950E /* RxBluetoothKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7B27F31F9F190F003F950E /* RxBluetoothKit.framework */; }; 0A7B28141F9F1964003F950E /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2666FD0B1CCE431B005E81CE /* Utilities.swift */; }; 0A7B28151F9F1AE1003F950E /* RxBluetoothKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 2666FCEE1CCE42A5005E81CE /* RxBluetoothKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0A7B28181F9F1B05003F950E /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7B28171F9F1B05003F950E /* RxSwift.framework */; }; 0A7B281B1F9F1B21003F950E /* Descriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1299C121CBE3DEE005DEA5B /* Descriptor.swift */; }; 0A7B281D1F9F1B25003F950E /* ScannedPeripheral.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1299C211CBE3DEE005DEA5B /* ScannedPeripheral.swift */; }; 0A7B281E1F9F1B25003F950E /* Peripheral.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1299C161CBE3DEE005DEA5B /* Peripheral.swift */; }; @@ -49,7 +47,19 @@ 0A7B28331F9F1B39003F950E /* AdvertisementData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1299C0C1CBE3DEE005DEA5B /* AdvertisementData.swift */; }; 0A7B28341F9F1B39003F950E /* BluetoothState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26EF38C81D86EE1F00F9F468 /* BluetoothState.swift */; }; 0A7B28351F9F1C08003F950E /* RxBluetoothKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 2666FCEE1CCE42A5005E81CE /* RxBluetoothKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0A7B283D1F9F1C71003F950E /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7B28171F9F1B05003F950E /* RxSwift.framework */; }; + 175956652B96F0B30020EED3 /* RxTest-Dynamic in Frameworks */ = {isa = PBXBuildFile; productRef = 175956642B96F0B30020EED3 /* RxTest-Dynamic */; }; + 175956662B96F0B30020EED3 /* RxTest-Dynamic in Copy Frameworks */ = {isa = PBXBuildFile; productRef = 175956642B96F0B30020EED3 /* RxTest-Dynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 175956682B96F0EF0020EED3 /* RxTest-Dynamic in Frameworks */ = {isa = PBXBuildFile; productRef = 175956672B96F0EF0020EED3 /* RxTest-Dynamic */; }; + 175956692B96F0EF0020EED3 /* RxTest-Dynamic in CopyFiles */ = {isa = PBXBuildFile; productRef = 175956672B96F0EF0020EED3 /* RxTest-Dynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 1759566B2B96F0FB0020EED3 /* RxTest-Dynamic in Frameworks */ = {isa = PBXBuildFile; productRef = 1759566A2B96F0FB0020EED3 /* RxTest-Dynamic */; }; + 1759566C2B96F0FB0020EED3 /* RxTest-Dynamic in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 1759566A2B96F0FB0020EED3 /* RxTest-Dynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 17F4CA032B96E1ED009CDF46 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 17F4CA022B96E1ED009CDF46 /* RxSwift */; }; + 17F4CA052B96E1F1009CDF46 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 17F4CA042B96E1F1009CDF46 /* RxSwift */; }; + 17F4CA072B96E1F6009CDF46 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 17F4CA062B96E1F6009CDF46 /* RxSwift */; }; + 17F4CA092B96E1FB009CDF46 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 17F4CA082B96E1FB009CDF46 /* RxSwift */; }; + 17F4CA0B2B96E206009CDF46 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 17F4CA0A2B96E206009CDF46 /* RxSwift */; }; + 17F4CA0D2B96E20C009CDF46 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 17F4CA0C2B96E20C009CDF46 /* RxSwift */; }; + 17F4CA0F2B96E214009CDF46 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 17F4CA0E2B96E214009CDF46 /* RxSwift */; }; 1D1B99D520AEB25C00464AD6 /* PeripheralManagerRestoredState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1B99D420AEB25C00464AD6 /* PeripheralManagerRestoredState.swift */; }; 1D1B99D720AEB27C00464AD6 /* CentralManagerRestoredState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1B99D620AEB27C00464AD6 /* CentralManagerRestoredState.swift */; }; 1D1B99DA20AEBE3200464AD6 /* _CentralManagerRestoredState.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1B99D820AEBE1800464AD6 /* _CentralManagerRestoredState.generated.swift */; }; @@ -253,10 +263,6 @@ 4CB9A0A2204447B200FF9516 /* PeripheralTest+CharacteristicOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB9A0A1204447B200FF9516 /* PeripheralTest+CharacteristicOperation.swift */; }; 4CB9A0A3204447B200FF9516 /* PeripheralTest+CharacteristicOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB9A0A1204447B200FF9516 /* PeripheralTest+CharacteristicOperation.swift */; }; 4CB9A0A4204447B200FF9516 /* PeripheralTest+CharacteristicOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB9A0A1204447B200FF9516 /* PeripheralTest+CharacteristicOperation.swift */; }; - A10F298A1CDCD6E100593284 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2666FE5A1CCE65CD005E81CE /* RxSwift.framework */; }; - A10F298B1CDCD6E400593284 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2666FE5E1CCE65EE005E81CE /* RxSwift.framework */; }; - A10F29AD1CDCD98400593284 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2666FE5A1CCE65CD005E81CE /* RxSwift.framework */; }; - A10F29B01CDCD99900593284 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2666FE5E1CCE65EE005E81CE /* RxSwift.framework */; }; BB2FF3321F9EAD5300A12E10 /* CBPeripheralDelegateWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2FF3311F9EAD5300A12E10 /* CBPeripheralDelegateWrapper.swift */; }; BB2FF3331F9EAF1600A12E10 /* CBPeripheralDelegateWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2FF3311F9EAD5300A12E10 /* CBPeripheralDelegateWrapper.swift */; }; BB2FF3351F9EAF2B00A12E10 /* CBCentralManagerDelegateWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2FF3341F9EAF2B00A12E10 /* CBCentralManagerDelegateWrapper.swift */; }; @@ -300,12 +306,64 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 1759566D2B96F0FB0020EED3 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 1759566C2B96F0FB0020EED3 /* RxTest-Dynamic in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 17F4C9F52B96E048009CDF46 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 17F4C9F92B96E054009CDF46 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 17F4C9FD2B96E05E009CDF46 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 17F4CA012B96E066009CDF46 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; A10F29801CDCD63100593284 /* Copy Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( + 175956662B96F0B30020EED3 /* RxTest-Dynamic in Copy Frameworks */, ); name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -316,6 +374,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 175956692B96F0EF0020EED3 /* RxTest-Dynamic in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -432,7 +491,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0A7B27D11F9F1710003F950E /* RxSwift.framework in Frameworks */, + 17F4CA072B96E1F6009CDF46 /* RxSwift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -440,7 +499,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0A7B28181F9F1B05003F950E /* RxSwift.framework in Frameworks */, + 17F4CA092B96E1FB009CDF46 /* RxSwift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -448,7 +507,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0A7B283D1F9F1C71003F950E /* RxSwift.framework in Frameworks */, + 1759566B2B96F0FB0020EED3 /* RxTest-Dynamic in Frameworks */, + 17F4CA0F2B96E214009CDF46 /* RxSwift in Frameworks */, 0A7B27FC1F9F190F003F950E /* RxBluetoothKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -457,7 +517,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A10F298A1CDCD6E100593284 /* RxSwift.framework in Frameworks */, + 17F4CA032B96E1ED009CDF46 /* RxSwift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -465,7 +525,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A10F29AD1CDCD98400593284 /* RxSwift.framework in Frameworks */, + 175956652B96F0B30020EED3 /* RxTest-Dynamic in Frameworks */, + 17F4CA0B2B96E206009CDF46 /* RxSwift in Frameworks */, 2666FD8E1CCE457C005E81CE /* RxBluetoothKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -474,7 +535,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A10F298B1CDCD6E400593284 /* RxSwift.framework in Frameworks */, + 17F4CA052B96E1F1009CDF46 /* RxSwift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -482,8 +543,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 175956682B96F0EF0020EED3 /* RxTest-Dynamic in Frameworks */, + 17F4CA0D2B96E20C009CDF46 /* RxSwift in Frameworks */, 2666FDAD1CCE4626005E81CE /* RxBluetoothKit.framework in Frameworks */, - A10F29B01CDCD99900593284 /* RxSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -885,12 +947,16 @@ 0A7B27C41F9F1682003F950E /* Headers */, 0A7B27C51F9F1682003F950E /* Resources */, 1D1BC87E2003A32B004C5F36 /* Generate testable files script */, + 17F4C9FD2B96E05E009CDF46 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "RxBluetoothKit watchOS"; + packageProductDependencies = ( + 17F4CA062B96E1F6009CDF46 /* RxSwift */, + ); productName = RxBluetoothKit; productReference = 0A7B27C71F9F1682003F950E /* RxBluetoothKit.framework */; productType = "com.apple.product-type.framework"; @@ -904,12 +970,16 @@ 0A7B27F01F9F190F003F950E /* Headers */, 0A7B27F11F9F190F003F950E /* Resources */, 1D1BC87F2003A33A004C5F36 /* Generate testable files script */, + 17F4CA012B96E066009CDF46 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "RxBluetoothKit tvOS"; + packageProductDependencies = ( + 17F4CA082B96E1FB009CDF46 /* RxSwift */, + ); productName = RxBluetoothKit; productReference = 0A7B27F31F9F190F003F950E /* RxBluetoothKit.framework */; productType = "com.apple.product-type.framework"; @@ -921,6 +991,7 @@ 0A7B27F71F9F190F003F950E /* Sources */, 0A7B27F81F9F190F003F950E /* Frameworks */, 0A7B27F91F9F190F003F950E /* Resources */, + 1759566D2B96F0FB0020EED3 /* Embed Frameworks */, ); buildRules = ( ); @@ -928,6 +999,10 @@ 0A7B27FE1F9F190F003F950E /* PBXTargetDependency */, ); name = "RxBluetoothKit tvOSTests"; + packageProductDependencies = ( + 17F4CA0E2B96E214009CDF46 /* RxSwift */, + 1759566A2B96F0FB0020EED3 /* RxTest-Dynamic */, + ); productName = RxBluetoothKitTests; productReference = 0A7B27FB1F9F190F003F950E /* RxBluetoothKit tvOSTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -942,12 +1017,16 @@ 2666FD821CCE457C005E81CE /* Resources */, 26A66F951E263E8C00E62D8C /* Swiftlint script */, 1D1BC87C2003A2D7004C5F36 /* Generate testable files script */, + 17F4C9F92B96E054009CDF46 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "RxBluetoothKit iOS"; + packageProductDependencies = ( + 17F4CA022B96E1ED009CDF46 /* RxSwift */, + ); productName = "RxBluetoothKit iOS"; productReference = 2666FD841CCE457C005E81CE /* RxBluetoothKit.framework */; productType = "com.apple.product-type.framework"; @@ -968,6 +1047,10 @@ 2666FD901CCE457C005E81CE /* PBXTargetDependency */, ); name = "RxBluetoothKit iOSTests"; + packageProductDependencies = ( + 17F4CA0A2B96E206009CDF46 /* RxSwift */, + 175956642B96F0B30020EED3 /* RxTest-Dynamic */, + ); productName = "RxBluetoothKit iOSTests"; productReference = 2666FD8D1CCE457C005E81CE /* RxBluetoothKit iOSTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -981,12 +1064,16 @@ 2666FDA01CCE4626005E81CE /* Headers */, 2666FDA11CCE4626005E81CE /* Resources */, 1D1BC87D2003A31E004C5F36 /* Generate testable files script */, + 17F4C9F52B96E048009CDF46 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "RxBluetoothKit macOS"; + packageProductDependencies = ( + 17F4CA042B96E1F1009CDF46 /* RxSwift */, + ); productName = "RxBluetoothKit OSX"; productReference = 2666FDA31CCE4626005E81CE /* RxBluetoothKit.framework */; productType = "com.apple.product-type.framework"; @@ -1006,6 +1093,10 @@ 2666FDAF1CCE4626005E81CE /* PBXTargetDependency */, ); name = "RxBluetoothKit macOSTests"; + packageProductDependencies = ( + 17F4CA0C2B96E20C009CDF46 /* RxSwift */, + 175956672B96F0EF0020EED3 /* RxTest-Dynamic */, + ); productName = "RxBluetoothKit OSXTests"; productReference = 2666FDAC1CCE4626005E81CE /* RxBluetoothKit macOSTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -1059,6 +1150,9 @@ Base, ); mainGroup = A1299BB31CBE3D52005DEA5B; + packageReferences = ( + 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */, + ); productRefGroup = A1299BBE1CBE3D52005DEA5B /* Products */; projectDirPath = ""; projectRoot = ""; @@ -1544,7 +1638,11 @@ GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-watchOS"; PRODUCT_NAME = RxBluetoothKit; SDKROOT = watchos; @@ -1552,7 +1650,7 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 4.0; + WATCHOS_DEPLOYMENT_TARGET = 6.0; }; name = Debug; }; @@ -1577,14 +1675,18 @@ GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-watchOS"; PRODUCT_NAME = RxBluetoothKit; SDKROOT = watchos; SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 4.0; + WATCHOS_DEPLOYMENT_TARGET = 6.0; }; name = Release; }; @@ -1609,7 +1711,11 @@ GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-tvOS"; PRODUCT_NAME = RxBluetoothKit; SDKROOT = appletvos; @@ -1617,7 +1723,7 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 13.0; }; name = Debug; }; @@ -1642,14 +1748,18 @@ GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-tvOS"; PRODUCT_NAME = RxBluetoothKit; SDKROOT = appletvos; SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 13.0; }; name = Release; }; @@ -1669,14 +1779,19 @@ GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Tests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-tvOS.RxBluetoothKitTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 13.0; }; name = Debug; }; @@ -1696,13 +1811,18 @@ GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Tests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-tvOS.RxBluetoothKitTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 13.0; }; name = Release; }; @@ -1723,8 +1843,12 @@ ); INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-iOS"; PRODUCT_NAME = RxBluetoothKit; SKIP_INSTALL = YES; @@ -1749,8 +1873,12 @@ ); INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-iOS"; PRODUCT_NAME = RxBluetoothKit; SKIP_INSTALL = YES; @@ -1766,8 +1894,13 @@ "$(PROJECT_DIR)/Carthage/Build/iOS", ); INFOPLIST_FILE = Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -1782,8 +1915,13 @@ "$(PROJECT_DIR)/Carthage/Build/iOS", ); INFOPLIST_FILE = Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -1807,8 +1945,12 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.13; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-macOS"; PRODUCT_NAME = RxBluetoothKit; SDKROOT = macosx; @@ -1834,8 +1976,12 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.13; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-macOS"; PRODUCT_NAME = RxBluetoothKit; SDKROOT = macosx; @@ -1855,8 +2001,13 @@ ); INFOPLIST_FILE = Tests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks $(FRAMEWORK_SEARCH_PATHS)"; - MACOSX_DEPLOYMENT_TARGET = 10.13; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-OSXTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -1875,8 +2026,13 @@ ); INFOPLIST_FILE = Tests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks $(FRAMEWORK_SEARCH_PATHS)"; - MACOSX_DEPLOYMENT_TARGET = 10.13; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + "$(FRAMEWORK_SEARCH_PATHS)", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = "com.polidea.RxBluetoothKit-OSXTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -1993,7 +2149,8 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -2078,6 +2235,70 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 6.6.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 175956642B96F0B30020EED3 /* RxTest-Dynamic */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = "RxTest-Dynamic"; + }; + 175956672B96F0EF0020EED3 /* RxTest-Dynamic */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = "RxTest-Dynamic"; + }; + 1759566A2B96F0FB0020EED3 /* RxTest-Dynamic */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = "RxTest-Dynamic"; + }; + 17F4CA022B96E1ED009CDF46 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + 17F4CA042B96E1F1009CDF46 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + 17F4CA062B96E1F6009CDF46 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + 17F4CA082B96E1FB009CDF46 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + 17F4CA0A2B96E206009CDF46 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + 17F4CA0C2B96E20C009CDF46 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + 17F4CA0E2B96E214009CDF46 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 17F4C9F12B96E00E009CDF46 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = A1299BB41CBE3D52005DEA5B /* Project object */; } diff --git a/RxBluetoothKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RxBluetoothKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 25945a01..919434a6 100644 --- a/RxBluetoothKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/RxBluetoothKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/RxBluetoothKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/RxBluetoothKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..7b57c5f3 --- /dev/null +++ b/RxBluetoothKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "rxswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ReactiveX/RxSwift", + "state" : { + "revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4", + "version" : "6.6.0" + } + } + ], + "version" : 2 +} diff --git a/Source/CentralManager.swift b/Source/CentralManager.swift index 4a3bffcb..82acb3c9 100644 --- a/Source/CentralManager.swift +++ b/Source/CentralManager.swift @@ -298,7 +298,7 @@ public class CentralManager: ManagerType { return (peripheral, error) } return ensure(.poweredOn, observable: observable) - .catchError { error in + .catch { error in if error is BluetoothError, let peripheral = peripheral { return .concat(.just((peripheral, error)), .error(error)) } else { diff --git a/Source/Logging.swift b/Source/Logging.swift index f056c32c..38c4703d 100644 --- a/Source/Logging.swift +++ b/Source/Logging.swift @@ -243,8 +243,8 @@ extension Reactive where Base == RxBluetoothKitLog { */ public var log: Observable { return RxBluetoothKitLog.subject.asObserver() - .observeOn(MainScheduler.instance) - .catchErrorJustReturn("") + .observe(on: MainScheduler.instance) + .catchAndReturn("") .share(scope: .whileConnected) } } diff --git a/Tests/Autogenerated/Mock.generated.swift b/Tests/Autogenerated/Mock.generated.swift index 146f8570..66ff1f74 100644 --- a/Tests/Autogenerated/Mock.generated.swift +++ b/Tests/Autogenerated/Mock.generated.swift @@ -9,7 +9,7 @@ import RxSwift class CBManagerMock: NSObject { var state: CBManagerState! - @available(iOS 13.0, macOS 10.15, watchOS 6.0, tvOS 13.0, *) lazy var authorization: CBManagerAuthorization! = nil + lazy var authorization: CBManagerAuthorization! = nil override init() { } diff --git a/Tests/PeripheralTest+CharacteristicOperation.swift b/Tests/PeripheralTest+CharacteristicOperation.swift index afcbb911..8677e0ac 100644 --- a/Tests/PeripheralTest+CharacteristicOperation.swift +++ b/Tests/PeripheralTest+CharacteristicOperation.swift @@ -62,7 +62,7 @@ class PeripheralCharacteristicOperationsTest: BasePeripheralTest { } func testWriteValueWithResponse() throws { - let characteristic = XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral) + let characteristic = try XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) let data = Data([0, 1, 2, 3]) let obs: ScheduledObservable<_Characteristic> = testScheduler.scheduleObservable { @@ -88,7 +88,7 @@ class PeripheralCharacteristicOperationsTest: BasePeripheralTest { } func testWriteValueWithoutResponse() throws { - let characteristic = XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) + let characteristic = try XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) let data = Data([0, 1, 2, 3]) peripheral.peripheral.canSendWriteWithoutResponse = true @@ -107,7 +107,7 @@ class PeripheralCharacteristicOperationsTest: BasePeripheralTest { } func testWriteValueWithoutResponseWithCanSendWriteWithoutResponseCheckDisabled() throws { - let characteristic = XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) + let characteristic = try XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) let data = Data([0, 1, 2, 3]) peripheral.peripheral.canSendWriteWithoutResponse = false @@ -126,7 +126,7 @@ class PeripheralCharacteristicOperationsTest: BasePeripheralTest { } func testWriteValueWithoutResponseWaitingOnReadiness() throws{ - let characteristic = XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) + let characteristic = try XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) let data = Data([0, 1, 2, 3]) peripheral.peripheral.canSendWriteWithoutResponse = false @@ -200,7 +200,7 @@ class PeripheralCharacteristicOperationsTest: BasePeripheralTest { func testObserveCharacteristicIsNotifyingValue() throws { let mockCharacteristic = createCharacteristic(uuid: "0x0001", service: service) - let characteristic = XCTUnwrap(_Characteristic(characteristic: mockCharacteristic, peripheral: peripheral)) + let characteristic = try XCTUnwrap(_Characteristic(characteristic: mockCharacteristic, peripheral: peripheral)) let obs: ScheduledObservable<_Characteristic> = testScheduler.scheduleObservable { self.peripheral.observeNotifyValue(for: characteristic) @@ -221,7 +221,7 @@ class PeripheralCharacteristicOperationsTest: BasePeripheralTest { func testCharacteristicIsNotifyingValueChange() throws { let mockCharacteristic = createCharacteristic(uuid: "0x0001", service: service) - let characteristic = XCTUnwrap(_Characteristic(characteristic: mockCharacteristic, peripheral: peripheral)) + let characteristic = try XCTUnwrap(_Characteristic(characteristic: mockCharacteristic, peripheral: peripheral)) let obs: ScheduledObservable<_Characteristic> = testScheduler.scheduleObservable { characteristic.observeNotifyValue() @@ -241,7 +241,7 @@ class PeripheralCharacteristicOperationsTest: BasePeripheralTest { } func testReadValue() throws { - let characteristic = XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) + let characteristic = try XCTUnwrap(_Characteristic(characteristic: createCharacteristic(uuid: "0x0001", service: service), peripheral: peripheral)) let obs: ScheduledObservable<_Characteristic> = testScheduler.scheduleObservable { self.peripheral.readValue(for: characteristic).asObservable() diff --git a/Tests/PeripheralTest+DescriptorsOperation.swift b/Tests/PeripheralTest+DescriptorsOperation.swift index 37105aaf..1cb38fab 100644 --- a/Tests/PeripheralTest+DescriptorsOperation.swift +++ b/Tests/PeripheralTest+DescriptorsOperation.swift @@ -64,7 +64,7 @@ class PeripheralDescriptorOperationsTest: BasePeripheralTest { } func testWriteValue() throws { - let descriptor = XCTUnwrap(_Descriptor(descriptor: createDescriptor(uuid: "0x0002", characteristic: characteristic), peripheral: peripheral)) + let descriptor = try XCTUnwrap(_Descriptor(descriptor: createDescriptor(uuid: "0x0002", characteristic: characteristic), peripheral: peripheral)) let data = Data([0, 1, 2, 3]) let obs: ScheduledObservable<_Descriptor> = testScheduler.scheduleObservable { @@ -136,7 +136,7 @@ class PeripheralDescriptorOperationsTest: BasePeripheralTest { } func testReadValue() throws { - let descriptor = XCTUnwrap(_Descriptor(descriptor: createDescriptor(uuid: "0x0001", characteristic: characteristic), peripheral: peripheral)) + let descriptor = try XCTUnwrap(_Descriptor(descriptor: createDescriptor(uuid: "0x0001", characteristic: characteristic), peripheral: peripheral)) let obs: ScheduledObservable<_Descriptor> = testScheduler.scheduleObservable { self.peripheral.readValue(for: descriptor).asObservable()