--- title: "Add Custom Properties to User Segments" slug: "add-custom-properties-to-user-segments" updated: 2026-07-14T05:23:05Z published: 2026-07-14T05:23:05Z canonical: "support.whatfix.com/add-custom-properties-to-user-segments" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://support.whatfix.com/llms.txt > Use this file to discover all available pages before exploring further. # Create Custom Properties Whatfix Mobile enables you to add Custom Properties to create user segments that are specific to your app. These custom properties can be based on language, age, role, and more. This is helpful when you want to create segments using properties defined by you, apart from the default properties. After creating your custom properties, add them either at runtime or at the start of the SDK. The following GIF shows you how to create and share your Custom Property: ![adding_custom_property.gif](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/adding_custom_property.gif?sv=2026-02-06&spr=https&st=2026-10-29T12%3A29%3A54Z&se=2026-10-29T13%3A29%3A54Z&sr=c&sp=r&sig=Rs45UdMX3DaOaTvsluZ30JRoPlPymNywxZOeTF%2B4iZA%3D) > [!NOTE] > Info: > > Once you have added a custom property on Whatfix Mobile, click the Share icon to share it with your developer. ### Create custom properties in runtime In cases where the user properties are not immediately generated at the time of starting the SDK, pass the property in runtime as well. Add the following code snippet at the time of SDK integration. The custom properties of a user can be created by adding the property in key-value pair. AndroidSwiftObjective-CReact NativeIonicCordovaXamarinJetpackMAUIFlutter ### Android ```java Leap.withPropertyBuilder()    .addProperty("","")    .addProperty("","")    .flush(); ``` ### iOS-Swift ```swift Leap.shared.addProperty("", stringValue: "")           .addProperty("", intValue: ).flush() ``` ### Flutter ```javascript LeapAui.flush({    "property1": 'value1',    "property2": 'value2' }); Example: LeapAui.flush({    "userName": 'Don Joe',    "age": 20,    "cart_added_time": DateTime.now(),    "user_logged_in": "FALSE" }); ``` ### MAUI Android ```javascript Leap.WithPropertyBuilder().AddProperty("", "").Flush(); or Leap.Flush(new Dictionary{ { "", new Java.Lang.String("") } }); ``` ### MAUI iOS ```javascript Leap.Shared.AddProperty("","").AddProperty("","").Flush(); ``` ### Jetpack ```java Leap.withPropertyBuilder()    .addProperty("","")    .addProperty("","")    .flush(); ``` ### Xamarin (Android) ```javascript Leap.WithPropertyBuilder()    .AddProperty("", "")    .AddProperty("", "")    .Flush(); ``` ### Xamarin (iOS) ```javascript Leap.Shared    .AddProperty("", "")    .AddProperty("", "")    .Flush(); ``` ### Cordova (Android) ```javascript var userProps = {    "","",    "","" } cordova.plugins.LeapAndroid.flushProperties(JSON.stringify(userProps)); ``` ### Cordova (iOS) ```javascript var userProps = {    "","",    "","" } cordova.plugins.LeapiOS.flushProperties(JSON.stringify(userProps)); ``` ### Ionic ```javascript var userProps = {        "","",        "",""    } LeapPlugin.flushProperties({properties:userProps}); ``` ### React Native ```javascript var userProps = {        "":"",        "":""    } LeapReactNative.flushProperties(userProps); ``` ### iOS Objective - C ```objectivec [[[[Leap shared]       addProperty:@"" stringValue:@""]       addProperty:@"" intValue:]     flush]; ``` In a custom property `key-value` pair, the key is always a `String`, whereas the value can be a `String`, `Integer`, or `Date`. If a property is just a flag pass them as `TRUE or FALSE.` > [!WARNING] > Note: > > For React Native and Cordova, if a property is a Date property, pass the date in ISO string format, **'Date:${date.toISOString()}'.** Use the following examples to create custom properties for segmentation purposes: > [!NOTE] > Info: > > Use plain and meaningful words as keys for easy reference. AndroidSwiftObjective-CReact NativeIonicCordovaXamarinJetpackMAUIFlutter ### Android ```java Leap.withBuilder("") // Replace "YOUR_API_KEY" with your key    .addProperty("userName","Don Joe")    .addProperty("age", 20)    .addProperty("cart_added_time",new Date())    .addProperty("user_logged_in", "FALSE")    .start(); or Leap.withPropertyBuilder()    .addProperty("user_logged_in", "TRUE")    .flush(); ``` ### iOS-Swift ```swift Leap.shared    .withBuilder("")? // Replace "YOUR_API_KEY" with your key    .addProperty("userName",stringValue:"Don Joe")    .addProperty("age", intValue:20)    .addProperty("cart_added_time",dateValue:Date())    .addProperty("user_logged_in", stringValue:"FALSE")    .start(); or Leap.shared    .addProperty("user_logged_in", stringValue:"TRUE")    .flush(); ``` ### Flutter ```javascript LeapAui.flush({    "property1": 'value1',    "property2": 'value2' }); Example: LeapAui.flush({    "userName": 'Don Joe',    "age": 20,    "cart_added_time": DateTime.now(),    "user_logged_in": "FALSE" }); ``` ### MAUI Android ```javascript Leap.WithPropertyBuilder().AddProperty("", "").Flush(); or Leap.Flush(new Dictionary{ { "", new Java.Lang.String("") } }); ``` ### MAUI iOS ```javascript Leap.Shared.AddProperty("","").AddProperty("","").Flush(); ``` ### Jetpack ```java Leap.withBuilder("") // Replace "YOUR_API_KEY" with your key    .addProperty("userName","Don Joe")    .addProperty("age", 20)    .addProperty("cart_added_time",new Date())    .addProperty("user_logged_in", "FALSE")    .start(); or Leap.withPropertyBuilder()    .addProperty("user_logged_in", "TRUE")    .flush(); ``` ### Xamarin (Android) ```javascript Leap.WithBuilder("")                .AddProperty("userName", "Don Joe")                .AddProperty("age", 20)                .AddProperty("cart_added_time", new Java.Util.Date())                .AddProperty("user_logged_in", "FALSE")                .Start(); or Leap.WithPropertyBuilder()                .AddProperty("user_logged_in", "TRUE")                .Flush(); ``` ### Xamarin (iOS) ```javascript Leap.Shared.WithBuilder("")                .AddProperty("userName", "Don Joe")                .AddProperty("age", 20)                .AddProperty("cart_added_time", new NSDate())                .AddProperty("user_logged_in", "FALSE")                .Start(); or Leap.Shared.AddProperty("user_logged_in", "TRUE")                .Flush(); ``` ### Cordova (Android) ```javascript var date = new Date() var userProps = {        "userName": "Don Joe",        "age": 20,        "cart_added_time": `Date:${date.toISOString()}`,        "user_logged_in": "FALSE"    } cordova.plugins.LeapAndroid.startWithProperties("", userProps); or cordova.plugins.LeapAndroid.flushProperties(userProps); ``` ### Cordova (iOS) ```javascript var date = new Date() var userProps = {        "userName": "Don Joe",        "age": 20,        "cart_added_time": `Date:${date.toISOString()}`,        "user_logged_in": "FALSE"    } cordova.plugins.LeapiOS.startWithProperties("", userProps); or cordova.plugins.LeapiOS.flushProperties(userProps); ``` ### Ionic ```javascript var date = new Date() var userProps = {        "userName": "Don Joe",        "age": 20,        "cart_added_time": `Date:${date.toISOString()}`,        "user_logged_in": "FALSE" } LeapPlugin.startWithProperties({apiKey:"",properties:userProps}); or LeapPlugin.flushProperties({properties:userProps}); ``` ### React Native ```javascript var date = new Date() var userProps = {        "userName": "Don Joe",        "age": 20,        "cart_added_time": `Date:${date.toISOString()}`,        "user_logged_in": "FALSE"    } LeapReactNative.startWithProperties("", userProps); or LeapReactNative.flushProperties(userProps); ``` ### iOS Objective - C ```objectivec [[[[[[[Leap shared] withBuilder:@""]                    addProperty:@"username" stringValue:@"Don Joe"]                    addProperty:@"age" intValue:20]                    addProperty:@"cart_added_time" dateValue:[NSDate date]]                    addProperty:@"user_logged_in" stringValue:@"FALSE"] start]; or [[[Leap shared]            addProperty:@"user_logged_in" stringValue:@"TRUE"]            flush]; ```