Skip to content

Commit

Permalink
Merge pull request apache#401 from GEDYSIntraWare/bridge
Browse files Browse the repository at this point in the history
Move bridge creation to injectDeferredObject
  • Loading branch information
dpa99c authored Sep 24, 2019
2 parents ba345b0 + e3db974 commit 80feff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ios/CDVUIInAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ -(void)createIframeBridge

- (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper
{
[self createIframeBridge];
if (jsWrapper != nil) {
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil];
NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
Expand Down Expand Up @@ -565,7 +566,6 @@ - (void)webViewDidStartLoad:(UIWebView*)theWebView

- (void)webViewDidFinishLoad:(UIWebView*)theWebView
{
[self createIframeBridge];
if (self.callbackId != nil) {
// TODO: It would be more useful to return the URL the page is actually on (e.g. if it's been redirected).
NSString* url = [self.inAppBrowserViewController.currentURL absoluteString];
Expand Down

0 comments on commit 80feff6

Please sign in to comment.