#import "SHRMWebViewEngine.h"
SHRMWebViewEngine *jsBridge = [[SHRMWebViewEngine alloc] init];
jsBridge.delegate = self;
[jsBridge bindBridgeWithWebView:self.webView];
@interface SHRMFetchPlugin : NSObject
- (void)nativeFentch:(SHRMMsgCommand *)command;
@end
#import "SHRMFetchPlugin.h"
@SHRMRegisterWebPlugin(SHRMFetchPlugin, 0)
@implementation SHRMFetchPlugin
- (void)nativeFentch:(SHRMMsgCommand *)command {
NSString *method = [command argumentAtIndex:0];
NSString *url = [command argumentAtIndex:1];
NSString *param = [command argumentAtIndex:2];
NSLog(@"(%@):%@,%@,%@",command.callbackId, method, url, param);
[command.delegate sendPluginResult:@"fetch success" callbackId:command.callbackId];
}
@end