Last modified January 22, 2019 by Shelly Wolfe

How does Swrve get resource information to an iOS client?

There are a few patterns for getting Swrve resource data and A/B test data into your app running on iOS.


Direct client query – all resource data

One pattern for querying Swrve is to pull down the full resource list from the Swrve servers. Pulling down the full resource list means that any changes made in the resource editor are applied to the app as well as any changes made using A/B tests.


Direct client query – A/B test diffs

Another pattern for querying data from the Swrve servers is to pull down only the differences that A/B tests create for each user. The assumption with this model is that you have built a default version of your resources into your app and all you need to do to get A/B tests running is to pull down the differences between these resources and the resources in Swrve due to a running A/B test. For apps that have large numbers of resources, you may notice a considerable improvement in performance if you pull only A/B test diffs.


Server query

A third method of querying Swrve is to have your servers query Swrve when your app client comes online. If you have an existing server infrastructure in place this may make sense for your app. In this instance, you would typically make a query to Swrve when the iOS client comes online for the differences to the resources due to A/B tests and then apply these changes before passing the data down to the client.