Skip to content

Commit

Permalink
tweak some settings, fix some warnings, add more sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
klundberg committed Sep 10, 2024
1 parent 7483637 commit ee13ce5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 18 deletions.
6 changes: 5 additions & 1 deletion CombineCoreBluetooth.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1330;
LastUpgradeCheck = 1520;
LastUpgradeCheck = 1600;
TargetAttributes = {
003719F727EE588900C2F766 = {
CreatedOnToolsVersion = 13.3;
Expand Down Expand Up @@ -738,6 +738,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 0.2.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
Expand Down Expand Up @@ -773,6 +774,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 0.2.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17";
Expand All @@ -795,6 +797,7 @@
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.starry.CombineCoreBluetooth-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -812,6 +815,7 @@
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.starry.CombineCoreBluetooth-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
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 = "1520"
LastUpgradeVersion = "1600"
version = "1.7">
<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 = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@
"revision" : "ea631ce892687f5432a833312292b80db238186a",
"version" : "1.0.0"
}
},
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-plugin",
"state" : {
"revision" : "3303b164430d9a7055ba484c8ead67a52f7b74f6",
"version" : "1.0.0"
}
}
],
"version" : 2
Expand Down
5 changes: 2 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -7,7 +7,7 @@ let package = Package(
name: "CombineCoreBluetooth",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.macOS(.v11),
.tvOS(.v13),
.watchOS(.v6),
],
Expand All @@ -19,7 +19,6 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras", "0.1.0"..<"2.0.0"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@preconcurrency import Combine
@preconcurrency import CoreBluetooth
import Foundation

public struct CentralManager: Sendable {
Expand Down Expand Up @@ -127,7 +128,7 @@ public struct CentralManager: Sendable {
}

/// Configuration options used when creating a `CentralManager`.
public struct CreationOptions {
public struct CreationOptions: Sendable {
/// If true, display a warning dialog to the user when the `CentralManager` is instantiated if Bluetooth is powered off
public var showPowerAlert: Bool?
/// A unique identifier for the Central Manager that's being instantiated. This identifier is used by the system to identify a specific CBCentralManager instance for restoration and, therefore, must remain the same for subsequent application executions in order for the manager to be restored.
Expand All @@ -140,7 +141,7 @@ public struct CentralManager: Sendable {
}

/// Options used when scanning for peripherals.
public struct ScanOptions {
public struct ScanOptions: Sendable {
/// Whether or not the scan should filter duplicate peripheral discoveries
public var allowDuplicates: Bool?
/// Causes the scan to also look for peripherals soliciting any of the services contained in the list.
Expand Down Expand Up @@ -184,5 +185,5 @@ public struct CentralManager: Sendable {
}

@objc(CCBCentralManagerRestorableDelegate)
class RestorableDelegate: Delegate, @unchecked Sendable {}
final class RestorableDelegate: Delegate, @unchecked Sendable {}
}

0 comments on commit ee13ce5

Please sign in to comment.