Skip to content

Commit 78ef659

Browse files
author
Alexander Mokrushin
committed
Added UIStoryboard
1 parent 9270477 commit 78ef659

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/WebViewSDK/WebViewSDK.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if canImport(UIKit)
2+
import UIKit
3+
#endif
4+
15
public enum InvalidUrlError: Error {
26
case runtimeError(String)
37
}
@@ -9,6 +13,7 @@ public struct WebViewSDK {
913
}
1014

1115
public static func initWebViewController() -> WebViewController {
12-
return WebViewController()
16+
let storyboard = UIStoryboard(name: "Main", bundle: nil)
17+
return storyboard.instantiateViewController(withIdentifier: "WebViewController") as! WebViewController
1318
}
1419
}

0 commit comments

Comments
 (0)