Skip to content
Permalink
Browse files
Merge pull request #401 from GEDYSIntraWare/bridge
Move bridge creation to injectDeferredObject
  • Loading branch information
dpa99c committed Sep 24, 2019
2 parents ba345b0 + e3db974 commit 80feff6cf8e3def9bdd388e56d6cb2dbb44a2d2c
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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];
@@ -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];

0 comments on commit 80feff6

Please sign in to comment.