let accessToken = BuddyBuildSDK.valueForDeviceKey("Facebook_Token")
Device variables allow you to specify API keys, access tokens, or other secrets that your app needs to consume at run time, without having them checked in to your repository.
Device variables are made available to your app during run time via the buddybuild SDK.
Device variables are currently only available for iOS apps.
Step 1: Create Device Variables in buddybuild
Launch the buddybuild dashboard and click on App Settings.
In the left navigation, select Build settings, then Device Variables.
Enter a name, value and select Create.
Buddybuild securely embeds your variable into the app when it is built next. Your variable is consumable via the buddybuild SDK.
Step 2: Consuming the variable
To consume the variable in your build, substitute the name of your device variable where applicable (see example below).
NSString* accessToken = [BuddyBuildSDK valueForDeviceKey:@"Facebook_Token"];
That’s it! For more details, refer to our SDK API guide.
If you want to consume your variables from within your build instead, follow the Environment Variables guide.