AndrewDongminYoo / react-native-step-counter

[리액트 네이티브 라이브러리] 사용자의 걸음 수를 계산합니다. Android는 StepCounter (or Accelerometer) 센서 API를, iOS는 CoreMotion CMPedometer 를 사용하여 걸음 수를 측정합니다.
https://andrewdongminyoo.github.io/react-native-step-counter/
MIT License
29 stars 10 forks source link

[BLOCKING] cannot build iOS application #1

Closed AndrewDongminYoo closed 1 year ago

AndrewDongminYoo commented 1 year ago

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

  1. yarn add @dongminyu/react-native-step-counter
  2. ...
  3. npx react-native run-ios --configuration Release

Specifications

you shold use this command.

npx react-native info
AndrewDongminYoo commented 1 year ago

개선한 부분들

  1. 예제 앱이 아닌 별도의 앱을 빌드해서 임포트를 시도했었는데, 해당 앱 iOS 코드의 일부만 Objective-C++ 파일로 만들어져 있었지만, 그런 식으로 사용할 수 있는 것이 아니라는 것을 알게 되어, iOS 애플리케이션 폴더 내의 모든 Objective-C(.m) 파일의 이름을 Objective-C++(.mm)으로 변경했다. (Objective-C++의 문법은 Objective-C의 확장.) 아마도 @AndrewDongminYoo/walking_tracker 별도의 앱에서 이 라이브러리를 임포트해서 사용하려고 하는 과정에서, 마이그레이션해야 할 부분들 중 일부를 놓친 것 같다. - 리액트 네이티브 애플리케이션 iOS 변경사항 셋업 직전 커밋에서 이 부분에 대한 문서를 추가했다.
  2. Flipper, Hermes, JSC 등 Expo 애플리케이션만 만들어봤을 때는 생소하게 느꼈던 개념들이 머릿속에 정리가 안되어 설정들이 충돌한 부분들이 있었다. 이 부분 역시 해결했고(NO_FLIPPER, NO_HERMES 등의 환경 변수 문제였어서 관련 커밋은 없다.)

앱은 이제 무사히 잘 빌드되기 때문에 이 이슈는 닫는다.