File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ typedef NSDictionary CDVSettingsDictionary;
4545@property (nonatomic , retain ) CDVWKInAppBrowser *instance;
4646@property (nonatomic , retain ) CDVWKInAppBrowserViewController *inAppBrowserViewController;
4747@property (nonatomic , copy ) NSString *callbackId;
48- @property (nonatomic , copy ) NSRegularExpression *callbackIdPattern;
4948
5049+ (id ) getInstance ;
5150- (void )open : (CDVInvokedUrlCommand *)command ;
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ + (id)getInstance
4444- (void )pluginInitialize
4545{
4646 instance = self;
47- _callbackIdPattern = nil ;
4847 _beforeload = @" " ;
4948 _waitForBeforeload = NO ;
5049}
@@ -414,38 +413,6 @@ - (void)injectStyleFile:(CDVInvokedUrlCommand *)command
414413 [self injectDeferredObject: [command argumentAtIndex: 0 ] withWrapper: jsWrapper];
415414}
416415
417- - (BOOL )isValidCallbackId : (NSString *)callbackId
418- {
419- NSError *err = nil ;
420- // Initialize on first use
421- if (self.callbackIdPattern == nil ) {
422- self.callbackIdPattern = [NSRegularExpression regularExpressionWithPattern: @" ^InAppBrowser[0-9]{1,10}$" options: 0 error: &err];
423- if (err != nil ) {
424- // Couldn't initialize Regex; No is safer than Yes.
425- return NO ;
426- }
427- }
428- if ([self .callbackIdPattern firstMatchInString: callbackId options: 0 range: NSMakeRange (0 , [callbackId length ])]) {
429- return YES ;
430- }
431- return NO ;
432- }
433-
434- - (BOOL )isAllowedScheme : (NSString *)scheme
435- {
436- NSString *allowedSchemesPreference = [_settings cordovaSettingForKey: @" AllowedSchemes" ];
437- if (allowedSchemesPreference == nil || [allowedSchemesPreference isEqualToString: @" " ]) {
438- // Preference missing.
439- return NO ;
440- }
441- for (NSString *allowedScheme in [allowedSchemesPreference componentsSeparatedByString: @" ," ]) {
442- if ([allowedScheme isEqualToString: scheme]) {
443- return YES ;
444- }
445- }
446- return NO ;
447- }
448-
449416/* *
450417 * The message handler bridge provided for the InAppBrowser is capable of executing any oustanding callback belonging
451418 * to the InAppBrowser plugin. Care has been taken that other callbacks cannot be triggered, and that no
You can’t perform that action at this time.
0 commit comments