Skip to content

Commit

Permalink
fix: retrieval of bridge (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
capezzbr authored Nov 2, 2024
1 parent 51aa7b7 commit a413de9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ios/QuickCryptoModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@

@implementation QuickCryptoModule

@synthesize bridge=_bridge;

RCT_EXPORT_MODULE(QuickCrypto)

- (void)setBridge:(RCTBridge *)bridge {
_bridge = bridge;
}

RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
NSLog(@"Installing JSI bindings for react-native-quick-crypto...");
RCTBridge* bridge = [RCTBridge currentBridge];
RCTCxxBridge* cxxBridge = (RCTCxxBridge*)bridge;
RCTCxxBridge* cxxBridge = (RCTCxxBridge*)_bridge;
if (cxxBridge == nil) {
return @false;
}
Expand All @@ -26,7 +31,7 @@ @implementation QuickCryptoModule
return @false;
}
auto& runtime = *jsiRuntime;
auto callInvoker = bridge.jsCallInvoker;
auto callInvoker = _bridge.jsCallInvoker;

auto workerQueue =
std::make_shared<margelo::DispatchQueue::dispatch_queue>("margelo crypto thread");
Expand Down

0 comments on commit a413de9

Please sign in to comment.