Skip to content

Commit ccc0298

Browse files
RtgrVRutgerVromans
andauthored
Add connectability from discovery data (#750)
* Update dependencies, set ruby version and run codegen * Add IsConnectable support for Android and iOS * iOS Project updates * Set melos to fixed version * Add tests * Keep bledata protos number in order --------- Co-authored-by: RutgerVromans <[email protected]>
1 parent 9aa9957 commit ccc0298

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4097
-3045
lines changed

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.6.5

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Feel free to open an new issue or a pull request to make this project better
1111

1212
This project uses melos to manage all the packages inside this repo.
1313

14-
Install melos: `dart pub global activate melos`
14+
Install melos: `dart pub global activate melos 2.9.0`
1515
Setup melos to point to the dependencies in your local folder: `melos bootstrap`
1616

1717
### Android

bin/quality_checks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ echo 'export PATH="$PATH":"$FLUTTER_ROOT/.pub-cache/bin"' >>~/.bashrc
44
echo 'export PATH="$PATH":"$FLUTTER_ROOT/bin"' >>~/.bashrc
55
source ~/.bashrc
66

7-
dart pub global activate melos
7+
dart pub global activate melos 2.9.0
88

99
melos bootstrap
1010
melos run analyze

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>9.0</string>
24+
<string>11.0</string>
2525
</dict>
2626
</plist>

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# platform :ios, '11.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ EXTERNAL SOURCES:
2323
:path: ".symlinks/plugins/reactive_ble_mobile/ios"
2424

2525
SPEC CHECKSUMS:
26-
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
26+
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
2727
Protobuf: 1a37ebea1338949e9ac35a3f06e80b3f536eec8d
2828
reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c
2929
SwiftProtobuf: 9c85136c6ba74b0a1b84279dbf0f6db8efb714e0
3030

31-
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
31+
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
3232

33-
COCOAPODS: 1.11.2
33+
COCOAPODS: 1.10.1

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -161,7 +161,7 @@
161161
97C146E61CF9000F007C117D /* Project object */ = {
162162
isa = PBXProject;
163163
attributes = {
164-
LastUpgradeCheck = 1010;
164+
LastUpgradeCheck = 1300;
165165
ORGANIZATIONNAME = "The Chromium Authors";
166166
TargetAttributes = {
167167
97C146ED1CF9000F007C117D = {
@@ -207,10 +207,12 @@
207207
/* Begin PBXShellScriptBuildPhase section */
208208
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
209209
isa = PBXShellScriptBuildPhase;
210+
alwaysOutOfDate = 1;
210211
buildActionMask = 2147483647;
211212
files = (
212213
);
213214
inputPaths = (
215+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
214216
);
215217
name = "Thin Binary";
216218
outputPaths = (
@@ -221,6 +223,7 @@
221223
};
222224
9740EEB61CF901F6004384FC /* Run Script */ = {
223225
isa = PBXShellScriptBuildPhase;
226+
alwaysOutOfDate = 1;
224227
buildActionMask = 2147483647;
225228
files = (
226229
);
@@ -432,7 +435,10 @@
432435
"$(PROJECT_DIR)/Flutter",
433436
);
434437
INFOPLIST_FILE = Runner/Info.plist;
435-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
438+
LD_RUNPATH_SEARCH_PATHS = (
439+
"$(inherited)",
440+
"@executable_path/Frameworks",
441+
);
436442
LIBRARY_SEARCH_PATHS = (
437443
"$(inherited)",
438444
"$(PROJECT_DIR)/Flutter",
@@ -459,7 +465,10 @@
459465
"$(PROJECT_DIR)/Flutter",
460466
);
461467
INFOPLIST_FILE = Runner/Info.plist;
462-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
468+
LD_RUNPATH_SEARCH_PATHS = (
469+
"$(inherited)",
470+
"@executable_path/Frameworks",
471+
);
463472
LIBRARY_SEARCH_PATHS = (
464473
"$(inherited)",
465474
"$(PROJECT_DIR)/Flutter",

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

example/ios/Runner/Info.plist

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>en</string>
79
<key>CFBundleExecutable</key>
@@ -22,6 +24,12 @@
2224
<string>$(FLUTTER_BUILD_NUMBER)</string>
2325
<key>LSRequiresIPhoneOS</key>
2426
<true/>
27+
<key>NSBluetoothAlwaysUsageDescription</key>
28+
<string>The app uses bluetooth to find, connect and transfer data between different devices</string>
29+
<key>NSBluetoothPeripheralUsageDescription</key>
30+
<string>The app uses bluetooth to find, connect and transfer data between different devices</string>
31+
<key>UIApplicationSupportsIndirectInputEvents</key>
32+
<true/>
2533
<key>UIBackgroundModes</key>
2634
<array>
2735
<string>bluetooth-central</string>
@@ -45,9 +53,5 @@
4553
</array>
4654
<key>UIViewControllerBasedStatusBarAppearance</key>
4755
<false/>
48-
<key>NSBluetoothAlwaysUsageDescription</key>
49-
<string>The app uses bluetooth to find, connect and transfer data between different devices</string>
50-
<key>NSBluetoothPeripheralUsageDescription</key>
51-
<string>The app uses bluetooth to find, connect and transfer data between different devices</string>
5256
</dict>
5357
</plist>

example/lib/src/ui/device_detail/device_detail_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class _DeviceDetail extends StatelessWidget {
3939
length: 2,
4040
child: Scaffold(
4141
appBar: AppBar(
42-
title: Text(device.name),
42+
title: Text(device.name.isNotEmpty ? device.name : "Unnamed"),
4343
bottom: const TabBar(
4444
tabs: [
4545
Tab(

0 commit comments

Comments
 (0)