0
我正在嘗試爲我的iOS應用程序實現Intercom.io的自定義屬性。我在XCode中7,斯威夫特2和iOS 9Intercom.io Swift的自定義屬性無法正常工作
這裏是我的代碼:
class func updateUser(user: User) {
Intercom.updateUserWithAttributes([
"name": user.name,
"email": user.email
])
let userAttributes = ([
"role": "customer",
"phone": user.phone,
"First Name": user.firstName,
"Last Name": user.lastName,
"Referral Code": user.referralCode,
"Avatar Pic": user.avatarURL,
"Profile Pic": user.profilePicURL
])
Intercom.updateUserWithAttributes(["custom_attributes": userAttributes])
}
我成功提交「名稱」 &「電子郵件」,但我的「custom_attributes」不工作。根據對講的文檔,我認爲我的語法是正確的: https://docs.intercom.io/Install-on-your-mobile-product/configuring-intercom-for-ios
但我是Swift新手,沒有Obj-C的經驗。
同樣重要的是要注意我的活動正在通過正確的報告。
Intercom.logEventWithName(eventName)
我的語法有什麼問題嗎?還是其他什麼?請幫忙!