Chapter 3. $fh.getCloudURL

$fh.getCloudURL();

Get the URL of the Cloud App that the current Client App is communicating with. Should only be used after the SDK is initialized.

Once you have the URL of the Cloud App, you can use any other HTTP/AJAX client to communicate with the Cloud App. However, the downside of this approach is that your app won’t be able to use the analytics service provided by the platform as some meta data is missing in the requests, or if the endpoints are secured, you will not be able to call them without providing the API keys.

To make it easier, the SDKs also have APIs to provide this meta data as request parameters or headers. You just need to get the data and add it to the requests either as part of the request body or request headers. See $fh.getFHParams.

Supported Platforms

  • JavaScript SDK

    • Cordova
    • Web Apps
  • Android SDK
  • iOS Objective-C SDK
  • iOS Swift SDK
  • .NET SDK

    • Windows
    • Xamarin

For detailed version information, see Supported Configurations.

3.1. Example

JavaScript

var cloud_url = $fh.getCloudURL();

Android (Java)

String cloudAppHost = FH.getCloudHost();

iOS (Objective-C)

NSString * cloudAppHost = [FH getCloudHost];

 .NET (C#)

string cloudAppHost = FH.GetCloudHost();