debug: adv_start return check, iOS concurrency fixes, Info.plist bundle keys
This commit is contained in:
parent
e12207b6e7
commit
596f641f7f
|
|
@ -8,8 +8,8 @@ import Foundation
|
|||
@Observable
|
||||
final class BLEManager: NSObject {
|
||||
|
||||
static let midiServiceUUID = CBUUID(string: "03B80E5A-EDE8-4B33-A751-6CE34EC4C700")
|
||||
static let midiCharUUID = CBUUID(string: "7772E5DB-3868-4112-A1A9-F2669D106BF3")
|
||||
nonisolated(unsafe) static let midiServiceUUID = CBUUID(string: "03B80E5A-EDE8-4B33-A751-6CE34EC4C700")
|
||||
nonisolated(unsafe) static let midiCharUUID = CBUUID(string: "7772E5DB-3868-4112-A1A9-F2669D106BF3")
|
||||
|
||||
enum ConnectionState: String {
|
||||
case disconnected = "Disconnected"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,18 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>NSBluetoothAlwaysUsageDescription</key>
|
||||
<string>EIS4 uses Bluetooth to communicate with the impedance analyzer</string>
|
||||
<key>UIBackgroundModes</key>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ struct DataPoint: Codable, FetchableRecord, MutablePersistableRecord {
|
|||
|
||||
// MARK: - Database manager
|
||||
|
||||
final class Storage {
|
||||
final class Storage: @unchecked Sendable {
|
||||
static let shared = Storage()
|
||||
|
||||
private let dbQueue: DatabaseQueue
|
||||
|
|
|
|||
|
|
@ -550,8 +550,12 @@ static void start_adv(void)
|
|||
struct ble_gap_adv_params params = {0};
|
||||
params.conn_mode = BLE_GAP_CONN_MODE_UND;
|
||||
params.disc_mode = BLE_GAP_DISC_MODE_GEN;
|
||||
ble_gap_adv_start(BLE_OWN_ADDR_PUBLIC, NULL, BLE_HS_FOREVER,
|
||||
int rc = ble_gap_adv_start(BLE_OWN_ADDR_PUBLIC, NULL, BLE_HS_FOREVER,
|
||||
¶ms, gap_event_cb, NULL);
|
||||
if (rc)
|
||||
printf("BLE: adv_start failed: %d\n", rc);
|
||||
else
|
||||
printf("BLE: advertising\n");
|
||||
}
|
||||
|
||||
static void on_sync(void)
|
||||
|
|
|
|||
Loading…
Reference in New Issue