Skip to content

Commit ebc34d4

Browse files
committed
Merge pull request marcuswestin#138 from hschouman/master
fix bundle for iOS 9 frameworks
2 parents 54ea698 + 0edbfe6 commit ebc34d4

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
@@ -118,7 +118,7 @@ - (void)flushMessageQueue:(NSString *)messageQueueString{
118118

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

0 commit comments

Comments
 (0)