- In the
Example-macOS
folder, run the following command to install the AppAuth pod.
pod install
- Open the
Example-macOS.xcworkspace
workspace
open Example-macOS.xcworkspace
This workspace is configured to include AppAuth via CocoaPods. You can also
directly include AppAuth as a static library using the build targets in the
AppAuth.xcodeproj
project.
The example doesn't work out of the box, you need to configure it with your own client ID.
- Issuer
- Client ID
- Client Secret
- Redirect URI (optional: if not using loopback).
How to get this information varies by IdP, but we have instructions for some OpenID Certified providers.
- Update
kIssuer
with the IdP's issuer. - Update
kClientID
with your new client id. - Update
kClientSecret
with your client id's secret. - Update
kRedirectURI
redirect URI (optional: if not using loopback)
Fully expand "URL types" (a.k.a. CFBundleURLTypes
) and replace
com.example.app
with the scheme of your redirect URI.
The scheme is everything before the colon (:
). For example, if the redirect
URI is com.example.app:/oauth2redirect/example-provider
, then the scheme
would be com.example.app
.
Now your example should be ready to run.