❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:38:13:
use of undeclared identifier 'pedometerData'
if (pedometerData) {
^
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:39:19:
no visible @interface for 'RNStepCounter' declares the selector 'sendEventWithName:body:'
예제 앱이 아닌 별도의 앱을 빌드해서 임포트를 시도했었는데, 해당 앱 iOS 코드의 일부만 Objective-C++ 파일로 만들어져 있었지만, 그런 식으로 사용할 수 있는 것이 아니라는 것을 알게 되어, iOS 애플리케이션 폴더 내의 모든 Objective-C(.m) 파일의 이름을 Objective-C++(.mm)으로 변경했다. (Objective-C++의 문법은 Objective-C의 확장.) 아마도 @AndrewDongminYoo/walking_tracker 별도의 앱에서 이 라이브러리를 임포트해서 사용하려고 하는 과정에서, 마이그레이션해야 할 부분들 중 일부를 놓친 것 같다. - 리액트 네이티브 애플리케이션 iOS 변경사항 셋업 직전 커밋에서 이 부분에 대한 문서를 추가했다.
Flipper, Hermes, JSC 등 Expo 애플리케이션만 만들어봤을 때는 생소하게 느꼈던 개념들이 머릿속에 정리가 안되어 설정들이 충돌한 부분들이 있었다. 이 부분 역시 해결했고(NO_FLIPPER, NO_HERMES 등의 환경 변수 문제였어서 관련 커밋은 없다.)
Expected Behavior
Actual Behavior
Error Log looks like...
❌. @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:45:48: expected a type
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:17:30: use of undeclared identifier 'CMPedometer'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:28:11: property 'pedometer' not found on object of type 'RNStepCounter *'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:30:50: type-id cannot have a name
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:30:66: expected ')'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:30:48: C++ requires a type specifier for all declarations
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:31:53: use of undeclared identifier 'pedometerData'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:36:11: property 'pedometer' not found on object of type 'RNStepCounter *'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:37:53: type-id cannot have a name
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:37:69: expected ')'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:37:51: C++ requires a type specifier for all declarations
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:38:13: use of undeclared identifier 'pedometerData'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:39:19: no visible @interface for 'RNStepCounter' declares the selector 'sendEventWithName:body:'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:55:54: property 'startDate' not found on object of type '__strong id'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:56:52: property 'endDate' not found on object of type '__strong id'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:57:24: property 'numberOfSteps' not found on object of type '__strong id'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:58:27: property 'distance' not found on object of type '__strong id'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:60:33: property 'floorsAscended' not found on object of type '__strong id'
❌ @dongminyu/react-native-step-counter/ios/RNStepCounter.mm:61:34: property 'floorsDescended' not found on object of type '__strong id'
Steps to Reproduce the Problem
npx react-native run-ios --configuration Release
Specifications