A simple iOS app to demonstrate the OAuth authentication_code flow and basic functionality of the UserVoice End User API.
NOTE: This app should only serve as an example for how to use the UserVoice End User API. It is not intended to highlight iOS best practices.
- CocoaPods: Dependency manager for Swift
- OAuthSwift: Swift library for handling the OAuth2 flow
- Clone the repository:
git clone [email protected]:uservoice/end-user-api-ios-demo.git
. - Ensure CocoaPods dependency manager is installed:
sudo gem install cocoapods
. - Navigate into project directory and install dependencies:
cd end-user-api-ios-demo && pod install
. - Create an API key from the UserVoice admin console and set the "Callback URL" to
com.uv.Demo:/oauth2Callback
.- For more information on creating an API key and implementing the OAuth flow, see this guide.
- Open
end-user-api-demo.xcworkspace
in Xcode. - Set the environment variables referenced at the top of UvApi.swift by configuring the Xcode Scheme.
- Build and run the app.