cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Gigya Web Bridge Swift

Former Member
0 Likes
777

Thanks for providing the web bridge. The code ported from v3 to v4 of Android pretty easily. However, In Swift, what are the corollaries to these previous GSWebBridge Objective-C calls?

registerWebView -> attachTo ?
handleRequest -> ??
webViewDidStartLoad -> ??

Thanks for any help,
John

Accepted Solutions (0)

Answers (1)

Answers (1)

spu230479
Participant
0 Likes

Hi John

To load url do the following:

let url = URL(string: “http://localhost:3333/saml/sp.html“)
let myRequest = URLRequest(url: url!)
webView.load(myRequest)

Here is an example of how to implement webBridge:

let webBridge = Gigya.sharedInstance(UserHost.self).createWebBridge()webBridge.attachTo(webView: webView, viewController: self)
{ [weak self] (event) in
switch event {
case .onLogin(let account):
self?.navigationController?.popViewController(animated: true)
default: break
}
}