2

I am integrating an analytics platform(Clevertap )in my app for easy tracking of user details. To update profile of user the code is mentioned below:

NSDateComponents *dob = [[NSDateComponents alloc] init];
dob.day = 24;
dob.month = 5;
dob.year = 1992;
NSDate *d = [[NSCalendar currentCalendar] dateFromComponents:dob];
NSDictionary *profile = @{
    @"Name": @"Jack Montana",       // String
    @"Identity": @61026032,         // String or number
    @"Email": @"jack@gmail.com",    // Email address of the user
    @"Phone": @4155551234,          // Phone (exclude the country code)
    @"Gender": @"M",                // Can be either M or F
    @"Employed": @"Y",              // Can be either Y or N
    @"Education": @"Graduate",      // Can be either Graduate, College or School
    @"Married": @"Y",               // Can be either Y or N
    @"DOB": d,                      // Date of Birth. An NSDate object
    @"Age": @28,                    // Not required if DOB is set

// optional fields. controls whether the user will be sent email, push etc.
    @"MSG-email": @NO,              // Disable email notifications
    @"MSG-push": @YES,              // Enable push notifications
    @"MSG-sms": @NO                 // Disable SMS notifications
};

[[CleverTap sharedInstance] profilePush:profile];

But the problem is when i look at clevertap dashboard all the fields are updated except mobile number. enter image description here

therealprashant
  • 701
  • 15
  • 27
Rani
  • 3,333
  • 13
  • 48
  • 89

1 Answers1

0

You seem to be running the code in a device without a SIM.

CleverTap stores the phone number against a user's profile with the country code, grabbed automatically from the device SIM. Since the SIM might be missing from the device/emulator - the SDK is not able to fetch the country code, and so it doesn't save the phone number against the user's profile.

If you try this on an iPhone with a SIM, it'll work.

Hope this helps. For further questions, you can post on https://community.clevertap.com/

helloanand
  • 340
  • 1
  • 6