Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User attributes not registering when running Flutter app on iOS #76

Closed
CamronLDNF opened this issue Nov 11, 2021 · 4 comments
Closed

User attributes not registering when running Flutter app on iOS #76

CamronLDNF opened this issue Nov 11, 2021 · 4 comments
Assignees

Comments

@CamronLDNF
Copy link

CamronLDNF commented Nov 11, 2021

I'm using clevertap_plugin: 1.3.0.

To register the user properties, I'm using the onUserLogin method. This is what the code looks like (with sample values).

    var profile = {
      'Name': 'John Doe',
      'Identity': 100,
      'Email': 'johndoe@mail.com',
      'Gender': 'Male',
      'DOB': '27-02-1990',
      'MSG-push': true,
      'MSG-email': true,
    };

    await CleverTapPlugin.onUserLogin(profile);

When I run the app on Android, the user properties are registered correctly. When I run the app on iOS (both in emulator and on physical device), the top-level properties (name, email, etc.) and communication preferences are registered correctly BUT the properties that are meant to show up in the User properties table do not appear. Again, it works fine with Android but not with iOS. What could be wrong? I have gone through your documentation for Flutter, iOS, and Android, but to no avail.

Here are the screenshots:

On Android - OK
image

On iOS - properties not registering
image

@CamronLDNF CamronLDNF changed the title User attributes not registered when running Flutter app on iOS User attributes not registering when running Flutter app on iOS Nov 11, 2021
@Aditi3 Aditi3 self-assigned this Nov 12, 2021
@Aditi3
Copy link
Contributor

Aditi3 commented Nov 16, 2021

Hi @CamronLDNF

I verified the aforementioned behaviour for the iOS platform and appears that if you pass the date format as follows then it should work as expected.

var dob = new DateTime(2010, 5, 5);
var stuff = ["bags", "shoes", "clothes"];
var profile = {
      'Name': 'John Doe',
      'Identity': 10001,
      'Email': 'johndoe10001@mail.com',
      'Gender': 'Female',
      'Language': 'English',
      'DOB': CleverTapPlugin.getCleverTapDate(dob),
      'stuff': stuff
    };
CleverTapPlugin.onUserLogin(profile);

User-props

@CamronLDNF
Copy link
Author

CamronLDNF commented Nov 17, 2021

@Aditi3 thanks for your response. Per your suggestion, I passed in the profile as follows (removed the attributes we don't use and added communication preferences).

    var dob = new DateTime(2010, 5, 5);
    var profile = {
      'Name': 'John Doe',
      'Identity': 10001,
      'Email': 'johndoe10001@mail.com',
      'Gender': 'Female',
      'DOB': CleverTapPlugin.getCleverTapDate(dob),
      'MSG-push': true,
      'MSG-email': true,
    };
    CleverTapPlugin.onUserLogin(profile);

Although this solves the date issue, it produces a set of other issues now, both in iOS and Android. I've flagged them in the screenshots below. Please let me know.

Also, I am using the CleverTapPlugin.recordScreenView to register pages visited, but I don't see that activity here in the user profile. What am I missing.


On iOS

iOS_1
iOS_2
iOS_3


On Android

android_1
android_2
android_3

@Aditi3
Copy link
Contributor

Aditi3 commented Nov 22, 2021

For iOS Mobile Push communication preferences, can you please check if the push token is present on the profile? If the push token is not present then also the communication preference is marked as false. Once, the token gets updated for the user, the user will be subscribed to push.

@darshanclevertap
Copy link
Contributor

@CamronLDNF Is this resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants