How do I configure the Swrve SDK for EU data storage?
By default, Swrve stores customer resources and content in our US data center. Some customers may require that we store their data in our EU data center, therefore to accommodate these requirements, Swrve has separate .swrve.com endpoints for customers who require data separation (for example, eu-dashboard.swrve.com). This article explains how to update the SDK configuration to point to the EU URL endpoints. If you have any questions or need assistance configuring the SDK for EU data storage, please contact support@swrve.com.
EU stack endpoints configuration
To make use of Swrve’s EU stack, you must configure the Swrve SDK to point to the correct server addresses.
iOS
Update the code in the didFinishLaunchingWithOptions method of the App Delegate to the following:
#import "swrve.h" - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { SwrveConfig* config = [[SwrveConfig alloc] init]; config.Stack = SWRVE_STACK_EU; [Swrve sharedInstanceWithAppID:<app_id> apiKey:@"<api_key>" config:config]; }
Android
Update the onCreate method of your application class to the following:
... @Override public void onCreate() { super.onCreate(); SwrveConfig config = new SwrveConfig(); config.setSelectedStack(SwrveStack.EU); SwrveSDK.onCreate(this, <app_id>, "<api_key>", config); } ...
Unity
In the Unity editor, update the Config Events Server and Content Server settings to https://<app_id>.eu-api.swrve.com and https://<app_id>.eu-content.swrve.com respectively, or use the following when setting up the configuration:
Config.SelectedStack = Swrve.Stack.EU;
Using Swrve APIs
If an app is configured to use the EU stack, you must also update any API URL references as follows:
API | Non-EU URL | EU URL |
---|---|---|
Swrve Events API Swrve Referrer API Session Token |
<app_id>.api.swrve.com | <app_id>.eu-api.swrve.com |
Swrve A/B Test API | <app_id>.content.swrve.com | <app_id>.eu-content.swrve.com |
Swrve Push API | service.swrve.com | eu-service.swrve.com |
Swrve Items API Swrve Export API |
dashboard.swrve.com | eu-dashboard.swrve.com |