Post

Replies

Boosts

Views

Activity

Reply to OAuth using ASWebAuthenticationSession, redirect URI
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 …… }})
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’24
Reply to OAuth using ASWebAuthenticationSession, redirect URI
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!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to OAuth using ASWebAuthenticationSession, redirect URI
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 …… }})
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to OAuth using ASWebAuthenticationSession, redirect URI
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!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to OAuth using ASWebAuthenticationSession, redirect URI
Thank you very much for your reply. I will give ASWebAuthenticationSession.Callback a try as I'm trying to keep traffic on the device.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to App does not launch by data FCM
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.
Replies
Boosts
Views
Activity
Feb ’22