This repository was archived by the owner on Aug 11, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
#import < Foundation/Foundation.h>
2
2
#import < Cordova/CDVPlugin.h>
3
+ #import < Cordova/CDVAvailability.h>
3
4
#import " SSZipArchive.h"
4
5
5
6
enum ProgressState {
@@ -40,6 +41,9 @@ typedef NSUInteger ErrorCodes;
40
41
- (void ) cancel : (CDVInvokedUrlCommand*)command ;
41
42
- (void ) download : (CDVInvokedUrlCommand*)command ;
42
43
- (void ) unzip : (CDVInvokedUrlCommand*)command ;
44
+ #ifndef __CORDOVA_4_0_0
45
+ - (void ) loadUrl : (CDVInvokedUrlCommand*)command ;
46
+ #endif
43
47
44
48
@end
45
49
Original file line number Diff line number Diff line change @@ -528,6 +528,14 @@ - (BOOL) copyCordovaAssets:(NSString*)unzippedPath copyRootApp:(BOOL)copyRootApp
528
528
return YES ;
529
529
}
530
530
531
+ - (void )loadUrl : (CDVInvokedUrlCommand*) command {
532
+ NSString * url = [command argumentAtIndex: 0 withDefault: nil ];
533
+ if (url != nil ) {
534
+ NSURLRequest * request = [NSURLRequest requestWithURL: [NSURL URLWithString: url]];
535
+ [self .webViewEngine loadRequest: request];
536
+ }
537
+ }
538
+
531
539
- (NSURLSession *) backgroundSession : (NSNumber *)timeout {
532
540
static NSURLSession *session = nil ;
533
541
static dispatch_once_t onceToken;
You can’t perform that action at this time.
0 commit comments