Skip to content

Commit

Permalink
perf(iOS): ⚡️ issue with the RCTCallableJSModule solved
Browse files Browse the repository at this point in the history
such a Big Troubles with the
`RCTCallableJSModule` property of the
iOS `RCTEventEmitter` protocol have
been resolved. Issue will be updated soon!

[BLOCKING] Undefined symbol: _OBJC_CLASS_$_FlipperClient #2
  • Loading branch information
AndrewDongminYoo committed Mar 6, 2023
1 parent 8d8d864 commit eecdfd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ PODS:
- React-perflogger (= 0.71.3)
- RNPermissions (3.7.3):
- React-Core
- RNStepCounter (0.1.5):
- RNStepCounter (0.1.6):
- React-Core
- SocketRocket (0.6.0)
- Yoga (1.14.0)
Expand Down Expand Up @@ -625,7 +625,7 @@ SPEC CHECKSUMS:
React-runtimeexecutor: 7bf0dafc7b727d93c8cb94eb00a9d3753c446c3e
ReactCommon: 6f65ea5b7d84deb9e386f670dd11ce499ded7b40
RNPermissions: 3464be85b6aa90ef30745d46b5d61ac4e95a8df3
RNStepCounter: 2c34cbae9e04db671034942672203a69c7e562a9
RNStepCounter: 07be89203cd490a82063141fb69933ea012cc23b
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
Yoga: 5ed1699acbba8863755998a4245daa200ff3817b
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
Expand Down
1 change: 0 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"permissions": "react-native setup-ios-permissions",
"pods:fix": "(cd ios && pod install)",
"pods": "pod-install --quiet",
"postinstall": "(yarn permissions && yarn pods)",
"poststart": "watchman watch-del \"$PWD\" ; watchman watch-project \"$PWD\"",
"preandroid": "(cd android && ./gradlew clean && ./gradlew installDebug)",
"start": "react-native start"
Expand Down
15 changes: 3 additions & 12 deletions ios/RNStepCounter.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ + (BOOL)requiresMainQueueSetup {
}

@synthesize bridge = _bridge;
@synthesize callableJSModules = _callableJSModules;

RCT_EXPORT_MODULE();

- (NSArray<NSString *> *)supportedEvents {
return @[@"StepCounter.stepCounterUpdate", @"StepCounter.stepDetected"];
return @[@"StepCounter.stepCounterUpdate"];
}

RCT_EXPORT_METHOD(isStepCountingSupported:(RCTPromiseResolveBlock)resolve
Expand Down Expand Up @@ -55,18 +54,10 @@ + (BOOL)requiresMainQueueSetup {
}

- (NSDictionary *)dictionaryFromPedometerData:(CMPedometerData *)data {
static NSDateFormatter *formatter;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ";
formatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
formatter.timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
});
return @{
@"counterType": @"CMPedometer",
@"startDate": [formatter stringFromDate:data.startDate]?:[NSNull null],
@"endDate": [formatter stringFromDate:data.endDate]?:[NSNull null],
@"startDate": data.startDate?:[NSNull null],
@"endDate": data.endDate?:[NSNull null],
@"steps": data.numberOfSteps?:[NSNull null],
@"distance": data.distance?:[NSNull null],
@"floorsAscended": data.floorsAscended?:[NSNull null],
Expand Down

0 comments on commit eecdfd2

Please sign in to comment.