Skip to content

Commit

Permalink
docs(doc): ๐Ÿ“ changed contribute, license details
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDongminYoo committed Oct 14, 2023
1 parent e60c683 commit 7fbf7b7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 30 deletions.
25 changes: 17 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,28 @@ We want this community to be friendly and respectful to each other. Please follo

## Development workflow

This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:

- The library package in the root directory.
- An example app in the `example/` directory.

To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:

```sh
yarn
```

> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.

It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.

If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/StepCounterExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-step-counter`.

While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-step-counter` under `Android`.

You can use various commands from the root directory to work with the project.

To start the packager:

Expand Down Expand Up @@ -45,7 +58,7 @@ By default, the example is configured to build with the old architecture. To run
2. For iOS, run:

```sh
RCT_NEW_ARCH_ENABLED=1 yarn example pods
RCT_NEW_ARCH_ENABLED=1 yarn pod-install example/ios
yarn example ios
```

Expand Down Expand Up @@ -82,10 +95,6 @@ Remember to add tests for your change if possible. Run the unit tests by:
yarn test
```

To edit the Objective-C or Swift files, open `example/ios/StepCounterExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-step-counter`.

To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-step-counter` under `Android`.

### Commit message convention

We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
Expand Down Expand Up @@ -121,7 +130,7 @@ yarn release

The `package.json` file contains various scripts for common tasks:

- `yarn bootstrap`: setup project by installing all dependencies and pods.
- `yarn`: setup project by installing dependencies and pods - run with `POD_INSTALL=0` to skip installing pods.
- `yarn typecheck`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2023 Dongmin,Yoo
Copyright (c) 2023 Dongmin, Yu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
34 changes: 17 additions & 17 deletions README.kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@

English-speaking developers, please return to the repository main page or click [the following link](README.md)

์‚ฌ์šฉ์ž๊ฐ€ ์ผ์ •์‹œ๊ฐ„ ๊ฑธ์€ ๊ฑธ์Œ ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ ๊ฐ„๋‹จํ•œ ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ๋ชจ๋“ˆ์ž…๋‹ˆ๋‹ค. ์ด ํŒจํ‚ค์ง€๋Š” Android์˜ `StepCounter`(๋˜๋Š” ๊ฐ€์†๋„๊ณ„ ๊ธฐ๋ฐ˜ ์ž์ฒด ๋งŒ๋ณด๊ณ„ ์„ผ์„œ) ์„ผ์„œ `API`์™€ iOS์˜ `Core Motion` ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Šคํ…์„ ์นด์šดํŠธํ•ฉ๋‹ˆ๋‹ค. ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ์˜ ์ƒˆ๋กœ์šด ๋ชจ๋“ˆ ๊ฐœ๋ฐœ ์•„ํ‚คํ…์ฒ˜์ธ ํ„ฐ๋ณด ๋ชจ๋“ˆ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ƒˆ๋กœ์šด ์•„ํ‚คํ…์ฒ˜์™€ ๋ ˆ๊ฑฐ์‹œ ์•„ํ‚คํ…์ฒ˜ ๋‘˜๋‹ค ํ˜ธํ™˜๋˜๋„๋ก ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. (ํ„ฐ๋ณด ๋ชจ๋“ˆ๊ณผ ํŒจ๋ธŒ๋ฆญ ์ปดํฌ๋„ŒํŠธ ๋ชจ๋‘ ์•„์ง ์‹คํ—˜ ๋‹จ๊ณ„์— ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ณดํŽธ์ ์œผ๋กœ ์‚ฌ์šฉ๋˜์ง€๋Š” ์•Š๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.)
์‚ฌ์šฉ์ž๊ฐ€ ์ผ์ •์‹œ๊ฐ„ ๊ฑธ์€ ๊ฑธ์Œ ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ ๊ฐ„๋‹จํ•œ ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ๋ชจ๋“ˆ์ž…๋‹ˆ๋‹ค. ์ด ํŒจํ‚ค์ง€๋Š” Android์˜ `StepCounter`(๋˜๋Š” ๊ฐ€์†๋„๊ณ„ ๊ธฐ๋ฐ˜ ์ž์ฒด ๋งŒ๋ณด๊ณ„ ์„ผ์„œ) ์„ผ์„œ `API`์™€ iOS์˜ `Core Motion` ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Šคํ…์„ ์นด์šดํŠธํ•ฉ๋‹ˆ๋‹ค. ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ์˜ ์ƒˆ๋กœ์šด ๋ชจ๋“ˆ ๊ฐœ๋ฐœ ์•„ํ‚คํ…์ฒ˜์ธ ํ„ฐ๋ณด ๋ชจ๋“ˆ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ƒˆ๋กœ์šด ์•„ํ‚คํ…์ฒ˜์™€ ๋ ˆ๊ฑฐ์‹œ ์•„ํ‚คํ…์ฒ˜ ๋‘˜๋‹ค ํ˜ธํ™˜๋˜๋„๋ก ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. (ํ„ฐ๋ณด ๋ชจ๋“ˆ๊ณผ ํŒจ๋ธŒ๋ฆญ ์ปดํฌ๋„ŒํŠธ ๋ชจ๋‘ ์•„์ง ์‹คํ—˜ ๋‹จ๊ณ„์— ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ณดํŽธ์ ์œผ๋กœ ์‚ฌ์šฉ๋˜์ง€๋Š” ์•Š๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.)

## ์„ค์น˜ ๋ฐฉ๋ฒ•

```shell
```shell
# npm์„ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด, (๊ธฐ๋ณธ ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €์ž…๋‹ˆ๋‹ค.)
npm install @dongminyu/react-native-step-counter
npm install react-native-step-counter
```

```shell
```shell
# Yarn์„ ์„ ํ˜ธํ•œ๋‹ค๋ฉด, (๋ณ‘๋ ฌ ์„ค์น˜๋ฅผ ์ง€์›ํ•ด ๋น ๋ฅธ ์†๋„๋ฅผ ์ œ๊ณตํ•˜๋Š” ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €์ž…๋‹ˆ๋‹ค.)
yarn add @dongminyu/react-native-step-counter
yarn add react-native-step-counter
```

```shell
```shell
# pnpm์„ ์„ ํ˜ธํ•œ๋‹ค๋ฉด, (๊ธ€๋กœ๋ฒŒ ํŒจํ‚ค์ง€์™€ ํ•˜๋“œ๋งํฌ๋กœ ๋น ๋ฅธ ์†๋„๋ฅผ ์ œ๊ณตํ•˜๋Š” ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €์ž…๋‹ˆ๋‹ค.)
pnpm add @dongminyu/react-native-step-counter
pnpm add react-native-step-counter
```

๋ฆฌ์•กํŠธ๋„ค์ดํ‹ฐ๋ธŒ 0.60 ๋ฒ„์ „ ์ดํ›„ ์„ค์น˜๋œ ๋„ค์ดํ‹ฐ๋ธŒ ๋ชจ๋“ˆ์€ ์˜คํ†  ๋งํฌ๋ฉ๋‹ˆ๋‹ค. ๋„ค์ดํ‹ฐ๋ธŒ ๋ชจ๋“ˆ์„ ์ˆ˜๋™์œผ๋กœ ์—ฐ๊ฒฐํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.
๋ฆฌ์•กํŠธ๋„ค์ดํ‹ฐ๋ธŒ 0.60 ๋ฒ„์ „ ์ดํ›„ ์„ค์น˜๋œ ๋„ค์ดํ‹ฐ๋ธŒ ๋ชจ๋“ˆ์€ ์˜คํ†  ๋งํฌ๋ฉ๋‹ˆ๋‹ค. ๋„ค์ดํ‹ฐ๋ธŒ ๋ชจ๋“ˆ์„ ์ˆ˜๋™์œผ๋กœ ์—ฐ๊ฒฐํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

๐Ÿ‘ฃ ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ์˜ ์ƒˆ๋กœ์šด ์•„ํ‚คํ…์ณ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์›ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ ์•„๋ž˜ ๊ฐ€์ด๋“œ๋ฅผ ๋”ฐ๋ผ์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฏธ New Architecture๋ฅผ ํ™œ์„ฑํ™”ํ•˜๊ณ  ์‚ฌ์ „์„ค์ •์„ ๋งˆ์นœ ์ƒํƒœ๋ผ๋ฉด, [๋‹ค์Œ ๋‹จ๊ณ„](#android)๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค.
๐Ÿ‘ฃ ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ์˜ ์ƒˆ๋กœ์šด ์•„ํ‚คํ…์ณ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์›ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ ์•„๋ž˜ ๊ฐ€์ด๋“œ๋ฅผ ๋”ฐ๋ผ์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฏธ New Architecture๋ฅผ ํ™œ์„ฑํ™”ํ•˜๊ณ  ์‚ฌ์ „์„ค์ •์„ ๋งˆ์นœ ์ƒํƒœ๋ผ๋ฉด, [๋‹ค์Œ ๋‹จ๊ณ„](#android)๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค.

## ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์˜์กด์„ฑ์— ์ถ”๊ฐ€ํ•˜๊ธฐ ์ „ ์‚ฌ์ „์„ธํŒ…

- ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ณตํ†ต ๋ณ€๊ฒฝ์‚ฌํ•ญ ์…‹์—…

1. React Native๋Š” [`0.68.0`](https://reactnative.dev/blog/2022/03/30/version-068#opting-in-to-the-new-architecture) ๋ฒ„์ „ ๋ฆด๋ฆฌ์Šค์™€ ํ•จ๊ป˜ ์ƒˆ ์•„ํ‚คํ…์ฒ˜๋ฅผ ๋””ํดํŠธ๋กœ ์„ ์–ธํ–ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด ๋ฒ„์ „ ์ดํ•˜์˜ ๋ฆฌ์•กํŠธ๋„ค์ดํ‹ฐ๋ธŒ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์˜์กดํ•˜๊ณ  ์žˆ๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ์—…๋ฐ์ดํŠธํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์•ˆ๋“œ๋กœ์ด๋“œ๋Š” 0.71.0 ์ด์ƒ์œผ๋กœ ์—…๋ฐ์ดํŠธํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
2. ๋Œ€๋ถ€๋ถ„์˜ ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ๋ฌธ์„œ์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์ด ๋ฌธ์„œ๋Š” ์ตœ์‹  ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ [๋ฆด๋ฆฌ์ฆˆ](https://github.com/facebook/react-native/releases/latest) ๋ฒ„์ „์„ ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์ „์ œ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
3. ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ์— ์–ด๋ ค์›€์„ ๊ฒช๊ณ  ์žˆ๋‹ค๋ฉด ๋‹ค์Œ ํŽ˜์ด์ง€๋ฅผ ์ฐธ๊ณ ํ•˜์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค. [์ƒˆ๋กœ์šด ๋ฒ„์ „์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œ](https://reactnative.dev/docs/upgrading).
4. ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ์ฝ”๋“œ์  (๋„ค์ดํ‹ฐ๋ธŒ ์ฝ”๋“œ ์ƒ์„ฑ ๋ณ€ํ™˜ ๋ชจ๋“ˆ)์€ ๋ชจํ˜ธํ•œ ํƒ€์ž…๊ณผ ๋‹ค์ด๋‚˜๋ฏนํ•œ ํƒ€์ž…์„ ์ง€์›ํ•ด์ฃผ์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์—, ๋ชจ๋“  ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ธŒ๋ฆฟ์ง€ ํŒŒ์ผ๋“ค์€ [TypeScript](https://www.typescriptlang.org/) ๋˜๋Š” [Flow.js](https://flow.org/)๋กœ ์ž‘์„ฑ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. (์ฝ”๋“œ ์ œ๋„ˆ๋ ˆ์ดํ„ฐ์— ์ž…๋ ฅ๋˜์ง€ ์•Š๋Š” ์ฝ”๋“œ๋“ค์€ ํƒ€์ž… ์„ธ์ดํ”„ํ•˜์ง€ ์•Š์•„๋„ ๋ฌด๊ด€ํ•˜์ง€๋งŒ, ์ตœ์‹ ์˜ ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ๋””ํดํŠธ ๋žญ๊ท€์ง€๋กœ ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์„ ํƒ๋œ ์ ์„ ๊ณ ๋ คํ•˜์„ธ์š”.)
3. ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ์— ์–ด๋ ค์›€์„ ๊ฒช๊ณ  ์žˆ๋‹ค๋ฉด ๋‹ค์Œ ํŽ˜์ด์ง€๋ฅผ ์ฐธ๊ณ ํ•˜์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค. [์ƒˆ๋กœ์šด ๋ฒ„์ „์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œ](https://reactnative.dev/docs/upgrading).
4. ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ์ฝ”๋“œ์  (๋„ค์ดํ‹ฐ๋ธŒ ์ฝ”๋“œ ์ƒ์„ฑ ๋ณ€ํ™˜ ๋ชจ๋“ˆ)์€ ๋ชจํ˜ธํ•œ ํƒ€์ž…๊ณผ ๋‹ค์ด๋‚˜๋ฏนํ•œ ํƒ€์ž…์„ ์ง€์›ํ•ด์ฃผ์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์—, ๋ชจ๋“  ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ธŒ๋ฆฟ์ง€ ํŒŒ์ผ๋“ค์€ [TypeScript](https://www.typescriptlang.org/) ๋˜๋Š” [Flow.js](https://flow.org/)๋กœ ์ž‘์„ฑ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. (์ฝ”๋“œ ์ œ๋„ˆ๋ ˆ์ดํ„ฐ์— ์ž…๋ ฅ๋˜์ง€ ์•Š๋Š” ์ฝ”๋“œ๋“ค์€ ํƒ€์ž… ์„ธ์ดํ”„ํ•˜์ง€ ์•Š์•„๋„ ๋ฌด๊ด€ํ•˜์ง€๋งŒ, ์ตœ์‹ ์˜ ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ๋””ํดํŠธ ๋žญ๊ท€์ง€๋กœ ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์„ ํƒ๋œ ์ ์„ ๊ณ ๋ คํ•˜์„ธ์š”.)
5. ํ—ค๋ฅด๋ฉ”์Šค ์—”์ง„๊ณผ ํ”Œ๋ฆฌํผ ๋””๋ฒ„๊น… ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
- [Hermes](https://reactnative.dev/docs/hermes)๋Š” Android ๋ฐ iOS์—์„œ React Native ์•ฑ์„ ์‹คํ–‰ํ•˜๋„๋ก ์ตœ์ ํ™”๋œ ์ƒˆ๋กœ์šด JavaScript ์—”์ง„์ž…๋‹ˆ๋‹ค. ์ตœ์‹  ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ๋ฒ„์ „์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ํ™œ์„ฑํ™”๋˜์–ด ์žˆ์œผ๋ฉฐ, ๊ธฐ์กด์˜ JSC๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋ช…์‹œ์ ์œผ๋กœ ๋น„ํ™œ์„ฑํ™” ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. ์ ์€ ๋ฆฌ์†Œ์Šค์™€ ๋น ๋ฅธ ์†๋„ ํผํฌ๋จผ์Šค๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ํ—ค๋ฅด๋ฉ”์Šค๊ฐ€ ๊ฐ•ํ•˜์ง€๋งŒ, ๋””๋ฒ„๊ทธ ๋ชจ๋“œ์—์„œ JSC๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ๋” ๊ฐ„ํŽธํ•œ ๋ฉด๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
- [Flipper](https://fbflipper.com/)๋Š” ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ์˜ ์ƒˆ๋กœ์šด ๋””๋ฒ„๊น… ๋ฐ ํ”„๋กœํŒŒ์ผ๋ง ๋„๊ตฌ์ž…๋‹ˆ๋‹ค. ํ—ค๋ฅด๋ฉ”์Šค ์—”์ง„์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ, Flipper๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ๋””๋ฒ„๊น…์—์„œ ๋ณด๋‹ค ์พŒ์ ํ•œ ๊ฐœ๋ฐœ ๊ฒฝํ—˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
Expand Down Expand Up @@ -69,7 +69,7 @@ pnpm add @dongminyu/react-native-step-counter
```

_4_. ios ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ํด๋” ๋‚ด์˜ ๋ชจ๋“  Objective-C(.m) ํŒŒ์ผ์˜ ์ด๋ฆ„์„ Objective-C++(.mm)์œผ๋กœ ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค. (Objective-C++์˜ ๋ฌธ๋ฒ•์€ Objective-C์˜ ํ™•์žฅ์ž…๋‹ˆ๋‹ค.)
_5_. ios ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ํด๋” ๋‚ด์˜ AppDelegate ํŒŒ์ผ(ํ—ค๋”ํŒŒ์ผ/์†Œ์ŠคํŒŒ์ผ)๋“ค์ด RCTAppDelegate ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•˜๋„๋ก ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.
_5_. ios ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ํด๋” ๋‚ด์˜ AppDelegate ํŒŒ์ผ(ํ—ค๋”ํŒŒ์ผ/์†Œ์ŠคํŒŒ์ผ)๋“ค์ด RCTAppDelegate ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•˜๋„๋ก ๋ณ€๊ฒฝํ•ฉ๋‹ˆ๋‹ค.

- [ios/StepCounterExample/AppDelegate.h](https://github.com/AndrewDongminYoo/react-native-step-counter/blob/main/example/ios/StepCounterExample/AppDelegate.h)

Expand Down Expand Up @@ -163,7 +163,7 @@ pnpm add @dongminyu/react-native-step-counter

- `isStepCountingSupported()`: Promise<Record<string, boolean>>: ์žฅ์น˜์— ๊ธฐ๋Šฅ ๊ด€๋ จ ์Šคํ… ์นด์šดํ„ฐ ๋˜๋Š” ๊ฐ€์†๋„๊ณ„๊ฐ€ ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๋Š” ๋ฉ”์„œ๋“œ์ž…๋‹ˆ๋‹ค.

- ์‘๋‹ต ๊ฐ์ฒด์˜ ํ‚ค `granted`์˜ Boolean ๊ฐ’์€ ์•ฑ ์‚ฌ์šฉ์ž๊ฐ€ ์ด ๊ธฐ๋Šฅ ์‚ฌ์šฉ ๊ถŒํ•œ์„ ๋ถ€์—ฌํ–ˆ๋Š”์ง€ ๊ถŒํ•œ ํ—ˆ์šฉ ์—ฌ๋ถ€์ด๋ฉฐ, `supported`๋Š” ์žฅ์น˜๊ฐ€ ์ด ๊ธฐ๋Šฅ์„ ์ง€์›ํ•˜๋Š”์ง€ ์—ฌ๋ถ€์ž…๋‹ˆ๋‹ค. ์žฅ์น˜์— ์Šคํ… ์นด์šดํ„ฐ ์„ผ์„œ๊ฐ€ ์กด์žฌํ•˜๋Š”์ง€๋งŒ์„ ์ฒดํฌํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์‹ค์ œ๋กœ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ ์ƒํƒœ์ธ์ง€๋Š” ์•Œ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
- ์‘๋‹ต ๊ฐ์ฒด์˜ ํ‚ค `granted`์˜ Boolean ๊ฐ’์€ ์•ฑ ์‚ฌ์šฉ์ž๊ฐ€ ์ด ๊ธฐ๋Šฅ ์‚ฌ์šฉ ๊ถŒํ•œ์„ ๋ถ€์—ฌํ–ˆ๋Š”์ง€ ๊ถŒํ•œ ํ—ˆ์šฉ ์—ฌ๋ถ€์ด๋ฉฐ, `supported`๋Š” ์žฅ์น˜๊ฐ€ ์ด ๊ธฐ๋Šฅ์„ ์ง€์›ํ•˜๋Š”์ง€ ์—ฌ๋ถ€์ž…๋‹ˆ๋‹ค. ์žฅ์น˜์— ์Šคํ… ์นด์šดํ„ฐ ์„ผ์„œ๊ฐ€ ์กด์žฌํ•˜๋Š”์ง€๋งŒ์„ ์ฒดํฌํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์‹ค์ œ๋กœ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ ์ƒํƒœ์ธ์ง€๋Š” ์•Œ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
- ์ด ์‘๋‹ต์˜ ์ฐธ/๊ฑฐ์ง“ ๊ฐ’๊ณผ ์‹ค์ œ ์„ผ์„œ์˜ ์ž‘๋™ ์—ฌ๋ถ€๋Š” ์ผ์น˜ํ•˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋งŒ๋ณด๊ณ„ ์„ผ์„œ๋ฅผ ์ฐพ์ง€ ๋ชปํ•˜๊ฑฐ๋‚˜ ์‚ฌ์šฉ์ž๊ฐ€ ์ ‘๊ทผ์„ ๊ฑฐ๋ถ€ํ•œ ๊ฒฝ์šฐ์—๋„, ๋ชจ๋“ˆ์€ ๋™์ž‘์„ผ์„œ ๊ถŒํ•œ ํ—ˆ์šฉ๊ณผ ๊ด€๊ณ„์—†์ด ์›์‹œ ๊ฐ€์†๋„๊ณ„์— ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ ์šฉํ•˜์—ฌ ๋ณดํ–‰ ์ด๋ฒคํŠธ ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”์ถœํ•˜๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅํ•˜์ง€๋งŒ ๊ถŒ์žฅ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž๊ฐ€ ์ฝ๊ธฐ ๊ถŒํ•œ์„ ๊ฑฐ๋ถ€ํ•  ๊ฒฝ์šฐ ์„ผ์„œ ์ด๋ฒคํŠธ ์ถ”์ ์„ ์ค‘์ง€ํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ๋ฐ˜๋“œ์‹œ ์ž‘์„ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

- `startStepCounterUpdate(start: Date, callBack: StepCountUpdateCallback)`: EmitterSubscription:
Expand Down Expand Up @@ -196,7 +196,7 @@ pnpm add @dongminyu/react-native-step-counter

## Usage

๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ์•ฑ์—์„œ ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‹ค์ œ๋กœ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ฅด์„ธ์š”.:
๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ์•ฑ์—์„œ ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‹ค์ œ๋กœ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ฅด์„ธ์š”.:

๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ์•ฑ์œผ๋กœ ์ž„ํฌํŠธํ•ฉ๋‹ˆ๋‹ค.

Expand All @@ -207,7 +207,7 @@ import {
parseStepData,
startStepCounterUpdate,
stopStepCounterUpdate,
} from '@dongminyu/react-native-step-counter';
} from 'react-native-step-counter';
```

`isStepCountingSupported` ๋ฉ”์†Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์žฅ์น˜์— ์Šคํ… ์นด์šดํ„ฐ ๋˜๋Š” ๊ฐ€์†๋„๊ณ„ ์„ผ์„œ๊ฐ€ ์žˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
Expand Down Expand Up @@ -238,9 +238,9 @@ async function startStepCounter() {
}
```

๋‹ค์Œ์€ `NativeStepCounter`๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค.
๋‹ค์Œ์€ `NativeStepCounter`๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค.

์˜ˆ์ œ ์•ฑ ์ฝ”๋“œ ๋ณด๊ธฐ: [๋งํฌ](https://github.com/AndrewDongminYoo/react-native-step-counter/blob/main/example/src/App.tsx)
์˜ˆ์ œ ์•ฑ ์ฝ”๋“œ ๋ณด๊ธฐ: [๋งํฌ](https://github.com/AndrewDongminYoo/react-native-step-counter/blob/main/example/src/App.tsx)

## Change Log

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ This library provides an interface for tracking the number of steps taken by the

```shell
# if you use pure npm (what a classic!),
npm install @dongminyu/react-native-step-counter
npm install react-native-step-counter
```

```shell
# or if you prefer to use Yarn (I love it's parallel install feature),
yarn add @dongminyu/react-native-step-counter
yarn add react-native-step-counter
```

```shell
# or if you use pnpm (it's fast and efficient),
pnpm add @dongminyu/react-native-step-counter
pnpm add react-native-step-counter
```

Native modules will automatically connect after React Native 0.60 version. So you don't need to link the native modules manually.
Expand Down Expand Up @@ -207,7 +207,7 @@ import {
parseStepData,
startStepCounterUpdate,
stopStepCounterUpdate,
} from '@dongminyu/react-native-step-counter';
} from 'react-native-step-counter';
```

Use the `isStepCountingSupported` method to check if the device has a step counter or accelerometer sensor.
Expand Down

0 comments on commit 7fbf7b7

Please sign in to comment.