钛金属 iOS 联系人电话自定义标签?

3
我发现了 Titanium Appcelerator Studio 中的一个 bug,当联系人对象拥有自定义电话标签时,phone 对象返回 undefined

不幸的是,修复这个问题可能需要更多的时间,但好消息是我可以修改 Objective-C 的构建类来提供个人信息。

/build/iphone/classes/TiContactsPerson.m 内容如下:

+(NSDictionary*)multiValueLabels
{
    if (multiValueLabels == nil) {
        multiValueLabels = 
            [[NSDictionary alloc] initWithObjectsAndKeys:(NSString*)kABHomeLabel,@"home", // Generic labels
             kABWorkLabel,@"work",
             kABOtherLabel,@"other",
             kABPersonPhoneMobileLabel,@"mobile", // Phone labels
             kABPersonPhonePagerLabel,@"pager",
             kABPersonPhoneWorkFAXLabel,@"workFax",
             kABPersonPhoneMainLabel,@"main",
             kABPersonPhoneIPhoneLabel,@"iPhone",
             kABPersonPhoneHomeFAXLabel,@"homeFax",
             kABPersonSocialProfileServiceFacebook,@"facebookProfile",// Social Profile Labels
             kABPersonSocialProfileServiceFlickr,@"flickrProfile",
             kABPersonSocialProfileServiceGameCenter,@"gameCenterProfile",
             kABPersonSocialProfileServiceLinkedIn,@"linkedInProfile",
             kABPersonSocialProfileServiceMyspace,@"myspaceProfile",
             kABPersonSocialProfileServiceSinaWeibo,@"sinaWeiboProfile",
             kABPersonSocialProfileServiceTwitter,@"twitterProfile",
             kABPersonInstantMessageServiceAIM,@"aim", // IM labels
             kABPersonInstantMessageServiceICQ,@"icq",
             kABPersonInstantMessageServiceJabber,@"jabber",
             kABPersonInstantMessageServiceMSN,@"msn",
             kABPersonInstantMessageServiceYahoo,@"yahoo",
             kABPersonInstantMessageServiceQQ,@"qq",
             kABPersonInstantMessageServiceSkype,@"skype",
             kABPersonInstantMessageServiceGoogleTalk,@"googletalk",
             kABPersonInstantMessageServiceGaduGadu,@"gadugadu",
             kABPersonInstantMessageServiceFacebook,@"facebook",
             kABPersonMotherLabel,@"mother", // Relation labels
             kABPersonFatherLabel,@"father",
             kABPersonParentLabel,@"parent",
             kABPersonSisterLabel,@"sister",
             kABPersonBrotherLabel,@"brother",
             kABPersonChildLabel,@"child",
             kABPersonFriendLabel,@"friend",
             kABPersonSpouseLabel,@"spouse",
             kABPersonPartnerLabel,@"partner",
             kABPersonManagerLabel,@"manager",
             kABPersonAssistantLabel,@"assistant",
             kABPersonAnniversaryLabel,@"anniversary", // Date label
             kABPersonHomePageLabel,@"homepage", // URL label
             nil];
    }
    return multiValueLabels;
}

它不包括用户为电话号码设置的自定义标签,这就是为什么当联系人有自定义标签时,phone数组返回未定义的原因。

我的问题是如何获取用户创建的所有自定义标签,并将它们推送到上述数组中?

注意:我已经向Appcelerator Jira报告了这个错误。

非常感谢任何建议。


JIRA 票据的链接是什么? - Fokke Zandbergen
Jira https://jira.appcelerator.org/browse/TC-5730 - Kodr.F
2
好的,我看到我们的测试人员已经复现了它。下一步是安排计划。 - Fokke Zandbergen
@FokkeZandbergen 听起来不错,希望他们能快速解决。 - Kodr.F
1个回答

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接