Skip to content

Commit 44621e9

Browse files
authored
Merge pull request #1285 from carp-dk/movesense_plus-ios
movesense_plus 1.2.1
2 parents c52173d + c8fcebc commit 44621e9

8 files changed

Lines changed: 159 additions & 21 deletions

File tree

packages/movesense_plus/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.1
2+
3+
* update of example app to run on iOS incl. docs
4+
15
## 1.2.0
26

37
* connect and disconnect method not async

packages/movesense_plus/README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
A Flutter plugin for accessing the [Movesense](https://www.movesense.com/) family of ECG devices. This is a developer-friendly wrapper of the [mdsflutter](https://pub.dev/packages/mdsflutter) plugin.
1+
A Flutter plugin for accessing the [Movesense](https://www.movesense.com/) family of ECG devices. This is a developer-friendly and strongly typed wrapper of the [mdsflutter](https://pub.dev/packages/mdsflutter) plugin.
22

33
## Features
44

@@ -16,25 +16,21 @@ This plugin supports the following features, which is the most commonly used sub
1616

1717
## Getting started
1818

19-
Similar to the [mdsflutter](https://pub.dev/packages/mdsflutter) plugin, the Movesense library needs to be installed in your app.
20-
2119
> **NOTE:** This plugin does not handle permission to access Bluetooth. Use the [permission_handler](https://pub.dev/packages/permission_handler) plugin to request access to scan and connect to BLE devices. See the example app.
2220
23-
### iOS
24-
25-
Install the Movesense iOS library using CocoaPods with adding this line to your app's Podfile:
21+
Similar to the [mdsflutter](https://pub.dev/packages/mdsflutter) plugin, the Movesense library needs to be installed in your app.
2622

27-
```shell
28-
pod 'Movesense', :git => 'ssh://git@altssh.bitbucket.org:443/movesense/movesense-mobile-lib.git'
29-
```
23+
### iOS
3024

31-
Then set up your `ios/Podfile` as follows:
25+
The Movesense iOS library is installed using CocoaPods by adding the following lines to your app's `ios/Podfile`:
3226

33-
```pod
27+
```ruby
3428
target 'Runner' do
29+
# replace "use_frameworks!" with static packages for the Movesense pod
3530
use_modular_headers!
3631
use_frameworks! :linkage => :static
3732

33+
# add Movesense pod
3834
pod 'Movesense', :git => 'https://bitbucket.org/movesense/movesense-mobile-lib.git'
3935

4036
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
@@ -45,7 +41,7 @@ This will ensure that the MDS library is linked correctly. If you need to use fr
4541

4642
### Android
4743

48-
Download `mdslib-x.x.x-release.aar` from the [movesense-mobile-lib](https://bitbucket.org/movesense/movesense-mobile-lib/src/master/) repository and put it somewhere under `android` folder of your app. Preferably create a new folder named `android/libs` and put it there.
44+
Download the latest `mdslib-x.x.x-release.aar` from the [movesense-mobile-lib](https://bitbucket.org/movesense/movesense-mobile-lib/src/master/) repository and put it somewhere under `android` folder of your app. Preferably create a new folder named `android/libs` and put it there.
4945

5046
In the `build.gradle` of your android project, add the following lines (assuming `.aar` file is in `android/libs`) for Groovy:
5147

@@ -84,7 +80,7 @@ Movesense().stopScan();
8480

8581
### Connecting to a device
8682

87-
Scanning return a `MovesenseDevice` which can be used to connect to the device, like:
83+
Scanning returns a `MovesenseDevice` which can be used to initiate connection to the device, like:
8884

8985
```dart
9086
if (!device.isConnected) {
@@ -100,6 +96,11 @@ final MovesenseDevice device = MovesenseDevice(address: '0C:8C:DC:1B:23:BF');
10096
device.connect();
10197
```
10298

99+
> **NOTE:** The `address` format is platform dependent:
100+
>
101+
> * On Android, the address is the Bluetooth MAC address (e.g. "0C:8C:DC:1B:23:BF").
102+
> * On iOS, the address is the UUID of the device (e.g. "89BD8BF8-C9E7-0395-3B1D-119082516DDE").
103+
103104
Connection status is available in the `status` field and is also emitted in the `statusEvents` stream.
104105

105106
```dart
@@ -112,10 +113,10 @@ device.statusEvents.listen((status) {
112113

113114
### Accessing device information, battery status, and system states
114115

115-
The following device information and status is available as getter methods:
116+
Once connected, the following device information is available as getter methods:
116117

117118
* `getDeviceInfo` - get the full [device info](https://www.movesense.com/docs/esw/api_reference/#info) of this Movesense device.
118-
* `getBatteryStatus` - get the [battery level](https://www.movesense.com/docs/esw/api_reference/#systemstates) ("OK" or "LOW") from the device.
119+
* `getBatteryStatus` - get the [battery level](https://www.movesense.com/docs/esw/api_reference/#systemstates) ("OK" or "LOW") of the device.
119120
* `getState` - get the [system state](https://www.movesense.com/docs/esw/api_reference/#systemstates) from the device (movement, connectors, doubleTap, tap, freeFall).
120121

121122
For example, getting device info and battery level:
@@ -163,7 +164,7 @@ stateSubscription = device
163164
});
164165
```
165166

166-
> **NOTE:** Listening to system state events on a Movensense device comes with some limitations. First of all, you can [only listen to one type of state event at a time](https://github.com/petri-lipponen-movesense/mdsflutter/issues/15). Second, not all Movesense devices seems to support subscription of all types of state events. For example, it seems like only the 'connectors' and 'tap' states are supported on the Movesense MD and HR2 devices.
167+
> **NOTE:** Listening to system state events on a Movensense device comes with some limitations. First of all, you can [only listen to one type of state event at a time](https://github.com/petri-lipponen-movesense/mdsflutter/issues/15). Second, not all Movesense devices support subscription of all types of state events. For example, it seems like only the 'connectors' and 'tap' states are supported on the Movesense MD and HR2 devices.
167168
168169
## Example App
169170

packages/movesense_plus/example/ios/Podfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
2828
flutter_ios_podfile_setup
2929

3030
target 'Runner' do
31-
use_frameworks!
31+
# replace "use_frameworks!" with static packages for the Movesense pod
32+
use_modular_headers!
33+
use_frameworks! :linkage => :static
34+
35+
# add Movesense pod
36+
pod 'Movesense', :git => 'https://bitbucket.org/movesense/movesense-mobile-lib.git'
3237

3338
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
39+
3440
target 'RunnerTests' do
3541
inherit! :search_paths
3642
end

packages/movesense_plus/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
11390E964DF93FDD14862162 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 584E34BC3BE863F3647682CF /* Pods_RunnerTests.framework */; };
1011
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1112
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
1213
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1314
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15+
791D520225B2BE29FE5603AD /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA74802E011D97599336CEDA /* Pods_Runner.framework */; };
1416
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1517
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1618
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -42,9 +44,15 @@
4244
/* Begin PBXFileReference section */
4345
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4446
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
47+
150F41D93EA1EE707B6893C2 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
4548
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
4649
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
50+
3578B4A11D7A13B0C0C33880 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
4751
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
52+
3B5C5141498770A8AAD787CE /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
53+
584E34BC3BE863F3647682CF /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
54+
5A6C914EA16E1B268034F434 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
55+
625F34F7B39D92A952210EAB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
4856
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
4957
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5058
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -55,13 +63,24 @@
5563
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5664
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5765
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
66+
BFE8844EA1B8DAD0F91BE8D4 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
67+
EA74802E011D97599336CEDA /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5868
/* End PBXFileReference section */
5969

6070
/* Begin PBXFrameworksBuildPhase section */
71+
676BC7E19FDCF896DDE6CA2D /* Frameworks */ = {
72+
isa = PBXFrameworksBuildPhase;
73+
buildActionMask = 2147483647;
74+
files = (
75+
11390E964DF93FDD14862162 /* Pods_RunnerTests.framework in Frameworks */,
76+
);
77+
runOnlyForDeploymentPostprocessing = 0;
78+
};
6179
97C146EB1CF9000F007C117D /* Frameworks */ = {
6280
isa = PBXFrameworksBuildPhase;
6381
buildActionMask = 2147483647;
6482
files = (
83+
791D520225B2BE29FE5603AD /* Pods_Runner.framework in Frameworks */,
6584
);
6685
runOnlyForDeploymentPostprocessing = 0;
6786
};
@@ -76,6 +95,15 @@
7695
path = RunnerTests;
7796
sourceTree = "<group>";
7897
};
98+
3D6E6CF464A086B475403C84 /* Frameworks */ = {
99+
isa = PBXGroup;
100+
children = (
101+
EA74802E011D97599336CEDA /* Pods_Runner.framework */,
102+
584E34BC3BE863F3647682CF /* Pods_RunnerTests.framework */,
103+
);
104+
name = Frameworks;
105+
sourceTree = "<group>";
106+
};
79107
9740EEB11CF90186004384FC /* Flutter */ = {
80108
isa = PBXGroup;
81109
children = (
@@ -94,6 +122,8 @@
94122
97C146F01CF9000F007C117D /* Runner */,
95123
97C146EF1CF9000F007C117D /* Products */,
96124
331C8082294A63A400263BE5 /* RunnerTests */,
125+
B9133924A445600D0E2D6A71 /* Pods */,
126+
3D6E6CF464A086B475403C84 /* Frameworks */,
97127
);
98128
sourceTree = "<group>";
99129
};
@@ -121,15 +151,30 @@
121151
path = Runner;
122152
sourceTree = "<group>";
123153
};
154+
B9133924A445600D0E2D6A71 /* Pods */ = {
155+
isa = PBXGroup;
156+
children = (
157+
5A6C914EA16E1B268034F434 /* Pods-Runner.debug.xcconfig */,
158+
BFE8844EA1B8DAD0F91BE8D4 /* Pods-Runner.release.xcconfig */,
159+
625F34F7B39D92A952210EAB /* Pods-Runner.profile.xcconfig */,
160+
3B5C5141498770A8AAD787CE /* Pods-RunnerTests.debug.xcconfig */,
161+
3578B4A11D7A13B0C0C33880 /* Pods-RunnerTests.release.xcconfig */,
162+
150F41D93EA1EE707B6893C2 /* Pods-RunnerTests.profile.xcconfig */,
163+
);
164+
path = Pods;
165+
sourceTree = "<group>";
166+
};
124167
/* End PBXGroup section */
125168

126169
/* Begin PBXNativeTarget section */
127170
331C8080294A63A400263BE5 /* RunnerTests */ = {
128171
isa = PBXNativeTarget;
129172
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
130173
buildPhases = (
174+
DC21CCCA15BD9223F44BF528 /* [CP] Check Pods Manifest.lock */,
131175
331C807D294A63A400263BE5 /* Sources */,
132176
331C807F294A63A400263BE5 /* Resources */,
177+
676BC7E19FDCF896DDE6CA2D /* Frameworks */,
133178
);
134179
buildRules = (
135180
);
@@ -145,12 +190,14 @@
145190
isa = PBXNativeTarget;
146191
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
147192
buildPhases = (
193+
DD496E7827A31159F1F69860 /* [CP] Check Pods Manifest.lock */,
148194
9740EEB61CF901F6004384FC /* Run Script */,
149195
97C146EA1CF9000F007C117D /* Sources */,
150196
97C146EB1CF9000F007C117D /* Frameworks */,
151197
97C146EC1CF9000F007C117D /* Resources */,
152198
9705A1C41CF9048500538489 /* Embed Frameworks */,
153199
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
200+
0C28527E7CE60DAE47A7373A /* [CP] Copy Pods Resources */,
154201
);
155202
buildRules = (
156203
);
@@ -222,6 +269,23 @@
222269
/* End PBXResourcesBuildPhase section */
223270

224271
/* Begin PBXShellScriptBuildPhase section */
272+
0C28527E7CE60DAE47A7373A /* [CP] Copy Pods Resources */ = {
273+
isa = PBXShellScriptBuildPhase;
274+
buildActionMask = 2147483647;
275+
files = (
276+
);
277+
inputFileListPaths = (
278+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
279+
);
280+
name = "[CP] Copy Pods Resources";
281+
outputFileListPaths = (
282+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
283+
);
284+
runOnlyForDeploymentPostprocessing = 0;
285+
shellPath = /bin/sh;
286+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
287+
showEnvVarsInLog = 0;
288+
};
225289
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
226290
isa = PBXShellScriptBuildPhase;
227291
alwaysOutOfDate = 1;
@@ -253,6 +317,50 @@
253317
shellPath = /bin/sh;
254318
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
255319
};
320+
DC21CCCA15BD9223F44BF528 /* [CP] Check Pods Manifest.lock */ = {
321+
isa = PBXShellScriptBuildPhase;
322+
buildActionMask = 2147483647;
323+
files = (
324+
);
325+
inputFileListPaths = (
326+
);
327+
inputPaths = (
328+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
329+
"${PODS_ROOT}/Manifest.lock",
330+
);
331+
name = "[CP] Check Pods Manifest.lock";
332+
outputFileListPaths = (
333+
);
334+
outputPaths = (
335+
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
336+
);
337+
runOnlyForDeploymentPostprocessing = 0;
338+
shellPath = /bin/sh;
339+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
340+
showEnvVarsInLog = 0;
341+
};
342+
DD496E7827A31159F1F69860 /* [CP] Check Pods Manifest.lock */ = {
343+
isa = PBXShellScriptBuildPhase;
344+
buildActionMask = 2147483647;
345+
files = (
346+
);
347+
inputFileListPaths = (
348+
);
349+
inputPaths = (
350+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
351+
"${PODS_ROOT}/Manifest.lock",
352+
);
353+
name = "[CP] Check Pods Manifest.lock";
354+
outputFileListPaths = (
355+
);
356+
outputPaths = (
357+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
358+
);
359+
runOnlyForDeploymentPostprocessing = 0;
360+
shellPath = /bin/sh;
361+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
362+
showEnvVarsInLog = 0;
363+
};
256364
/* End PBXShellScriptBuildPhase section */
257365

258366
/* Begin PBXSourcesBuildPhase section */
@@ -379,6 +487,7 @@
379487
};
380488
331C8088294A63A400263BE5 /* Debug */ = {
381489
isa = XCBuildConfiguration;
490+
baseConfigurationReference = 3B5C5141498770A8AAD787CE /* Pods-RunnerTests.debug.xcconfig */;
382491
buildSettings = {
383492
BUNDLE_LOADER = "$(TEST_HOST)";
384493
CODE_SIGN_STYLE = Automatic;
@@ -396,6 +505,7 @@
396505
};
397506
331C8089294A63A400263BE5 /* Release */ = {
398507
isa = XCBuildConfiguration;
508+
baseConfigurationReference = 3578B4A11D7A13B0C0C33880 /* Pods-RunnerTests.release.xcconfig */;
399509
buildSettings = {
400510
BUNDLE_LOADER = "$(TEST_HOST)";
401511
CODE_SIGN_STYLE = Automatic;
@@ -411,6 +521,7 @@
411521
};
412522
331C808A294A63A400263BE5 /* Profile */ = {
413523
isa = XCBuildConfiguration;
524+
baseConfigurationReference = 150F41D93EA1EE707B6893C2 /* Pods-RunnerTests.profile.xcconfig */;
414525
buildSettings = {
415526
BUNDLE_LOADER = "$(TEST_HOST)";
416527
CODE_SIGN_STYLE = Automatic;

packages/movesense_plus/example/ios/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/movesense_plus/example/lib/main.dart

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@ class MovesenseHomePage extends StatefulWidget {
2323
}
2424

2525
class MovesenseHomePageState extends State<MovesenseHomePage> {
26+
// Test Movesense device address:
27+
// Name: Movesense 233830000816
28+
// Android : 0C:8C:DC:1B:23:BF
29+
// iOS : 89BD8BF8-C9E7-0395-3B1D-119082516DDE
30+
2631
// Replace with your Movesense device address.
27-
final MovesenseDevice device = MovesenseDevice(address: '0C:8C:DC:1B:23:BF');
32+
// final MovesenseDevice device = MovesenseDevice(address: '0C:8C:DC:1B:23:BF');
33+
final MovesenseDevice device = MovesenseDevice(
34+
address: '89BD8BF8-C9E7-0395-3B1D-119082516DDE',
35+
);
2836
bool isSampling = false;
2937
StreamSubscription<MovesenseHR>? hrSubscription;
3038
StreamSubscription<MovesenseState>? stateSubscription;
@@ -33,6 +41,11 @@ class MovesenseHomePageState extends State<MovesenseHomePage> {
3341
void initState() {
3442
super.initState();
3543
requestPermissions();
44+
45+
// Movesense().scan();
46+
// Movesense().devices.listen((device) {
47+
// debugPrint('>> Device: ${device.address} - ${device.name}');
48+
// });
3649
}
3750

3851
Future<void> requestPermissions() async {

0 commit comments

Comments
 (0)