From 4764ffe14c27580b669e9eb2b2536f841a9790c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Wed, 18 Jan 2017 17:11:46 +0100 Subject: [PATCH] Fix find&replace issue --- src/ios/APPBackgroundMode.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ios/APPBackgroundMode.m b/src/ios/APPBackgroundMode.m index dae1cad..6983cf2 100644 --- a/src/ios/APPBackgroundMode.m +++ b/src/ios/APPBackgroundMode.m @@ -233,21 +233,21 @@ NSString* const kAPPBackgroundEventFailure = @"failure"; { if (!IsAtLeastiOSVersion(@"8.0")) return; - + Class wkWebViewEngineCls = NSClassFromString(@"CDVWKWebViewEngine"); SEL selector = NSSelectorFromString(@"createConfigurationFromSettings:"); - + if (!wkWebViewEngineCls) return; - + SwizzleSelectorWithBlock_Begin(wkWebViewEngineCls, selector) ^(CDVPlugin *self, NSDictionary *settings) { id obj = ((id (*)(id, SEL, NSDictionary*))_imp)(self, _cmd, settings); - + SEL sel = NSSelectorFromString(@"_setAlwaysRunsAtForegroundPriority:"); - ((void (*)(id, SEL, BOOL))[obj methodForSelector:selector])(obj, sel, YES); - - return sel; + ((void (*)(id, SEL, BOOL))[obj methodForSelector:sel])(obj, sel, YES); + + return obj; } SwizzleSelectorWithBlock_End; }