From d5c86ab032ae306547f274e6fcfbf464f64e9b1e Mon Sep 17 00:00:00 2001 From: Hans Date: Wed, 28 Aug 2024 14:55:04 +0800 Subject: [PATCH] fix: partial invalidate, fix iOS crash on reload --- ios/JsiUdp.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ios/JsiUdp.mm b/ios/JsiUdp.mm index 7c69c1a..43d7d3e 100644 --- a/ios/JsiUdp.mm +++ b/ios/JsiUdp.mm @@ -14,11 +14,12 @@ @implementation JsiUdp std::shared_ptr _manager; - (void)invalidate { - _manager.reset(); - _bridge = nil; + //NSLog(@"JsiUdp invalidate"); + _manager->invalidate(); } - (void)setBridge:(RCTBridge *)bridge { + //NSLog(@"JsiUdp setBridge"); _bridge = bridge; } @@ -36,6 +37,7 @@ void installApi( callInvoker->invokeAsync(std::move(f)); } ); + NSLog(@"JsiUdp installed"); } RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install)