-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vadzim Filipovich
committed
May 8, 2024
1 parent
391764e
commit 8aad3f9
Showing
16 changed files
with
145 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#import "RNNEventEmitter.h" | ||
|
||
@interface RNNBridgeEventEmitter : RNNEventEmitter | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#import "RNNBridgeEventEmitter.h" | ||
|
||
@implementation RNNBridgeEventEmitter {} | ||
|
||
RCT_EXPORT_MODULE() | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifdef RCT_NEW_ARCH_ENABLED | ||
#import "RNNEventEmitter.h" | ||
#import <rnnavigation/rnnavigation.h> | ||
|
||
@class RCTHost; | ||
|
||
@interface RNNTurboEventEmitter : RNNEventEmitter <NativeRNNTurboEventEmitterSpec> | ||
|
||
- (void)setHost:(RCTHost *)host; | ||
|
||
@property(nonatomic, strong, readonly) RCTHost *host; | ||
|
||
@end | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifdef RCT_NEW_ARCH_ENABLED | ||
#import "RNNTurboEventEmitter.h" | ||
|
||
@implementation RNNTurboEventEmitter {} | ||
|
||
RCT_EXPORT_MODULE() | ||
|
||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule: | ||
(const facebook::react::ObjCTurboModule::InitParams &)params | ||
{ | ||
return std::make_shared<facebook::react::NativeRNNTurboEventEmitterSpecJSI>(params); | ||
} | ||
|
||
- (void)setHost:(RCTHost *)host { | ||
if (_host != nil) { | ||
return; | ||
} | ||
_host = host; | ||
} | ||
|
||
@end | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
lib/ios/ViewControllers/Navigation/Delegates/StackControllerDelegate.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { TurboModule, TurboModuleRegistry, NativeModules, NativeModule } from "react-native"; | ||
|
||
export interface Spec extends TurboModule { | ||
addListener: (eventType: string) => void; | ||
removeListeners: (count: number) => void; | ||
} | ||
|
||
let eventEmitter: Spec | null = null; | ||
|
||
try { | ||
// Running in bridge mode | ||
eventEmitter = NativeModules.RNNBridgeEventEmitter; | ||
} catch (e) { | ||
// Running in bridgeless, access to NativeModules is prohibited | ||
eventEmitter = TurboModuleRegistry.get<Spec>("RNNTurboEventEmitter"); | ||
} | ||
|
||
export default eventEmitter as NativeModule; |
Oops, something went wrong.