Skip to content

Commit f0d2306

Browse files
authored
Merge pull request #16 from migueldaipre/fix/ios-working-rn0.85
Fix the iOS install method so get bridge correctly
2 parents 50b6b16 + d1c70b4 commit f0d2306

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

ios/OPS2.mm

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,21 @@
66
#import <jsi/jsi.h>
77

88
@implementation OPS2
9+
@synthesize bridge = _bridge;
910
RCT_EXPORT_MODULE()
1011

1112
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
12-
RCTBridge *bridge = [RCTBridge currentBridge];
13-
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)bridge;
13+
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)_bridge;
1414
if (cxxBridge == nil) {
1515
return @false;
1616
}
1717

18-
using namespace facebook;
19-
20-
auto jsiRuntime = (jsi::Runtime *)cxxBridge.runtime;
18+
auto jsiRuntime = (facebook::jsi::Runtime *)cxxBridge.runtime;
2119
if (jsiRuntime == nil) {
2220
return @false;
2321
}
2422
auto &runtime = *jsiRuntime;
25-
auto callInvoker = bridge.jsCallInvoker;
23+
auto callInvoker = _bridge.jsCallInvoker;
2624

2725
ops2::install(runtime, callInvoker);
2826

0 commit comments

Comments
 (0)