diff --git a/PrebidMobile/PrebidMobileRendering/Utilities/PBMUIApplicationProtocol.h b/PrebidMobile/PrebidMobileRendering/Utilities/PBMUIApplicationProtocol.h index 8149c8be4..7144546ea 100644 --- a/PrebidMobile/PrebidMobileRendering/Utilities/PBMUIApplicationProtocol.h +++ b/PrebidMobile/PrebidMobileRendering/Utilities/PBMUIApplicationProtocol.h @@ -25,7 +25,8 @@ @property (nonatomic, assign) UIInterfaceOrientation statusBarOrientation; @property (nonatomic, assign, readonly) CGRect statusBarFrame; -- (BOOL)openURL:(nonnull NSURL*)url NS_DEPRECATED_IOS(2_0, 10_0, "Please use openURL:options:completionHandler: instead") NS_EXTENSION_UNAVAILABLE_IOS(""); +- (BOOL)openURL:(nonnull NSURL*)url NS_SWIFT_NAME(openURL(url:)) NS_DEPRECATED_IOS(2_0, 10_0, "Please use openURL:options:completionHandler: instead") NS_EXTENSION_UNAVAILABLE_IOS(""); + - (void)openURL:(nonnull NSURL*)url options:(nullable NSDictionary *)options completionHandler:(void (^ __nullable)(BOOL success))completion NS_AVAILABLE_IOS(10_0) NS_EXTENSION_UNAVAILABLE_IOS(""); @end diff --git a/PrebidMobileTests/RenderingTests/Mocks/MockUIApplication.swift b/PrebidMobileTests/RenderingTests/Mocks/MockUIApplication.swift index ee4b20ed8..9814afef1 100644 --- a/PrebidMobileTests/RenderingTests/Mocks/MockUIApplication.swift +++ b/PrebidMobileTests/RenderingTests/Mocks/MockUIApplication.swift @@ -23,12 +23,12 @@ class MockUIApplication : PBMUIApplicationProtocol { var openURLClosure:((URL)->Bool)? - func open(_ url: URL) -> Bool { + func openURL(url: URL) -> Bool { return self.openURLClosure?(url) ?? false } func open(_ url: URL, options: [String : Any]? = [:], completionHandler completion: ((Bool) -> Void)? = nil) { - let result = open(url) + let result = openURL(url: url) completion?(result) } }