(This documentation is for the master, or work-in-progress, version of the SDK.)
The UserVoice iOS SDK allows you to embed UserVoice directly in your iOS app. You will need to have a UserVoice account for it to connect to.
Binary builds of the SDK are available for download.
We also have an example app on GitHub that demonstrates how to build and integrate the SDK.
- Download the latest build.
libUserVoice.ainto your project.
- Note that the
UVHeadersdo not need to be added to your target.
Other Linker Flagsin the Build Settings for your target. (There is also an
Other Linker Flagssetting for your entire project, but that's not the one you want.)
See DEV.md if you want to build the SDK yourself.
Obtain Key And Secret
- Go to the admin section of your UserVoice account and click
- Add an iOS App.
- Copy the generated
Once you have completed these steps, you are ready to launch the UserVoice UI
from your code. Import
UserVoice.h and create a
UVConfig using one of the
1. Standard Login: This is the most basic option, which will allow users to either sign in, or create a UserVoice account, from inside the UserVoice UI. This is ideal if your app does not have any information about the user.
UVConfig *config = [UVConfig configWithSite:@"YOUR_USERVOICE_URL" andKey:@"YOUR_KEY" andSecret:@"YOUR_SECRET"];
2. SSO for local users: This will find or create a new user by passing a name, email, and unique id. However, it will only find users that were previously created using this method. It will not allow you to log the user in as an existing UserVoice account. This is ideal if you only want to use UserVoice with your iOS app.
UVConfig *config = [UVConfig configWithSite:@"YOUR_USERVOICE_URL" andKey:@"YOUR_KEY" andSecret:@"YOUR_SECRET" andEmail:@"USER_EMAIL" andDisplayName:@"USER_DISPLAY_NAME" andGUID:@"GUID"];
3. UserVoice SSO: This is the most flexible option. It allows you to log the user in using a UserVoice SSO token. This is ideal if you are planning to use single signon with UserVoice across multiple platforms. We recommend you encrypt the token on your servers and pass it to the iOS app.
UVConfig *config = [UVConfig configWithSite:@"YOUR_USERVOICE_URL" andKey:@"YOUR_KEY" andSecret:@"YOUR_SECRET", andSSOToken:@"SOME_BIG_LONG_SSO_TOKEN"];
Then you will want to launch UserVoice from the appropriate place in your code. There are 3 options here as well:
1. Standard UserVoice Interface: The user can browse suggestions, leave comments, etc. This is the full experience of everything the SDK can do
[UserVoice presentUserVoiceInterfaceForParentViewController:self andConfig:config];
2. Direct link to contact form: Launches the regular UI, but forwards the user directly to the contact form.
[UserVoice presentUserVoiceContactUsFormForParentViewController:self andConfig:config];
3. Direct link to feedback forum: Launches the regular UI, but forwards the user directly to the forum screen.
[UserVoice presentUserVoiceForumForParentViewController:self andConfig:config];
You can share feedback on the UserVoice iOS SDK forum.
Currently the UI is available in English and French. We are using Twine to manage the translations.
To contribute to the translations, follow these steps:
- Fork the project on Github
- Edit the
- Commit your changes and open a pull request
If you want to go the extra mile and test your translations, do the following:
- If you are adding a language:
- Install the
./strings.shto generate the strings files
- Run the example app (or your own app) to see how things look in the UI
- Make note of any layout issues in your pull request so that we can look at it and figure out what to do.
Some strings that show up in the SDK come directly from the UserVoice API. If a translation is missing for a string that does not appear in the SDK codebase, you will need to contribute to the main UserVoice translation site.
Copyright 2010 UserVoice Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.