Skip to content

Commit

Permalink
Enable Plugin support for (RCT)SampleTurboModule (facebook#44641)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#44641

Changelog: [iOS][Fixed] Enable Plugin support for (RCT)SampleTurboModule

Reviewed By: javache

Differential Revision: D57625901

fbshipit-source-id: fe57777970b3b342be77ea9bb4e8e3f95d66471a
  • Loading branch information
christophpurrer authored and kosmydel committed Jun 11, 2024
1 parent aca2cf0 commit b5e2967
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#import "RCTSampleTurboModule.h"
#import "RCTSampleTurboModulePlugin.h"

#import <React/RCTAssert.h>
#import <React/RCTUtils.h>
Expand Down Expand Up @@ -193,3 +194,8 @@ - (NSDictionary *)constantsToExport
}

@end

Class _Nonnull RCTSampleTurboModuleCls(void)
{
return RCTSampleTurboModule.class;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated by an internal plugin build system
*/

#ifdef RN_DISABLE_OSS_PLUGIN_HEADER

// FB Internal: Plugins.h is autogenerated by the build system.
#import "Plugins.h"

#else

// OSS-compatibility layer

#import <Foundation/Foundation.h>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"

#ifdef __cplusplus
extern "C" {
#endif

// RCTTurboModuleManagerDelegate should call this to resolve module classes.
Class _Nonnull RCTSampleTurboModuleCls(void);

#ifdef __cplusplus
}
#endif

#pragma GCC diagnostic pop

#endif // RN_DISABLE_OSS_PLUGIN_HEADER

0 comments on commit b5e2967

Please sign in to comment.