Skip to content

Instantly share code, notes, and snippets.

@mactive
Last active June 23, 2016 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mactive/3cb2e2c53c3b9edf48a0793dae3c82cf to your computer and use it in GitHub Desktop.
Save mactive/3cb2e2c53c3b9edf48a0793dae3c82cf to your computer and use it in GitHub Desktop.
iOS端的注入方法 __fbBatchedBridgeConfig
// file location
// node_module/react-native/Libraries/WebSocket
- (void)executeApplicationScript:(NSData *)script sourceURL:(NSURL *)URL onComplete:(RCTJavaScriptCompleteBlock)onComplete
{
NSDictionary<NSString *, id> *message = @{
@"method": @"executeApplicationScript",
@"url": RCTNullIfNil(URL.absoluteString),
@"inject": _injectedObjects,
};
[self sendMessage:message waitForReply:^(NSError *error, NSDictionary<NSString *, id> *reply) {
onComplete(error);
}];
}
@mactive
Copy link
Author

mactive commented Jun 23, 2016

__fbbatchedbridgeconfig

@mactive
Copy link
Author

mactive commented Jun 23, 2016

console log window __fbbatchedbridgeconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment