Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
#131 Incompatible with iOS9 Public Beta 1#127 iOS 9 without local web…
Browse files Browse the repository at this point in the history
…server.

Found an incompatibility when building with XCode 7 and running on iOS 8.4.1.
  • Loading branch information
EddyVerbruggen committed Sep 10, 2015
1 parent 9bab209 commit 780e2bc
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/ios/MyMainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,21 @@ - (void)loadURL:(NSURL*)URL
self.alreadyLoaded = true;
// /////////////////
[CDVUserAgentUtil acquireLock:^(NSInteger lockToken) {
_userAgentLockToken = lockToken;
[CDVUserAgentUtil setUserAgent:self.userAgent lockToken:lockToken];
_userAgentLockToken = lockToken;
[CDVUserAgentUtil setUserAgent:self.userAgent lockToken:lockToken];

// This is only for iOS 9 SDK
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
[self.wkWebView loadFileURL:URL allowingReadAccessToURL:URL];
#else
if (IsAtLeastiOSVersion(@"9.0")) {
[self.wkWebView loadFileURL:URL allowingReadAccessToURL:URL];
} else {
NSURLRequest* appReq = [NSURLRequest requestWithURL:URL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
[self.wkWebView loadRequest:appReq];
[self.wkWebView loadRequest:appReq];
}
#else
NSURLRequest* appReq = [NSURLRequest requestWithURL:URL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
[self.wkWebView loadRequest:appReq];
#endif

}];
}

Expand Down

0 comments on commit 780e2bc

Please sign in to comment.