Intercom.io Custom Attributes for Swift aren't working

依然范特西╮ 提交于 2019-12-06 14:46:54

Turns out there were two issues:

1) Intercom documentation wrong and "custom_attributes" tag not needed for custom attributes

2) my URL formats were NSURL and not Strings and therefore the whole object was getting rejected

Fixed now! Thanks to Dale from Intercom for the support

the code is simply:

let userAttributes = [
        "name": user.name,
        "email": user.email,
        "role": "customer",
        "phone": user.phone,
        "first_name": user.firstName,
        "last_name": user.lastName,
        "referral_code": user.referralCode,
        "avatar_pic": user.avatarURLString,
        "profile_pic": user.profilePicURLString
    ]

Intercom.updateUserWithAttributes(userAttributes)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!