Survicate Unity SDK
Requirements
- Using Survicate Mobile SDK requires an account at survicate.com. You can create your account here for free, or become invited to your company account by one of your colleagues.
- Unity 2019.4 or later
- iOS 12.0 or later
- Android 5.0 (API level 21) or later
Installation
iOS
- Add content of the iOS directory to your Assets/Plugins/iOS
- Add SurvicatePluginIOS.cs and file inside your Assets/Plugins
- Download the latest iOS SDK from here. Copy this file to your xcode project folder.
Inside your exported Xcode project, on Build Phases -> Link Binary With Libraries, add
- survicate.xcframework
Android
- Add content of the Android directory to your Assets/Plugins/Android
- Add SurvicatePluginAndroid.cs file inside your Assets/Plugins
- Download the latest android SDK from here. Place the downloaded AAR file inside Assets/Plugins/Android
- Make sure Android is selected as plugin platform on Inspector window
Add dependencies listed in developers documentations here
Configuration
Configuration for Android
- Configure your workspace key in
AndroidManifest.xml
file.
- Add missing Survicate dependencies to your project
build.gradle
located underandroid
directory.
Configuration for iOS
- Add workspace key to your
Info.plist
file.- Create
Survicate
Dictionary. - Define
WorkspaceKey
String inSurvicate
Dictionary. YourInfo.plist
file should looks like this:
- Create
- Run
pod update
in yourios
directory.
Initialization
Initialize the SDK in your application using initializeSdk()
method. Call this method only once, in the main script of your project.
Usage
On your C# script, import
For details about screens, events, user traits, and their respective use cases, please refer to the native SDKs' documentation (Android, iOS).
Changelog
4.0.0 (2024-01-19)
- New
- User conditions targeting is changed to the audience targeting: create an audience that will be available for usage among all your mobile surveys. Enable multiple audiences at the same time in one survey if necessary
User attributes now support not only string values but also numbers, boolean, and datetime values
New attribute operators are available to support new data types
Survey audience can be set not only by including a set of respondents who met the required criteria but also by excluding those who should not see the survey
And / or operators in audience targeting are switchable now: within one attribute filter that has several attributes in it and between different filters
Please note aforementioned changes are only available when using native SDK version 4.0.0 and above - Updated
- SetUserTrait(string, string) is deprecated, please use SetUserTrait(UserTrait) instead.
- Fixed
- Fixed issue with argument name and use mismatch in Android
Fixed issue with setting UserTraits in Android