Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
Protobuf: 1a37ebea1338949e9ac35a3f06e80b3f536eec8d
reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c
reactive_ble_mobile: 3831edf37e03054cb94c9d98391d4a603df7273f
SwiftProtobuf: 9c85136c6ba74b0a1b84279dbf0f6db8efb714e0

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d

COCOAPODS: 1.11.2
9 changes: 5 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 29DK8LS8B3;
LastSwiftMigration = 0910;
LastSwiftMigration = 1310;
};
};
};
Expand Down Expand Up @@ -362,7 +361,7 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -412,7 +411,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -441,6 +440,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -467,6 +467,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.signify.huereactivebleExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down
40 changes: 20 additions & 20 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
Expand All @@ -42,7 +42,7 @@ packages:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
build_config:
dependency: transitive
description:
Expand All @@ -56,7 +56,7 @@ packages:
name: build_daemon
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.0.1"
build_resolvers:
dependency: transitive
description:
Expand All @@ -70,7 +70,7 @@ packages:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.5"
build_runner_core:
dependency: transitive
description:
Expand All @@ -91,14 +91,14 @@ packages:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.2"
version: "8.1.3"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.1.0"
charcode:
dependency: transitive
description:
Expand All @@ -119,7 +119,7 @@ packages:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3"
version: "0.3.5"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -161,7 +161,7 @@ packages:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
dependency_validator:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -208,7 +208,7 @@ packages:
path: "../packages/flutter_reactive_ble"
relative: true
source: path
version: "5.0.1"
version: "5.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -241,7 +241,7 @@ packages:
name: glob
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.2"
graphs:
dependency: transitive
description:
Expand Down Expand Up @@ -290,7 +290,7 @@ packages:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
version: "4.3.0"
lints:
dependency: transitive
description:
Expand All @@ -311,7 +311,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
version: "0.12.10"
meta:
dependency: transitive
description:
Expand All @@ -325,7 +325,7 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -360,7 +360,7 @@ packages:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "2.0.2"
pool:
dependency: transitive
description:
Expand Down Expand Up @@ -406,9 +406,9 @@ packages:
reactive_ble_platform_interface:
dependency: transitive
description:
name: reactive_ble_platform_interface
url: "https://pub.dartlang.org"
source: hosted
path: "../packages/reactive_ble_platform_interface"
relative: true
source: path
version: "5.0.2"
shelf:
dependency: transitive
Expand Down Expand Up @@ -484,7 +484,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
version: "0.4.2"
timing:
dependency: transitive
description:
Expand All @@ -505,14 +505,14 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.0"
watcher:
dependency: transitive
description:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
web_socket_channel:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ packages:
- /**
scripts:
analyze: melos exec -- flutter analyze
generate: melos exec -c 1 -- flutter pub run build_runner build --delete-conflicting-outputs
format: melos exec -- flutter format .
get: melos exec -- flutter pub get
unittest:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ abstract class ConnectedDeviceOperation {
required List<int> value,
});

Future<void> writeDescriptorWithoutResponse(
QualifiedDescriptor descriptor, {
required List<int> value,
});

Stream<List<int>> subscribeToCharacteristic(
QualifiedCharacteristic characteristic,
Future<void> isDisconnected,
Expand Down Expand Up @@ -71,6 +76,13 @@ class ConnectedDeviceOperationImpl implements ConnectedDeviceOperation {
.writeCharacteristicWithoutResponse(characteristic, value)
.then((info) => info.result.dematerialize());

@override
Future<void> writeDescriptorWithoutResponse(QualifiedDescriptor descriptor,
{required List<int> value}) =>
_blePlatform
.writeDescriptorWithoutResponse(descriptor, value)
.then((info) => info.result.dematerialize());

@override
Stream<List<int>> subscribeToCharacteristic(
QualifiedCharacteristic characteristic,
Expand Down
11 changes: 11 additions & 0 deletions packages/flutter_reactive_ble/lib/src/reactive_ble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,17 @@ class FlutterReactiveBle {
);
}

Future<void> writeDescriptor(
QualifiedDescriptor descriptor, {
required List<int> value,
}) async {
await initialize();
return _connectedDeviceOperator.writeDescriptorWithoutResponse(
descriptor,
value: value,
);
}

/// Request a specific MTU for a connected device.
///
/// Returns the actual MTU negotiated.
Expand Down
Loading