You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-33Lines changed: 52 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,34 @@
1
-
# react-native-mcu-manager
1
+
# @playerdata/react-native-mcu-manager
2
2
3
-
MCUMgr DFU from React Native.
3
+
React Native Wrappers for MCUMgr's Android / iOS client libraries
4
4
5
-
## Getting started
5
+
# Getting started
6
+
7
+
## Installation in managed Expo projects
8
+
9
+
For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects,
10
+
we hope this will Just Work :tm:.
11
+
12
+
The example app uses Expo Prebuild, so we've some confidence, but let us know
13
+
how you get on.
14
+
15
+
## Installation in bare React Native projects
16
+
17
+
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
18
+
19
+
### Add the package to your npm dependencies
20
+
21
+
```
22
+
npm install @playerdata/react-native-mcu-manager
23
+
```
24
+
25
+
### Configure for iOS
26
+
27
+
Run `npx pod-install` after installing the npm package.
While developing, you can run the [example app](/example/) to test your changes.
60
+
Install dependencies:
40
61
41
-
To start the packager:
42
-
43
-
```sh
44
-
yarn example start
62
+
```
63
+
npm install
45
64
```
46
65
47
-
To run the example app on Android:
66
+
You should use the example app to test your changes:
48
67
49
-
```sh
50
-
yarn example android
51
68
```
69
+
cd example
52
70
53
-
To run the example app on iOS:
54
-
55
-
```sh
56
-
yarn example ios
71
+
npx expo prebuild
57
72
```
58
73
74
+
From the top level of the repo, you can use `npm run open:(ios|android)` to open
75
+
the appropriate IDE.
76
+
77
+
For Swift files, you'll find the source files at `Pods > Development Pods > ReactNativeMcuManager`
78
+
in XCode.
79
+
80
+
For Kotlin, you'll find the source files at `reactnativemcumanager` under `Android` in Android Studio.
81
+
59
82
Make sure your code passes TypeScript and ESLint. Run the following to verify:
60
83
61
84
```sh
62
-
yarn typecheck
63
-
yarn lint
85
+
npm run typecheck
86
+
npm run lint
64
87
```
65
88
66
89
To fix formatting errors, run the following:
67
90
68
91
```sh
69
-
yarn lint --fix
92
+
npm run lint --fix
70
93
```
71
94
72
-
Remember to add tests for your change if possible. Run the unit tests by:
95
+
Remember to add unit tests for your change if possible. Run the unit tests by:
73
96
74
97
```sh
75
-
yarntest
98
+
npm runtest
76
99
```
77
-
78
-
To edit the Swift files, open `example/ios/McuManagerExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-mcu-manager`.
79
-
80
-
To edit the Kotlin files, open `example/android` in Android studio and find the source files at `reactnativemcumanager` under `Android`.
0 commit comments