We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17fcf7a commit 0edbfe6Copy full SHA for 0edbfe6
WebViewJavascriptBridge/WebViewJavascriptBridgeBase.m
@@ -116,7 +116,7 @@ - (void)flushMessageQueue:(NSString *)messageQueueString{
116
117
- (void)injectJavascriptFile:(BOOL)shouldInject {
118
if(shouldInject){
119
- NSBundle *bundle = _resourceBundle ? _resourceBundle : [NSBundle mainBundle];
+ NSBundle *bundle = _resourceBundle ? _resourceBundle : [NSBundle bundleForClass:[self class]];
120
NSString *filePath = [bundle pathForResource:@"WebViewJavascriptBridge.js" ofType:@"txt"];
121
NSString *js = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
122
[self _evaluateJavascript:js];
0 commit comments