From 0105b0c67f6b25fb39296e9ce5df7b335f052a1b Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Fri, 26 Jul 2024 18:16:46 +0200 Subject: [PATCH 1/2] fix: remove currentBridge --- package/ios/RNSkiaModule.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/ios/RNSkiaModule.mm b/package/ios/RNSkiaModule.mm index 591439f87b..1afa60eabf 100644 --- a/package/ios/RNSkiaModule.mm +++ b/package/ios/RNSkiaModule.mm @@ -9,6 +9,7 @@ @implementation RNSkiaModule { } RCT_EXPORT_MODULE() +@synthesize bridge = _bridge; #pragma Accessors @@ -34,11 +35,11 @@ - (void)invalidate { // Already initialized, ignore call. return @true; } - RCTBridge *bridge = [RCTBridge currentBridge]; + RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge; if (!jsInvoker) { - jsInvoker = bridge.jsCallInvoker; + jsInvoker = cxxBridge.jsCallInvoker; } - skiaManager = [[SkiaManager alloc] initWithBridge:bridge jsInvoker:jsInvoker]; + skiaManager = [[SkiaManager alloc] initWithBridge:cxxBridge jsInvoker:jsInvoker]; return @true; } From f730edfdd6e6ad373482732b274acab51575137e Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Wed, 31 Jul 2024 15:18:40 +0200 Subject: [PATCH 2/2] chore: format --- package/ios/RNSkiaModule.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/ios/RNSkiaModule.mm b/package/ios/RNSkiaModule.mm index 1afa60eabf..9f761befc4 100644 --- a/package/ios/RNSkiaModule.mm +++ b/package/ios/RNSkiaModule.mm @@ -39,7 +39,8 @@ - (void)invalidate { if (!jsInvoker) { jsInvoker = cxxBridge.jsCallInvoker; } - skiaManager = [[SkiaManager alloc] initWithBridge:cxxBridge jsInvoker:jsInvoker]; + skiaManager = [[SkiaManager alloc] initWithBridge:cxxBridge + jsInvoker:jsInvoker]; return @true; }