A sample app demonstrating OAuth 2.0 and other features using Core API.
The purpose of this sample app is to perform three basic functions:
- Complete the authorization process and receive tokens for communicating with Core
- Call Core Public API resources using access token
To successfully run this app, you need the following:
- A Core developer account
- An app on Developer Portal and the associated client_id, client_secret and redirect_uri
- Core Sandbox/Production company
- Authorization
- Authentication
- Activity - Retrieve, Create, Update and Delete
In info tab of your target
Replace timelogger by your application name
- On iOS implement
UIApplicationDelegatemethod
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
if let scheme = url.scheme, scheme == "timelogger"{
CoreAccount.sharedInstance.handle(url: url)
}
return true
}if (options[.sourceApplication] as? String == "com.apple.SafariViewService") {