Skip to content

Commit 88ebec9

Browse files
rachellangfbfacebook-github-bot
authored andcommitted
6/n Boilerplate C++-only TurboModule iOS
Summary: C++-only TurboModules, not to be confused with [TurboModules](https://www.internalfb.com/intern/wiki/React_Native/Building_Product_Experiences/Intro_to_Native_Modules/), directly allows you to call C++ from JS instead of going through the native layer. Referred to modification of C++-only TurboModule D30158226 and https://fburl.com/code/rcf73a42 for C++ to JS call (jsInvoker is an object that can schedule work on the JavaScript thread) This example shows JS to C++ call and storing a JS function in C++ to call later. Notes: * To use the module, import the C++ module directly in objc. * Meanwhile, create a js spec and use it in RN code. Spec methods don't need to be marked as optional. * C++ and js spec will be linked when built Reviewed By: RSNara Differential Revision: D32080496 fbshipit-source-id: 9c214ca22c18f793d5f8b54997d129bdfa73e61a
1 parent e918362 commit 88ebec9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

BUCK

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ rn_xplat_cxx_library2(
409409
"//xplat/js/react-native-github/ReactCommon/react/nativemodule/core:",
410410
"//xplat/js/react-native-github/ReactCommon/react/nativemodule/samples:",
411411
"//xplat/js/react-native-github/packages/rn-tester:",
412+
"//xplat/rtc/manul/...",
412413
],
413414
deps = [
414415
YOGA_CXX_TARGET,

0 commit comments

Comments
 (0)