Remote configuration

Introduction to the

Firebase Remote Configuration is a cloud service that lets you change the behavior and appearance of your application without requiring users to download application updates. With remote configuration, you can create intra-application defaults that control the behavior and appearance of your application. You can then use the Firebase console or the Remote Config REST API to make all users or subgroups of users of the application behave and look different from the default values. Your application can control when updates are installed and can check frequently for updates and install them with minimal impact on performance.

The main function

  • Quickly publish changes to your application’s user base
    • You can change the default behavior and appearance of your application by changing the server parameter values.
    • For example, you can change an app’s layout or color theme background to match seasonal promotions without releasing an app update.
  • Tailor your app to your niche audience
    • You can use remote configuration to provide a diverse application user experience for different user segments (by app version, by Google Analytics for Firebase audience, by text, and more).
  • Run A/B tests to improve your application
    • You can use A combination of remote configuration random percentile positioning and Google Analytics for Firebase to A/B test your application’s improvements in different segments of the user base so that you can validate those improvements before rolling them out to the entire user base.

process

// Import pod through Cocopod'Firebase/RemoteConfig'.Copy the code

As with Performance, the default is [FIRApp configure]; Initialize the

[quality] FIRAnalyticsDebugDisabled Firebase DebugView debug parts: debug close [quality] FIRAnalyticsDebugEnabled: open the debug

Create parameters and conditions

Parameters: indicates the parameter list

  • Sets the specified condition of the parameter
  • Limit up to 2000 parameters

Conditions: List of Conditions

  • Remote Config provides multiple criteria such as operating system, language, country, target…
  • Limit up to 500 conditions

Limits on Parameters and Conditions

  • The parameter key can contain A maximum of 256 characters and must start with an underscore or A letter (A-Z or A-Z), and can contain digits. The total length of all parameter values in a project cannot exceed 800,000 characters

[[FIRRemoteConfig remoteConfig]configValueForKey:@”app_color”]

App gets remotely configured data

- (void)firebaseRemoteConfigure{// Expiration time. Default: 60 minutes NSTimeInterval Duration = 3600;#if DEBUG/ / configuration Settings, whether to open the debug mode FIRRemoteConfigSettings * setting = [[FIRRemoteConfigSettings alloc] initWithDeveloperModeEnabled: YES]; [FIRRemoteConfig remoteConfig].configSettings = setting; Duration = 0;#endif/ / set 60 minutes triggered update 3600 [[FIRRemoteConfig remoteConfig] fetchWithExpirationDuration: duration completionHandler:^(FIRRemoteConfigFetchStatus status, NSError * _Nullable error) {if(! error){ DLog(@"FIRRemoteConfigstatus = %d",status);
            BOOL activateFetched = [[FIRRemoteConfig remoteConfig]activateFetched];
            if(ActivateTouch_type) {// Obtain FIRRemoteConfigValue *value = [[FIRRemoteConfig remoteConfig] configValueForKey:@"app_color"];
                DLog(@"FIRRemoteConfigvalue = %@, %@",value.dataValue,value.stringValue); }}}]; }Copy the code

Note:

  • FetchWithExpirationDuration: completionHandler: use (by default, the cached in 12 hours after failure) need time limit is in 60 minutes can extract up to five times. Or if your application USES many times fetchWithExpirationDuration: completionHandler: request to refresh the value, the request will be blocked, and provide the value of the cache to your application. reference
  • Note the following when using a remote configuration template: There are different versions of these templates. Each version is valid for 90 days (from the time when the template is created to the time when it is replaced with a newer version), and the total number of stored versions does not exceed 300

A/B Test

Introduction to the

Firebase A/B testing helps you improve your application by making it easy to run, analyze, and extend product and marketing experiments. It enables you to test changes to the app interface, functionality, or interactive advertising series to see if the changes actually improve key metrics, such as revenue and retention, compared to before they were made.

Two test methods are supported

  • Create a remote configuration experiment
  • Create a messaging experiment

The main function

  • Run tests and improve your product experience
    • Create experiments through remote configuration, change the behavior and look of your application in variations of the experiment, and test which product experience is most effective in delivering the results you care about most.
  • Use the notification editor to find ways to re-engage users
    • Use A/B testing to help you figure out the most effective wording and message Settings to attract users to your application.
  • Safety launches new features
    • To launch a new feature, you must first test it on a small number of users to make sure it meets your goals. Wait until you have confidence in the A/B test results before rolling out the feature to all users.
  • Locate the “predicted” user base
    • With Firebase predictive capabilities, you can run A/B tests against users who are expected to perform certain actions, such as spending money (or not), stopping using your application, and performing any other transformation events that you define through Analytics.

process

// Import pod through Cocopod'FirebaseABTesting'
Copy the code

Default is [FIRApp configure]; Initialization gets parameter data remotely by referring to the RemoteConfig section for the code

Create A/B TEST experiment

Create remote_A /b_test instance

Create test conditions and parameters

  • Control group, Variant A two sets of data

Test ID credentials for configuration execution

  • ID credentials are FCMTokens

Parameter conditions are obtained by remote configuration

  • For details, see Remote Configure