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.
2 parents 54ea698 + 0edbfe6 commit ebc34d4Copy full SHA for ebc34d4
WebViewJavascriptBridge/WebViewJavascriptBridgeBase.m
@@ -118,7 +118,7 @@ - (void)flushMessageQueue:(NSString *)messageQueueString{
118
119
- (void)injectJavascriptFile:(BOOL)shouldInject {
120
if(shouldInject){
121
- NSBundle *bundle = _resourceBundle ? _resourceBundle : [NSBundle mainBundle];
+ NSBundle *bundle = _resourceBundle ? _resourceBundle : [NSBundle bundleForClass:[self class]];
122
NSString *filePath = [bundle pathForResource:@"WebViewJavascriptBridge.js" ofType:@"txt"];
123
NSString *js = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
124
[self _evaluateJavascript:js];
0 commit comments