mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-10 22:47:58 +08:00
Added tests for synchronous methods in native modules on iOS
Reviewed By: javache Differential Revision: D4947631 fbshipit-source-id: d7e497c44602eb6e38896a00edb61639ab2b8cd4
This commit is contained in:
committed by
Facebook Github Bot
parent
db0c22192c
commit
971b083c6a
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridgeModule.h>
|
||||
|
||||
@interface UIExplorerTestModule : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
|
||||
@implementation UIExplorerTestModule
|
||||
|
||||
RCT_EXPORT_MODULE(UIExplorerTestModule)
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(echoString:(NSString *)input)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(methodThatReturnsNil)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user