func buildBridge(info:PHBridgeInfo) -> PHSBridge {
// Replace app name and device name
return PHSBridge.init(block: { (builder) in
builder?.connectionTypes = .remote
let device = UIDevice.current
let uid = device.identifierForVendor?.uuidString
builder?.setupRemote(withAppID: "myapp", withDeviceID: "es.ricardo.com", withAccountGUID: nil, withcallbackURL: "https://localhost", withclientID: "client", withClientSecret: "secret")
builder?.bridgeConnectionObserver = self
builder?.add(self)
}, withAppName: "MyApp", withDeviceName: "MyDevice")
}
let bridgeInfo:PHBridgeInfo
lazy var bridge:PHSBridge = {
let b = buildBridge(info:bridgeInfo)
let brc = b.getConnection(PHSBridgeConnectionType.remote) as! PHSRemoteBridgeConnection
//this line is not working, url is always an empty string ""
let url = brc.getLoginURL()
return b
}()
While in Android the equivalent code is fully working.
I have the following swift code:
While in Android the equivalent code is fully working.
Any explanation why brc.getLoginURL() is not working properly at iOS ?