Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslan-bikkinin committed Oct 8, 2020
1 parent e463bdf commit b77d68c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ios/CDVViewController+CodePush.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ - (void)viewDidLoad {
Note 1: self.webViewEngine loadRequest will be failing anyway but calling [webViewShared loadRequest] will hide it for user.
Note 2: It affects only cordova-ios 6 apps
*/
if([Utilities Cordova6OrGreater]) {
if([Utilities cordova6OrGreater]) {
WebViewShared* webViewShared = [WebViewShared getInstanceOrCreate:self.webViewEngine
andCommandDelegate:self.commandDelegate
andViewController:self];
Expand Down
2 changes: 1 addition & 1 deletion src/ios/CodePush.m
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ - (BOOL)loadPackage:(NSString*)packageLocation {

- (void)loadURL:(NSURL*)url {
// Fix file:// requests issues for cordova-ios 6+
if([Utilities Cordova6OrGreater]) {
if([Utilities cordova6OrGreater]) {
[webViewShared loadRequest:[NSURLRequest requestWithURL:url]];
} else {
// In order to make use of the "modern" Cordova platform, while still
Expand Down
1 change: 1 addition & 0 deletions src/ios/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
+ (NSString*)getApplicationVersion;
+ (NSString*)getApplicationTimestamp;
+ (NSDate*)getApplicationBuildTime;
+ (BOOL)cordova6OrGreater;

@end
4 changes: 4 additions & 0 deletions src/ios/Utilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ + (NSDate*)getApplicationBuildTime{
return fileDate;
}

+ (BOOL)cordova6OrGreater{
return NSClassFromString(@"CDVWebViewEngine");
}

void CPLog(NSString *formatString, ...) {
va_list args;
va_start(args, formatString);
Expand Down

0 comments on commit b77d68c

Please sign in to comment.