Hello,
Thank you, but can you be a bit more specific please? The documentation is quite wanting and I'm not sure the parameter.
You swapped my "authURL!" for "requestContext.url"... what is requestContext?
I'm assuming the host: "...." is host: "https://com.SmartVentsTwo://auth"... is that correct?
What igoes in "path:"?
Thank you!
Post
Replies
Boosts
Views
Activity
I did look at that one, thanks. Can you give me a bit more with regard to flow? Here is the code I have been using that now doesn't work because of the complete URL requirement.
print("(CEcoobeeAPIConnect) Requesting Flair API authorization token")
// callbackUrlScheme = "com.SmartVentsTwo://auth"
callbackUrlScheme = "https://com.SmartVentsTwo://auth"
callbackUrlScheme = callbackUrlScheme.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)!
let authURL = URL(string: "https://api.ecobee.com/authorize?response_type=code&client_id= SMART_APP_CLIENT_ID&redirect_uri=(callbackUrlScheme)&scope=smartWrite&state=SmartVentRequest")
print("(CEcobeeAPIConnect) App Authorization request URL is (authURL!.absoluteString)")
self.m_webAuthSession = ASWebAuthenticationSession.init(url: authURL!, callbackURLScheme: callbackUrlScheme, completionHandler:
{ (callBack:URL?, error:Error?) in
print("(CEcoobeeAPIConnect) Ecobee API authorization token request returned, callbackURL is (String(describing: callBack))")
// handle auth response
……
}})
Can you please give a brief example of how to use ASWebAuthenticationSession.Callback in the context of my question? I don't find the Apple documentation very useful and I haven't been able to find an example on the usual websites.
Thank you!
Thank you very much for your reply. I will give ASWebAuthenticationSession.Callback a try as I'm trying to keep traffic on the device.
Apple dev support mentioned that the criteria for delivery changed in iOS 15, but it changed again in 15.4 (beta). I installed the beta and push notifications have been working fine ever since.