Created
May 17, 2020 14:15
-
-
Save AlexandreCools/be691761595e8f1da73cb0c73d3715ba to your computer and use it in GitHub Desktop.
[MEDIUM] Strava API - Access & Refresh token - iOS 13, Swift 5 - Step 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private func getCode(from url: URL?) -> String? { | |
| guard let url = url?.absoluteString else { return nil } | |
| let urlComponents: URLComponents? = URLComponents(string: url) | |
| let code: String? = urlComponents?.queryItems?.filter { $0.name == "code" }.first?.value | |
| return code | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment