Skip to content

Commit 0edbfe6

Browse files
author
Hugo Schouman
committed
fix bundle for iOS 9 frameworks
1 parent 17fcf7a commit 0edbfe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WebViewJavascriptBridge/WebViewJavascriptBridgeBase.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ - (void)flushMessageQueue:(NSString *)messageQueueString{
116116

117117
- (void)injectJavascriptFile:(BOOL)shouldInject {
118118
if(shouldInject){
119-
NSBundle *bundle = _resourceBundle ? _resourceBundle : [NSBundle mainBundle];
119+
NSBundle *bundle = _resourceBundle ? _resourceBundle : [NSBundle bundleForClass:[self class]];
120120
NSString *filePath = [bundle pathForResource:@"WebViewJavascriptBridge.js" ofType:@"txt"];
121121
NSString *js = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
122122
[self _evaluateJavascript:js];

0 commit comments

Comments
 (0)