Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5702] Hyperloop + iOS + Intercom Issue

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNot Our Bug
Resolution Date2018-04-12T20:58:48.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsHyperloop
Labelsn/a
ReporterBorja Gomez
AssigneeShak Hossain
Created2018-04-12T18:51:02.000+0000
Updated2018-04-12T20:58:49.000+0000

Description

I have integrated Intercom iOS SDK (https://github.com/intercom/intercom-ios) using Hyperloop. I have found one issue and it looks like it's Hyperloop fault: Linking Intercom User to a Company. In order to do that I need to create an object ICMCompany with two attributes (companyId and name) and then an attribute ICMUserAttributes that includes an attribute companies with an array of one object ICMCompany. Here you have the code: var Intercom = require('Intercom/Intercom'); var ICMCompany = require("Intercom/ICMCompany"); var ICMUserAttributes = require("Intercom/ICMUserAttributes"); Intercom.logout(); Intercom.registerUserWithEmail(userInfo.email); var company = new ICMCompany(); company.name = orgName; company.companyId = orgId; var userAttributes = new ICMUserAttributes(); userAttributes.userId = userId; userAttributes.name = name; userAttributes.customAttributes = { "language_override": language, "dashboard_url": url "is_coach": coach } var companies = NSArray.arrayWithObject(company); console.log("companies.count " + companies.count); userAttributes.companies = companies; console.log("userAttributes.companies count " + userAttributes.companies.count); Intercom.updateUser(userAttributes); And the output is [INFO] companies.count 1 [INFO] userAttributes.companies count 0 It looks like companies are not stored properly in the userAttributes Object. And the final result is that the user gets all the attributes except the companies. Here you have also the documentation on Intercom: https://developers.intercom.com/docs/ios-configuration

Comments

  1. Hans Knöchel 2018-04-12

    If the native call goes through, it cannot be a Hyperloop issue. Otherwise you would have received an error log indicating the issue during build / metabase generation. A hint: Try to use the property setters (e.g. setName(name)) to see if it makes a difference or compare it with the native samples. Resolving for now.

JSON Source