Skip to content

Commit 648b13c

Browse files
committed
fix: infinite recursion
1 parent 566ce0a commit 648b13c

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

OSInAppBrowserLib.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ Pod::Spec.new do |spec|
2222
spec.author = { 'OutSystems Mobile Ecosystem' => '[email protected]' }
2323

2424
spec.source = { :http => "https://github.com/OutSystems/OSInAppBrowserLib-iOS/releases/download/#{spec.version}/OSInAppBrowserLib.zip", :type => "zip" }
25+
spec.source_files = "OSInAppBrowserLib/**/*"
2526
spec.vendored_frameworks = "OSInAppBrowserLib.xcframework"
2627

2728
spec.ios.deployment_target = '13.0'
2829
spec.swift_versions = ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9']
29-
end
30+
end

OSInAppBrowserLib/RouterAdapters/OSIABApplicationRouterAdapter.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ import UIKit
44
/// This is implemented by the `UIApplication` object that can be used as an External Browser.
55
public protocol OSIABApplicationDelegate: AnyObject {
66
func canOpenURL(_ url: URL) -> Bool
7-
func open(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey: Any], completionHandler completion: ((Bool) -> Void)?)
7+
func open(_ url: URL, completionHandler completion: ((Bool) -> Void)?)
88
}
99

10-
/// Provide a default implementations that abstracts the options parameter.
11-
extension OSIABApplicationDelegate {
12-
public func open(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey: Any] = [:], completionHandler completion: ((Bool) -> Void)?) {
13-
self.open(url, options: options, completionHandler: completion)
10+
/// Make `UIApplication` conform to the `OSIABApplicationDelegate` protocol.
11+
extension UIApplication: OSIABApplicationDelegate {
12+
func open(_ url: URL, completionHandler completion: ((Bool) -> Void)?) {
13+
self.open(url, options: [:], completionHandler: completion)
1414
}
1515
}
1616

17-
/// Make `UIApplication` conform to the `OSIABApplicationDelegate` protocol.
18-
extension UIApplication: OSIABApplicationDelegate {}
19-
2017
/// Adapter that makes the required calls so that an `OSIABApplicationDelegate` implementation can perform the External Browser routing.
2118
public class OSIABApplicationRouterAdapter: OSIABRouter {
2219
public typealias ReturnType = Bool

0 commit comments

Comments
 (0)