- 11 Oct 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Self Hosting Whatfix Mobile content
- Updated On 11 Oct 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Self Hosting is a Beta feature. To enable the feature, contact support@whatfix.com.
Whatfix Mobile enables you to download the content you have created and host it on your own servers. Self-hosting is useful when you are on an internal network and cannot access the in-app experiences from the Whatfix cloud or when your IT security doesn't enable resource loading from remote servers. With Self Hosting, create the in-app experience on the Whatfix cloud, and subsequently, export it as a .zip file that can be hosted on your CDN (Content Distribution Network) or private server.
Use the following steps to self-host Whatfix Mobile content:
1. On the Whatfix Mobile Dashboard, select the App containing the Projects you want to export.
2. Click App Settings.
3. In the Export Content section, click Export.
- The project you create needs to be published before you export it.
- Once the app is exported, an email with a link to download the content is sent to your registered email address.
4. To download the .zip file, go to the email and then click Download Package.
5. Unzip the file and upload the whatfix folder to your server.
- Here's how the extracted folder looks like:
- Ensure that you keep the folder structure intact while uploading it to your server.
- If you update your Whatfix Mobile content, you have to publish it and then export the .zip file again.
6. After uploading the content to your server, add the following code as per your platform while initializing the SDK to fetch Whatfix Mobile content from your CDN or server.
Ensure that the URL ends with a slash('/'). For example, https://xyz.test.com/self-hosting/
The Self Hosting feature is available only for SDK versions equal to and above the following versions:
- Android: 1.7.0
- iOS: 1.7.0
- React Native (Android and iOS): 1.7.0
- Xamarin (Android and iOS): 1.4.0
- Cordova (Android and iOS): 1.4.0
- Ionic: 1.2.0
Android
LeapCreator.start("YOUR_API_KEY");String selfHostingBaseUrl = "https://assets.selfhosting.com/self-hosting/";Leap.withSelfHostedBuilder() .setBaseUrl(selfHostingBaseUrl) .start();
iOS Swift
LeapCreator.shared.start("YOUR_API_KEY")let selfHostingUrl = "https://assets.selfhosting.com/self-hosting/"Leap.shared.withSelfHostedBuilder()?.setBaseUrl(selfHostingUrl)?.start()
iOS Objective-C
NSString *baseUrl = @"https://assets.selfhosting.com/self-hosting/";[[[[Leap shared] withSelfHostedBuilder] setBaseUrl:baseUrl] start];[[LeapCreator shared] start:@"YOUR_API_KEY"];
ReactNative
const baseUrl = "https://assets.selfhosting.com/self-hosting/";LeapReactNative.startWithSelfHostedURL(baseUrl);LeapCreatorReactNative.start("YOUR_API_KEY);
Ionic
const baseUrl = "https://assets.selfhosting.com/self-hosting/";LeapPlugin.startWithSelfHostedURL(baseUrl);LeapCreatorPlugin.start({apiKey: "YOUR_API_KEY"})
Cordova (Android)
var baseUrl = "https://assets.selfhosting.com/self-hosting/";cordova.plugins.LeapAndroid.startWithSelfHostedURL(baseUrl);cordova.plugins.LeapCreatorAndroid.start("YOUR_API_KEY");
Cordova (iOS)
var baseUrl = "https://assets.selfhosting.com/self-hosting/";cordova.plugins.LeapiOS.startWithSelfHostedURL(baseUrl);cordova.plugins.LeapCreatoriOS.start("YOUR_API_KEY");
Xamarin Android
LeapCreator.Start("YOUR_API_KEY");Leap.WithSelfHostedBuilder() .SetBaseUrl("https://assets.selfhosting.com/self-hosting/") .Start();
Xamarin iOS
string HostUrl = "https://assets.selfhosting.com/self-hosting/";Leap.Shared.WithSelfHostedBuilder().SetBaseUrl(HostUrl).Start();LeapCreator.Shared.Start("YOUR_API_KEY");