From ab1537a4eb177032c9969f59d1a9ac550dd7c524 Mon Sep 17 00:00:00 2001 From: Joe Soultanis Date: Tue, 12 Nov 2019 15:36:13 -0800 Subject: [PATCH] Adding SPM integration - need to fix carthage support --- .gitignore | 68 +-- Cartfile | 5 +- Cartfile.resolved | 1 + .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/WorkspaceSettings.xcsettings | 5 - .../WorkspaceSettings.xcsettings | 18 - .../xcdebugger/Breakpoints_v2.xcbkptlist | 378 ------------- .../xcschemes/xcschememanagement.plist | 8 + Package.swift | 37 ++ README.md | 42 +- .../RxCBCentral.xcodeproj/project.pbxproj | 518 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcschemes/xcschememanagement.plist | 14 - RxCBCentral/RxCBCentral/Info.plist | 22 - RxCBCentral/RxCBCentral/RxCBCentral.h | 27 - RxCBCentralTests/Info.plist | 24 - .../Operations/ReadRssiTests.swift | 23 - RxCBCentralTests/Operations/ReadTests.swift | 0 .../RegisterNotificationTests.swift | 0 RxCBCentralTests/Operations/WriteTests.swift | 0 .../RxCBCentral}/BluetoothDetectorType.swift | 0 .../RxCBCentral}/ConnectionManagerType.swift | 2 +- .../RxCBCentral}/GattOperation.swift | 2 +- .../RxCBCentral}/RxPeripheral.swift | 16 - .../RxPeripheralManagerType.swift | 0 .../RxCBCentral}/ScanMatching.swift | 0 .../BluetoothDetector/BluetoothDetector.swift | 0 .../BluetoothDetectorOptions.swift | 0 .../ConnectionManager/ConnectionManager.swift | 2 +- .../ConnectionManagerOptions.swift | 0 .../core/Helper/AdvertisementData.swift | 0 .../core/Helper/CBPeripheralType.swift | 0 .../core/Helper/CentralScanner.swift | 2 +- .../RxCBCentral}/core/Operations/Read.swift | 0 .../core/Operations/ReadRssi.swift | 0 .../Operations/RegisterNotification.swift | 0 .../RxCBCentral}/core/Operations/Write.swift | 0 .../RxCBCentral}/core/RxPeripheralImpl.swift | 0 .../core/RxPeripheralManager.swift | 2 +- .../RxCBCentral}/debug/RxCBLogger.swift | 0 Tests/LinuxMain.swift | 7 + Tests/RxCBCentralTests/RxCBCentralTests.swift | 9 + Tests/RxCBCentralTests/XCTestManifests.swift | 9 + 45 files changed, 137 insertions(+), 1137 deletions(-) delete mode 100644 ExampleApp.xcworkspace/contents.xcworkspacedata delete mode 100644 ExampleApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 ExampleApp.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 ExampleApp.xcworkspace/xcuserdata/jsoultanis.xcuserdatad/WorkspaceSettings.xcsettings delete mode 100644 ExampleApp.xcworkspace/xcuserdata/jsoultanis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 Package.swift delete mode 100644 RxCBCentral/RxCBCentral.xcodeproj/project.pbxproj delete mode 100644 RxCBCentral/RxCBCentral.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 RxCBCentral/RxCBCentral.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 RxCBCentral/RxCBCentral.xcodeproj/xcuserdata/jsoultanis.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 RxCBCentral/RxCBCentral/Info.plist delete mode 100644 RxCBCentral/RxCBCentral/RxCBCentral.h delete mode 100644 RxCBCentralTests/Info.plist delete mode 100644 RxCBCentralTests/Operations/ReadRssiTests.swift delete mode 100644 RxCBCentralTests/Operations/ReadTests.swift delete mode 100644 RxCBCentralTests/Operations/RegisterNotificationTests.swift delete mode 100644 RxCBCentralTests/Operations/WriteTests.swift rename {Source => Sources/RxCBCentral}/BluetoothDetectorType.swift (100%) rename {Source => Sources/RxCBCentral}/ConnectionManagerType.swift (99%) rename {Source => Sources/RxCBCentral}/GattOperation.swift (99%) rename {Source => Sources/RxCBCentral}/RxPeripheral.swift (86%) rename {Source => Sources/RxCBCentral}/RxPeripheralManagerType.swift (100%) rename {Source => Sources/RxCBCentral}/ScanMatching.swift (100%) rename {Source => Sources/RxCBCentral}/core/BluetoothDetector/BluetoothDetector.swift (100%) rename {Source => Sources/RxCBCentral}/core/BluetoothDetector/BluetoothDetectorOptions.swift (100%) rename {Source => Sources/RxCBCentral}/core/ConnectionManager/ConnectionManager.swift (99%) rename {Source => Sources/RxCBCentral}/core/ConnectionManager/ConnectionManagerOptions.swift (100%) rename {Source => Sources/RxCBCentral}/core/Helper/AdvertisementData.swift (100%) rename {Source => Sources/RxCBCentral}/core/Helper/CBPeripheralType.swift (100%) rename {Source => Sources/RxCBCentral}/core/Helper/CentralScanner.swift (98%) rename {Source => Sources/RxCBCentral}/core/Operations/Read.swift (100%) rename {Source => Sources/RxCBCentral}/core/Operations/ReadRssi.swift (100%) rename {Source => Sources/RxCBCentral}/core/Operations/RegisterNotification.swift (100%) rename {Source => Sources/RxCBCentral}/core/Operations/Write.swift (100%) rename {Source => Sources/RxCBCentral}/core/RxPeripheralImpl.swift (100%) rename {Source => Sources/RxCBCentral}/core/RxPeripheralManager.swift (99%) rename {Source => Sources/RxCBCentral}/debug/RxCBLogger.swift (100%) create mode 100644 Tests/LinuxMain.swift create mode 100644 Tests/RxCBCentralTests/RxCBCentralTests.swift create mode 100644 Tests/RxCBCentralTests/XCTestManifests.swift diff --git a/.gitignore b/.gitignore index 210f021..0dc7756 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,14 @@ -# OS X -.DS_Store +## OSX +*.DS_Store + +# Xcode Include to support Carthage for the Foundation project. +*.xcodeproj +*.xcworkspace # Xcode # -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated build/ -DerivedData/ - -## Various settings +Build/ *.pbxuser !default.pbxuser *.mode1v3 @@ -18,52 +17,25 @@ DerivedData/ !default.mode2v3 *.perspectivev3 !default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside +xcuserdata *.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific +*.moved-aside +DerivedData *.hmap *.ipa -*.dSYM.zip -*.dSYM +*.xcuserstate -## Playgrounds timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -Pods/ - -# Carthage -# +Pods Carthage/Checkouts - Carthage/Build +.idea +Podfile.lock -# fastlane +# Swift Package Manager # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output \ No newline at end of file +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +Packages/ +Package.pins +Package.resolved +.build/ \ No newline at end of file diff --git a/Cartfile b/Cartfile index 1ae7030..f113fc4 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,3 @@ -github "ReactiveX/RxSwift" ~> 4.5 -github "RxSwiftCommunity/RxOptional" ~> 3.1.3 \ No newline at end of file +github "ReactiveX/RxSwift" ~> 4.5.0 +github "RxSwiftCommunity/RxOptional" ~> 3.1.3 +github "uber/RxCBCentral" ~> 1.0 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index 571be69..26dfabc 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,3 @@ github "ReactiveX/RxSwift" "4.5.0" github "RxSwiftCommunity/RxOptional" "3.7.0" +github "uber/RxCBCentral" "v1.0.0" diff --git a/ExampleApp.xcworkspace/contents.xcworkspacedata b/ExampleApp.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index c724489..0000000 --- a/ExampleApp.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/ExampleApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ExampleApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/ExampleApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/ExampleApp.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ExampleApp.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 0c67376..0000000 --- a/ExampleApp.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/ExampleApp.xcworkspace/xcuserdata/jsoultanis.xcuserdatad/WorkspaceSettings.xcsettings b/ExampleApp.xcworkspace/xcuserdata/jsoultanis.xcuserdatad/WorkspaceSettings.xcsettings deleted file mode 100644 index f25782d..0000000 --- a/ExampleApp.xcworkspace/xcuserdata/jsoultanis.xcuserdatad/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,18 +0,0 @@ - - - - - BuildLocationStyle - UseAppPreferences - CustomBuildLocationType - RelativeToDerivedData - DerivedDataLocationStyle - Default - EnabledFullIndexStoreVisibility - - IssueFilterStyle - ShowActiveSchemeOnly - LiveSourceIssuesEnabled - - - diff --git a/ExampleApp.xcworkspace/xcuserdata/jsoultanis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/ExampleApp.xcworkspace/xcuserdata/jsoultanis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index 1b0b9de..0000000 --- a/ExampleApp.xcworkspace/xcuserdata/jsoultanis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,378 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ExampleApp/ExampleApp.xcodeproj/xcuserdata/jsoultanis.xcuserdatad/xcschemes/xcschememanagement.plist b/ExampleApp/ExampleApp.xcodeproj/xcuserdata/jsoultanis.xcuserdatad/xcschemes/xcschememanagement.plist index 7d8ef2a..036be8f 100644 --- a/ExampleApp/ExampleApp.xcodeproj/xcuserdata/jsoultanis.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/ExampleApp/ExampleApp.xcodeproj/xcuserdata/jsoultanis.xcuserdatad/xcschemes/xcschememanagement.plist @@ -10,5 +10,13 @@ 0 + SuppressBuildableAutocreation + + CDFE3F5821E83F4000CF931B + + primary + + + diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..a9cbdcb --- /dev/null +++ b/Package.swift @@ -0,0 +1,37 @@ +// swift-tools-version:5.1 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "RxCBCentral", + platforms: [ + SupportedPlatform.iOS(.v8), + SupportedPlatform.macOS("10.13") + ], + products: [ + .library(name: "RxCBCentral", targets: ["RxCBCentral"]), + ], + dependencies: [ + .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.0")), + .package(url: "https://github.com/RxSwiftCommunity/RxOptional", .upToNextMajor(from: "4.1.0")) + ], + targets: [ + .target( + name: "RxCBCentral", + dependencies: [ + "RxSwift", + "RxOptional", + ], + path: ".", + exclude: [ + "ExampleApp", + "Tests" + ] + ), + .testTarget( + name: "RxCBCentralTests", + dependencies: ["RxCBCentral"]), + ], + swiftLanguageVersions: [.v5] +) diff --git a/README.md b/README.md index 3313dc6..57a6216 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # RxCBCentral +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) ## Overview @@ -10,9 +11,6 @@ Similar to the RxSwift and RxJava, RxCBCentral and [Android's RxCentralBle](http Check out our detailed [Wiki](https://github.com/uber/RxCBCentral/wiki) for designs and examples for all the capabilities of RxCBCentral. -## Integration steps - -// TODO : Add Carthage details ## Usage @@ -93,6 +91,42 @@ peripheralManager .disposed(by: disposeBag) ``` +## Integration steps + +## [Carthage](https://github.com/Carthage/Carthage) + +Carthage a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. +To integrate RxCBCentral into your Xcode project using Carthage, specify it in your `Cartfile`: +```swift +github "uber/RxCBCentral ~> 1.0" +``` +```bash +$ carthage update +``` + +## [Swift Package Manager](https://github.com/apple/swift-package-manager) +Create a `Package.swift` file. If one already exists, add a new RxCBCentral `package` to your dependencies. + +```swift +// swift-tools-version:5.1 + +import PackageDescription + +let package = Package( + name: "RxCBCentralProject", + dependencies: [ + .package(url: "https://github.com/uber/RxCBCentral", from: "1.0.0") + ], + targets: [ + .target(name: "RxCBCentralProject", dependencies: ["RxCBCentral"]) + ] +) +``` + +```bash +$ swift build +``` + ## Sample App -See the Example app in this repo for additional usages of the library, and visualize low level BLE operations happening in realtime (scanning, discovery events, connecting, etc.). +See the [ExampleApp](https://github.com/uber/RxCBCentral/tree/master/ExampleApp) in this repo for example usages of the library, and visualize low level BLE operations happening in realtime (scanning, discovery events, connecting, etc.). diff --git a/RxCBCentral/RxCBCentral.xcodeproj/project.pbxproj b/RxCBCentral/RxCBCentral.xcodeproj/project.pbxproj deleted file mode 100644 index 2b830c0..0000000 --- a/RxCBCentral/RxCBCentral.xcodeproj/project.pbxproj +++ /dev/null @@ -1,518 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - CD14958F2374E37C002EDDFB /* RxPeripheralManagerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD14958D2374E37C002EDDFB /* RxPeripheralManagerType.swift */; }; - CD1495902374E37C002EDDFB /* RxPeripheral.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD14958E2374E37C002EDDFB /* RxPeripheral.swift */; }; - CD1495922374EAD6002EDDFB /* AdvertisementData.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1495912374EAD6002EDDFB /* AdvertisementData.swift */; }; - CD1495942374EB5C002EDDFB /* CBPeripheralType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1495932374EB5C002EDDFB /* CBPeripheralType.swift */; }; - CD1495962374EC01002EDDFB /* RxPeripheralImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1495952374EC01002EDDFB /* RxPeripheralImpl.swift */; }; - CD1495982374EC34002EDDFB /* RxPeripheralManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1495972374EC34002EDDFB /* RxPeripheralManager.swift */; }; - CD3309C22214E4500041EE49 /* RxCBLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3309C12214E4500041EE49 /* RxCBLogger.swift */; }; - CD4A582022D9420C00879FCA /* BluetoothDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD4A581F22D9420C00879FCA /* BluetoothDetector.swift */; }; - CD4A582422D9441200879FCA /* BluetoothDetectorOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD4A582322D9441200879FCA /* BluetoothDetectorOptions.swift */; }; - CD6F86A622D0759900ED33BE /* ConnectionManagerOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6F86A522D0759900ED33BE /* ConnectionManagerOptions.swift */; }; - CDFE3F4A21E83EFA00CF931B /* RxCBCentral.h in Headers */ = {isa = PBXBuildFile; fileRef = CDFE3F4821E83EFA00CF931B /* RxCBCentral.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CDFE3F9C21E8420800CF931B /* ConnectionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F8421E8420700CF931B /* ConnectionManager.swift */; }; - CDFE3F9D21E8420800CF931B /* ReadRssi.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F8621E8420700CF931B /* ReadRssi.swift */; }; - CDFE3F9E21E8420800CF931B /* RegisterNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F8721E8420700CF931B /* RegisterNotification.swift */; }; - CDFE3F9F21E8420800CF931B /* Write.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F8821E8420700CF931B /* Write.swift */; }; - CDFE3FA021E8420800CF931B /* Read.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F8921E8420700CF931B /* Read.swift */; }; - CDFE3FA521E8420800CF931B /* CentralScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F8F21E8420700CF931B /* CentralScanner.swift */; }; - CDFE3FA821E8420800CF931B /* ConnectionManagerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F9221E8420700CF931B /* ConnectionManagerType.swift */; }; - CDFE3FA921E8420800CF931B /* GattOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F9321E8420700CF931B /* GattOperation.swift */; }; - CDFE3FAA21E8420800CF931B /* BluetoothDetectorType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F9421E8420700CF931B /* BluetoothDetectorType.swift */; }; - CDFE3FAC21E8420800CF931B /* ScanMatching.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE3F9621E8420700CF931B /* ScanMatching.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - CD14958D2374E37C002EDDFB /* RxPeripheralManagerType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxPeripheralManagerType.swift; sourceTree = ""; }; - CD14958E2374E37C002EDDFB /* RxPeripheral.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxPeripheral.swift; sourceTree = ""; }; - CD1495912374EAD6002EDDFB /* AdvertisementData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvertisementData.swift; sourceTree = ""; }; - CD1495932374EB5C002EDDFB /* CBPeripheralType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CBPeripheralType.swift; sourceTree = ""; }; - CD1495952374EC01002EDDFB /* RxPeripheralImpl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxPeripheralImpl.swift; sourceTree = ""; }; - CD1495972374EC34002EDDFB /* RxPeripheralManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxPeripheralManager.swift; sourceTree = ""; }; - CD3309C12214E4500041EE49 /* RxCBLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxCBLogger.swift; sourceTree = ""; }; - CD4A581F22D9420C00879FCA /* BluetoothDetector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothDetector.swift; sourceTree = ""; }; - CD4A582322D9441200879FCA /* BluetoothDetectorOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothDetectorOptions.swift; sourceTree = ""; }; - CD6F86A522D0759900ED33BE /* ConnectionManagerOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionManagerOptions.swift; sourceTree = ""; }; - CDFE3F4521E83EFA00CF931B /* RxCBCentral.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxCBCentral.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CDFE3F4821E83EFA00CF931B /* RxCBCentral.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RxCBCentral.h; sourceTree = ""; }; - CDFE3F4921E83EFA00CF931B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CDFE3F8421E8420700CF931B /* ConnectionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionManager.swift; sourceTree = ""; }; - CDFE3F8621E8420700CF931B /* ReadRssi.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadRssi.swift; sourceTree = ""; }; - CDFE3F8721E8420700CF931B /* RegisterNotification.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegisterNotification.swift; sourceTree = ""; }; - CDFE3F8821E8420700CF931B /* Write.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Write.swift; sourceTree = ""; }; - CDFE3F8921E8420700CF931B /* Read.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Read.swift; sourceTree = ""; }; - CDFE3F8F21E8420700CF931B /* CentralScanner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CentralScanner.swift; sourceTree = ""; }; - CDFE3F9221E8420700CF931B /* ConnectionManagerType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionManagerType.swift; sourceTree = ""; }; - CDFE3F9321E8420700CF931B /* GattOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GattOperation.swift; sourceTree = ""; }; - CDFE3F9421E8420700CF931B /* BluetoothDetectorType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BluetoothDetectorType.swift; sourceTree = ""; }; - CDFE3F9621E8420700CF931B /* ScanMatching.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScanMatching.swift; sourceTree = ""; }; - CDFE3FB421E8473300CF931B /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = ../Carthage/Build/iOS/RxSwift.framework; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - CDFE3F4221E83EFA00CF931B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - CD3309C02214E4200041EE49 /* debug */ = { - isa = PBXGroup; - children = ( - CD3309C12214E4500041EE49 /* RxCBLogger.swift */, - ); - path = debug; - sourceTree = ""; - }; - CD4A582122D943CD00879FCA /* ConnectionManager */ = { - isa = PBXGroup; - children = ( - CDFE3F8421E8420700CF931B /* ConnectionManager.swift */, - CD6F86A522D0759900ED33BE /* ConnectionManagerOptions.swift */, - ); - path = ConnectionManager; - sourceTree = ""; - }; - CD4A582222D943EA00879FCA /* BluetoothDetector */ = { - isa = PBXGroup; - children = ( - CD4A581F22D9420C00879FCA /* BluetoothDetector.swift */, - CD4A582322D9441200879FCA /* BluetoothDetectorOptions.swift */, - ); - path = BluetoothDetector; - sourceTree = ""; - }; - CDFE3F3B21E83EF900CF931B = { - isa = PBXGroup; - children = ( - CDFE3F8121E8420700CF931B /* Source */, - CDFE3F4721E83EFA00CF931B /* RxCBCentral */, - CDFE3F4621E83EFA00CF931B /* Products */, - CDFE3FB321E8473200CF931B /* Frameworks */, - ); - sourceTree = ""; - }; - CDFE3F4621E83EFA00CF931B /* Products */ = { - isa = PBXGroup; - children = ( - CDFE3F4521E83EFA00CF931B /* RxCBCentral.framework */, - ); - name = Products; - sourceTree = ""; - }; - CDFE3F4721E83EFA00CF931B /* RxCBCentral */ = { - isa = PBXGroup; - children = ( - CDFE3F4821E83EFA00CF931B /* RxCBCentral.h */, - CDFE3F4921E83EFA00CF931B /* Info.plist */, - ); - path = RxCBCentral; - sourceTree = ""; - }; - CDFE3F8121E8420700CF931B /* Source */ = { - isa = PBXGroup; - children = ( - CD14958E2374E37C002EDDFB /* RxPeripheral.swift */, - CD14958D2374E37C002EDDFB /* RxPeripheralManagerType.swift */, - CD3309C02214E4200041EE49 /* debug */, - CDFE3F8321E8420700CF931B /* core */, - CDFE3F9421E8420700CF931B /* BluetoothDetectorType.swift */, - CDFE3F9221E8420700CF931B /* ConnectionManagerType.swift */, - CDFE3F9321E8420700CF931B /* GattOperation.swift */, - CDFE3F9621E8420700CF931B /* ScanMatching.swift */, - ); - name = Source; - path = ../Source; - sourceTree = ""; - }; - CDFE3F8321E8420700CF931B /* core */ = { - isa = PBXGroup; - children = ( - CD4A582222D943EA00879FCA /* BluetoothDetector */, - CD4A582122D943CD00879FCA /* ConnectionManager */, - CDFE3F8521E8420700CF931B /* Operations */, - CDFE3F8E21E8420700CF931B /* Helper */, - CD1495952374EC01002EDDFB /* RxPeripheralImpl.swift */, - CD1495972374EC34002EDDFB /* RxPeripheralManager.swift */, - ); - path = core; - sourceTree = ""; - }; - CDFE3F8521E8420700CF931B /* Operations */ = { - isa = PBXGroup; - children = ( - CDFE3F8621E8420700CF931B /* ReadRssi.swift */, - CDFE3F8721E8420700CF931B /* RegisterNotification.swift */, - CDFE3F8821E8420700CF931B /* Write.swift */, - CDFE3F8921E8420700CF931B /* Read.swift */, - ); - path = Operations; - sourceTree = ""; - }; - CDFE3F8E21E8420700CF931B /* Helper */ = { - isa = PBXGroup; - children = ( - CDFE3F8F21E8420700CF931B /* CentralScanner.swift */, - CD1495912374EAD6002EDDFB /* AdvertisementData.swift */, - CD1495932374EB5C002EDDFB /* CBPeripheralType.swift */, - ); - path = Helper; - sourceTree = ""; - }; - CDFE3FB321E8473200CF931B /* Frameworks */ = { - isa = PBXGroup; - children = ( - CDFE3FB421E8473300CF931B /* RxSwift.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - CDFE3F4021E83EFA00CF931B /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - CDFE3F4A21E83EFA00CF931B /* RxCBCentral.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - CDFE3F4421E83EFA00CF931B /* RxCBCentral */ = { - isa = PBXNativeTarget; - buildConfigurationList = CDFE3F4D21E83EFA00CF931B /* Build configuration list for PBXNativeTarget "RxCBCentral" */; - buildPhases = ( - CDFE3F4021E83EFA00CF931B /* Headers */, - CDFE3F4121E83EFA00CF931B /* Sources */, - CDFE3F4221E83EFA00CF931B /* Frameworks */, - CDFE3F4321E83EFA00CF931B /* Resources */, - CDFE3FB621E8474500CF931B /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RxCBCentral; - productName = RxCBCentral; - productReference = CDFE3F4521E83EFA00CF931B /* RxCBCentral.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - CDFE3F3C21E83EF900CF931B /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1010; - ORGANIZATIONNAME = "Joseph Soultanis"; - TargetAttributes = { - CDFE3F4421E83EFA00CF931B = { - CreatedOnToolsVersion = 10.1; - }; - }; - }; - buildConfigurationList = CDFE3F3F21E83EF900CF931B /* Build configuration list for PBXProject "RxCBCentral" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = CDFE3F3B21E83EF900CF931B; - productRefGroup = CDFE3F4621E83EFA00CF931B /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - CDFE3F4421E83EFA00CF931B /* RxCBCentral */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - CDFE3F4321E83EFA00CF931B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - CDFE3FB621E8474500CF931B /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(SRCROOT)/../Carthage/Build/iOS/RxSwift.framework", - "$(SRCROOT)/../Carthage/Build/iOS/RxAtomic.framework", - "$(SRCROOT)/../Carthage/Build/iOS/RxBlocking.framework", - "$(SRCROOT)/../Carthage/Build/iOS/RxCocoa.framework", - "$(SRCROOT)/../Carthage/Build/iOS/RxTest.framework", - "$(SRCROOT)/../Carthage/Build/iOS/RxOptional.framework", - ); - outputFileListPaths = ( - ); - outputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxSwift.framework", - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxAtomic.framework", - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxBlocking.framework", - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxCocoa.framework", - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxTest.framework", - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxOptional.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/usr/local/bin/carthage copy-frameworks\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - CDFE3F4121E83EFA00CF931B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CDFE3F9D21E8420800CF931B /* ReadRssi.swift in Sources */, - CDFE3FAC21E8420800CF931B /* ScanMatching.swift in Sources */, - CDFE3FAA21E8420800CF931B /* BluetoothDetectorType.swift in Sources */, - CD1495902374E37C002EDDFB /* RxPeripheral.swift in Sources */, - CDFE3F9F21E8420800CF931B /* Write.swift in Sources */, - CDFE3FA821E8420800CF931B /* ConnectionManagerType.swift in Sources */, - CD3309C22214E4500041EE49 /* RxCBLogger.swift in Sources */, - CD14958F2374E37C002EDDFB /* RxPeripheralManagerType.swift in Sources */, - CD1495942374EB5C002EDDFB /* CBPeripheralType.swift in Sources */, - CDFE3FA521E8420800CF931B /* CentralScanner.swift in Sources */, - CDFE3F9C21E8420800CF931B /* ConnectionManager.swift in Sources */, - CDFE3FA921E8420800CF931B /* GattOperation.swift in Sources */, - CD4A582022D9420C00879FCA /* BluetoothDetector.swift in Sources */, - CD1495982374EC34002EDDFB /* RxPeripheralManager.swift in Sources */, - CD6F86A622D0759900ED33BE /* ConnectionManagerOptions.swift in Sources */, - CD4A582422D9441200879FCA /* BluetoothDetectorOptions.swift in Sources */, - CDFE3FA021E8420800CF931B /* Read.swift in Sources */, - CD1495962374EC01002EDDFB /* RxPeripheralImpl.swift in Sources */, - CD1495922374EAD6002EDDFB /* AdvertisementData.swift in Sources */, - CDFE3F9E21E8420800CF931B /* RegisterNotification.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - CDFE3F4B21E83EFA00CF931B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - CDFE3F4C21E83EFA00CF931B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - CDFE3F4E21E83EFA00CF931B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 5F83KRY2FH; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../Carthage/Build/iOS/**"; - INFOPLIST_FILE = RxCBCentral/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.Uber.RxCBCentral; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - CDFE3F4F21E83EFA00CF931B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 5F83KRY2FH; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../Carthage/Build/iOS/**"; - INFOPLIST_FILE = RxCBCentral/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.Uber.RxCBCentral; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - CDFE3F3F21E83EF900CF931B /* Build configuration list for PBXProject "RxCBCentral" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CDFE3F4B21E83EFA00CF931B /* Debug */, - CDFE3F4C21E83EFA00CF931B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CDFE3F4D21E83EFA00CF931B /* Build configuration list for PBXNativeTarget "RxCBCentral" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CDFE3F4E21E83EFA00CF931B /* Debug */, - CDFE3F4F21E83EFA00CF931B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = CDFE3F3C21E83EF900CF931B /* Project object */; -} diff --git a/RxCBCentral/RxCBCentral.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RxCBCentral/RxCBCentral.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index e07cac0..0000000 --- a/RxCBCentral/RxCBCentral.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/RxCBCentral/RxCBCentral.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RxCBCentral/RxCBCentral.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/RxCBCentral/RxCBCentral.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/RxCBCentral/RxCBCentral.xcodeproj/xcuserdata/jsoultanis.xcuserdatad/xcschemes/xcschememanagement.plist b/RxCBCentral/RxCBCentral.xcodeproj/xcuserdata/jsoultanis.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 5975dd9..0000000 --- a/RxCBCentral/RxCBCentral.xcodeproj/xcuserdata/jsoultanis.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - RxCBCentral.xcscheme_^#shared#^_ - - orderHint - 1 - - - - diff --git a/RxCBCentral/RxCBCentral/Info.plist b/RxCBCentral/RxCBCentral/Info.plist deleted file mode 100644 index e1fe4cf..0000000 --- a/RxCBCentral/RxCBCentral/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - - diff --git a/RxCBCentral/RxCBCentral/RxCBCentral.h b/RxCBCentral/RxCBCentral/RxCBCentral.h deleted file mode 100644 index da3512e..0000000 --- a/RxCBCentral/RxCBCentral/RxCBCentral.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -//! Project version number for RxCBCentral. -FOUNDATION_EXPORT double RxCBCentralVersionNumber; - -//! Project version string for RxCBCentral. -FOUNDATION_EXPORT const unsigned char RxCBCentralVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/RxCBCentralTests/Info.plist b/RxCBCentralTests/Info.plist deleted file mode 100644 index 01c18ac..0000000 --- a/RxCBCentralTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.uber.rxcentralbletests - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(EXECUTABLE_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/RxCBCentralTests/Operations/ReadRssiTests.swift b/RxCBCentralTests/Operations/ReadRssiTests.swift deleted file mode 100644 index a08e586..0000000 --- a/RxCBCentralTests/Operations/ReadRssiTests.swift +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) 2018 Uber Technologies, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@testable import RxCentralBLE -import RxSwift -import XCTest - -class ReadRssiTests: XCTest { - -} diff --git a/RxCBCentralTests/Operations/ReadTests.swift b/RxCBCentralTests/Operations/ReadTests.swift deleted file mode 100644 index e69de29..0000000 diff --git a/RxCBCentralTests/Operations/RegisterNotificationTests.swift b/RxCBCentralTests/Operations/RegisterNotificationTests.swift deleted file mode 100644 index e69de29..0000000 diff --git a/RxCBCentralTests/Operations/WriteTests.swift b/RxCBCentralTests/Operations/WriteTests.swift deleted file mode 100644 index e69de29..0000000 diff --git a/Source/BluetoothDetectorType.swift b/Sources/RxCBCentral/BluetoothDetectorType.swift similarity index 100% rename from Source/BluetoothDetectorType.swift rename to Sources/RxCBCentral/BluetoothDetectorType.swift diff --git a/Source/ConnectionManagerType.swift b/Sources/RxCBCentral/ConnectionManagerType.swift similarity index 99% rename from Source/ConnectionManagerType.swift rename to Sources/RxCBCentral/ConnectionManagerType.swift index 7bd675a..9d687e2 100644 --- a/Source/ConnectionManagerType.swift +++ b/Sources/RxCBCentral/ConnectionManagerType.swift @@ -48,7 +48,7 @@ public typealias ScanData = (peripheral: CBPeripheralType, advertisementData: Ad public struct ConnectionDefaults { /// Number of seconds to attempt Bluetooth connection with a discovered peripheral /// before throwing a ConnectionManagerError.connectionTimeout error - public static let defaultConnectionTimeout: RxTimeInterval = 45 + public static let defaultConnectionTimeout: RxTimeInterval = .seconds(45) } public enum ConnectionManagerError: Error { diff --git a/Source/GattOperation.swift b/Sources/RxCBCentral/GattOperation.swift similarity index 99% rename from Source/GattOperation.swift rename to Sources/RxCBCentral/GattOperation.swift index 39aaddc..2c637d4 100644 --- a/Source/GattOperation.swift +++ b/Sources/RxCBCentral/GattOperation.swift @@ -34,5 +34,5 @@ public protocol GattOperation: GattOperationExecutable { public struct GattConstants { /// Number of seconds to attempt a GATT operation before throwing a generic Rx timeout error - public static let defaultOperationTimeout: RxTimeInterval = 30 + public static let defaultOperationTimeout: RxTimeInterval = .seconds(30) } diff --git a/Source/RxPeripheral.swift b/Sources/RxCBCentral/RxPeripheral.swift similarity index 86% rename from Source/RxPeripheral.swift rename to Sources/RxCBCentral/RxPeripheral.swift index 76ae510..b8690c6 100644 --- a/Source/RxPeripheral.swift +++ b/Sources/RxCBCentral/RxPeripheral.swift @@ -96,19 +96,3 @@ public protocol Preprocessor { /// aggregated data does not yet represent a complete demarcated packet. func process(data: Data) -> Data? } - -public extension ObservableType where E == RxPeripheral { - /// Convenience function to provide a one-off read operation without queueing capabilities. Not recommended, but succient. - func read(service: CBUUID, characteristic: CBUUID) -> Observable { - return flatMap { (element: E) -> Single in - element.read(service: service, characteristic: characteristic) - } - } - - /// Convenience function to provide a one-off write operation without queueing capabilities. Not recommended, but succient. - func write(service: CBUUID, characteristic: CBUUID, data: Data) -> Completable { - return flatMap { (element: E) -> Completable in - element.write(service: service, characteristic: characteristic, data: data) - }.asCompletable() - } -} diff --git a/Source/RxPeripheralManagerType.swift b/Sources/RxCBCentral/RxPeripheralManagerType.swift similarity index 100% rename from Source/RxPeripheralManagerType.swift rename to Sources/RxCBCentral/RxPeripheralManagerType.swift diff --git a/Source/ScanMatching.swift b/Sources/RxCBCentral/ScanMatching.swift similarity index 100% rename from Source/ScanMatching.swift rename to Sources/RxCBCentral/ScanMatching.swift diff --git a/Source/core/BluetoothDetector/BluetoothDetector.swift b/Sources/RxCBCentral/core/BluetoothDetector/BluetoothDetector.swift similarity index 100% rename from Source/core/BluetoothDetector/BluetoothDetector.swift rename to Sources/RxCBCentral/core/BluetoothDetector/BluetoothDetector.swift diff --git a/Source/core/BluetoothDetector/BluetoothDetectorOptions.swift b/Sources/RxCBCentral/core/BluetoothDetector/BluetoothDetectorOptions.swift similarity index 100% rename from Source/core/BluetoothDetector/BluetoothDetectorOptions.swift rename to Sources/RxCBCentral/core/BluetoothDetector/BluetoothDetectorOptions.swift diff --git a/Source/core/ConnectionManager/ConnectionManager.swift b/Sources/RxCBCentral/core/ConnectionManager/ConnectionManager.swift similarity index 99% rename from Source/core/ConnectionManager/ConnectionManager.swift rename to Sources/RxCBCentral/core/ConnectionManager/ConnectionManager.swift index 394cb1f..79d4a94 100644 --- a/Source/core/ConnectionManager/ConnectionManager.swift +++ b/Sources/RxCBCentral/core/ConnectionManager/ConnectionManager.swift @@ -213,7 +213,7 @@ public class ConnectionManager: NSObject, ConnectionManagerType, CBCentralManage private let options: ConnectionManagerOptions? // small interval to wait for BLE to become enabled to support lazy instantiation of this class - private let bluetoothEnabledTimeout: RxTimeInterval = 0.1 + private let bluetoothEnabledTimeout: RxTimeInterval = .milliseconds(100) private let bluetoothEnabledSubject = ReplaySubject.create(bufferSize: 1) private let didDiscoverPeripheralSubject: PublishSubject = PublishSubject() diff --git a/Source/core/ConnectionManager/ConnectionManagerOptions.swift b/Sources/RxCBCentral/core/ConnectionManager/ConnectionManagerOptions.swift similarity index 100% rename from Source/core/ConnectionManager/ConnectionManagerOptions.swift rename to Sources/RxCBCentral/core/ConnectionManager/ConnectionManagerOptions.swift diff --git a/Source/core/Helper/AdvertisementData.swift b/Sources/RxCBCentral/core/Helper/AdvertisementData.swift similarity index 100% rename from Source/core/Helper/AdvertisementData.swift rename to Sources/RxCBCentral/core/Helper/AdvertisementData.swift diff --git a/Source/core/Helper/CBPeripheralType.swift b/Sources/RxCBCentral/core/Helper/CBPeripheralType.swift similarity index 100% rename from Source/core/Helper/CBPeripheralType.swift rename to Sources/RxCBCentral/core/Helper/CBPeripheralType.swift diff --git a/Source/core/Helper/CentralScanner.swift b/Sources/RxCBCentral/core/Helper/CentralScanner.swift similarity index 98% rename from Source/core/Helper/CentralScanner.swift rename to Sources/RxCBCentral/core/Helper/CentralScanner.swift index f3f2af8..99dcdec 100644 --- a/Source/core/Helper/CentralScanner.swift +++ b/Sources/RxCBCentral/core/Helper/CentralScanner.swift @@ -80,5 +80,5 @@ public struct ScanOptions { public struct ScanDefaults { /// Number of seconds to scan before throwing a ConnectionManagerError.scanTimeout error - public static let defaultScanTimeout: RxTimeInterval = 20 + public static let defaultScanTimeout: RxTimeInterval = .seconds(20) } diff --git a/Source/core/Operations/Read.swift b/Sources/RxCBCentral/core/Operations/Read.swift similarity index 100% rename from Source/core/Operations/Read.swift rename to Sources/RxCBCentral/core/Operations/Read.swift diff --git a/Source/core/Operations/ReadRssi.swift b/Sources/RxCBCentral/core/Operations/ReadRssi.swift similarity index 100% rename from Source/core/Operations/ReadRssi.swift rename to Sources/RxCBCentral/core/Operations/ReadRssi.swift diff --git a/Source/core/Operations/RegisterNotification.swift b/Sources/RxCBCentral/core/Operations/RegisterNotification.swift similarity index 100% rename from Source/core/Operations/RegisterNotification.swift rename to Sources/RxCBCentral/core/Operations/RegisterNotification.swift diff --git a/Source/core/Operations/Write.swift b/Sources/RxCBCentral/core/Operations/Write.swift similarity index 100% rename from Source/core/Operations/Write.swift rename to Sources/RxCBCentral/core/Operations/Write.swift diff --git a/Source/core/RxPeripheralImpl.swift b/Sources/RxCBCentral/core/RxPeripheralImpl.swift similarity index 100% rename from Source/core/RxPeripheralImpl.swift rename to Sources/RxCBCentral/core/RxPeripheralImpl.swift diff --git a/Source/core/RxPeripheralManager.swift b/Sources/RxCBCentral/core/RxPeripheralManager.swift similarity index 99% rename from Source/core/RxPeripheralManager.swift rename to Sources/RxCBCentral/core/RxPeripheralManager.swift index c55716f..7efbbf1 100644 --- a/Source/core/RxPeripheralManager.swift +++ b/Sources/RxCBCentral/core/RxPeripheralManager.swift @@ -107,7 +107,7 @@ fileprivate struct GattQueue { } extension ObservableType { - func doFinally(_ finally: @escaping () -> ()) -> Observable { + func doFinally(_ finally: @escaping () -> ()) -> Observable { return `do`(onError: { _ in finally() }, onCompleted: finally, onDispose: finally) diff --git a/Source/debug/RxCBLogger.swift b/Sources/RxCBCentral/debug/RxCBLogger.swift similarity index 100% rename from Source/debug/RxCBLogger.swift rename to Sources/RxCBCentral/debug/RxCBLogger.swift diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..c4b1ee0 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import RxCBCentralTests + +var tests = [XCTestCaseEntry]() +tests += RxCBCentralTests.allTests() +XCTMain(tests) diff --git a/Tests/RxCBCentralTests/RxCBCentralTests.swift b/Tests/RxCBCentralTests/RxCBCentralTests.swift new file mode 100644 index 0000000..c0ea886 --- /dev/null +++ b/Tests/RxCBCentralTests/RxCBCentralTests.swift @@ -0,0 +1,9 @@ +import XCTest +@testable import RxCBCentral + +final class RxCBCentralTests: XCTestCase { + func test_connectionManager_isConnected() { + XCTAssert(true) + } + +} diff --git a/Tests/RxCBCentralTests/XCTestManifests.swift b/Tests/RxCBCentralTests/XCTestManifests.swift new file mode 100644 index 0000000..6c409fe --- /dev/null +++ b/Tests/RxCBCentralTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !canImport(ObjectiveC) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(RxCBCentralTests.allTests), + ] +} +#endif