Skip to content

Commit

Permalink
Merge pull request #36 from NordicSemiconductor/develop
Browse files Browse the repository at this point in the history
Version 0.12.1
  • Loading branch information
philips77 authored Apr 30, 2021
2 parents af28b32 + 43a5c62 commit 360ba1f
Show file tree
Hide file tree
Showing 22 changed files with 390 additions and 359 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ Carthage/Build
# `pod install` in .travis.yml
#
# Pods/
.swiftpm
4 changes: 2 additions & 2 deletions CoreBluetoothMock.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'CoreBluetoothMock'
s.version = '0.12.0'
s.version = '0.12.1'
s.summary = 'Mocking library for CoreBluetooth.'

s.description = <<-DESC
Expand All @@ -18,7 +18,7 @@ device and test the app on simulator.
s.osx.deployment_target = '10.13'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
s.swift_versions = ['4.2', '5.0', '5.1', '5.2', '5.3']
s.swift_versions = ['4.2', '5.0', '5.1', '5.2', '5.3', '5.4']
s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }

s.source_files = 'CoreBluetoothMock/Classes/**/*'
Expand Down
7 changes: 7 additions & 0 deletions CoreBluetoothMock/Classes/CBMAttribute.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import CoreBluetooth

open class CBMAttribute: NSObject {
var uuid: CBUUID {
fatalError()
}
}
2 changes: 1 addition & 1 deletion CoreBluetoothMock/Classes/CBMCentralManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import CoreBluetooth

public protocol CBMCentralManager: class {
public protocol CBMCentralManager: AnyObject {
#if !os(macOS)
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, *)
typealias Feature = CBCentralManager.Feature
Expand Down
2 changes: 1 addition & 1 deletion CoreBluetoothMock/Classes/CBMCentralManagerDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import CoreBluetooth

public protocol CBMCentralManagerDelegate: class {
public protocol CBMCentralManagerDelegate: AnyObject {

/// Invoked whenever the central manager's state has been updated. Commands
/// should only be issued when the state is `.poweredOn`.
Expand Down
5 changes: 3 additions & 2 deletions CoreBluetoothMock/Classes/CBMManagerTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ public enum CBMManagerState: Int {
case poweredOn
}

public typealias CBMPeer = CBPeer
public typealias CBMAttribute = CBAttribute
// disabled for Xcode 12.5 beta
//public typealias CBMPeer = CBPeer
//public typealias CBMAttribute = CBAttribute
public typealias CBMUUID = CBUUID
public typealias CBMError = CBError
public typealias CBMATTError = CBATTError
Expand Down
7 changes: 7 additions & 0 deletions CoreBluetoothMock/Classes/CBMPeer.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Foundation

open class CBMPeer: NSObject {
var identifier: UUID {
fatalError()
}
}
2 changes: 1 addition & 1 deletion CoreBluetoothMock/Classes/CBMPeripheral.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import CoreBluetooth

public protocol CBMPeripheral: class {
public protocol CBMPeripheral: AnyObject {

/// The unique, persistent identifier associated with the peer.
var identifier: UUID { get }
Expand Down
2 changes: 1 addition & 1 deletion CoreBluetoothMock/Classes/CBMPeripheralDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import CoreBluetooth

public protocol CBMPeripheralDelegate: class {
public protocol CBMPeripheralDelegate: AnyObject {

/// This method is invoked when the name of peripheral changes.
/// - Parameter peripheral: The peripheral providing this update.
Expand Down
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- CoreBluetoothMock (0.12.0)
- CoreBluetoothMock (0.12.1)

DEPENDENCIES:
- CoreBluetoothMock (from `../`)
Expand All @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
CoreBluetoothMock: 064e0be151a9182679fc92e7549cacd30d1239eb
CoreBluetoothMock: b9c3c1c3d316c5a6eab03aab74971a93f942128a

PODFILE CHECKSUM: 254d1c78543186e7159c621729d31f797f3b1083

COCOAPODS: 1.10.0.rc.1
COCOAPODS: 1.10.1
9 changes: 5 additions & 4 deletions Example/Pods/Local Podspecs/CoreBluetoothMock.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

600 changes: 300 additions & 300 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Example/nRFBlinky.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1130;
LastUpgradeCheck = 1200;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
526EA539240D2F8100BF70B2 = {
Expand Down Expand Up @@ -733,7 +733,7 @@
DEVELOPMENT_TEAM = P3R8YQEV4L;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "UI Tests/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -764,7 +764,7 @@
DEVELOPMENT_TEAM = P3R8YQEV4L;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = nRFBlinky_UITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";
Expand Down Expand Up @@ -793,7 +793,7 @@
DEVELOPMENT_TEAM = P3R8YQEV4L;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -821,7 +821,7 @@
DEVELOPMENT_TEAM = P3R8YQEV4L;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = nRFBlinky_Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.nordicsemi.nRFBlinky-Tests";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
5 changes: 3 additions & 2 deletions Example/nRFBlinky/CoreBluetoothTypeAliases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ import CoreBluetoothMock
// the imports to CoreBluetooth to fix conflicts and initiate the manager
// using CBCentralManagerFactory, instad of just creating a CBCentralManager.

// disabled for Xcode 12.5 beta
//typealias CBPeer = CBMPeer
//typealias CBAttribute = CBMAttribute
typealias CBCentralManagerFactory = CBMCentralManagerFactory
typealias CBPeer = CBMPeer
typealias CBUUID = CBMUUID
typealias CBError = CBMError
typealias CBATTError = CBMATTError
Expand All @@ -46,7 +48,6 @@ typealias CBCentralManager = CBMCentralManager
typealias CBCentralManagerDelegate = CBMCentralManagerDelegate
typealias CBPeripheral = CBMPeripheral
typealias CBPeripheralDelegate = CBMPeripheralDelegate
typealias CBAttribute = CBMAttribute
typealias CBService = CBMService
typealias CBCharacteristic = CBMCharacteristic
typealias CBCharacteristicWriteType = CBMCharacteristicWriteType
Expand Down
Loading

0 comments on commit 360ba1f

Please sign in to comment.