ios - How to add call button to search result in CoreSpotlight? -
in wwdc session introduction search apis. show search result of airbnb app call button. saw think result created cssearchableitemattributeset
not web markup api. tried setting itemcontenttype of cssearchableitemattributeset
kuttypeitem
, kuttypemessage
, kuttypeemailmessage
of course phonenumbers value. none of them seems work. detail put appear correctly, except call button.
cssearchableitemattributeset *attributeset = [[cssearchableitemattributeset alloc] initwithitemcontenttype:(__bridge nsstring *)kuttypeitem]; attributeset.title = @"call me back"; attributeset.contentdescription = @"firstname lastname\n14:36 - 30 january 2014"; attributeset.phonenumbers = @[@"+66827364538"]; attributeset.accounthandles = @[@"+66827364538"];
if use kuttypecontent
. call button appears details not. name of contact put in when create csperson
object.
csperson *person = [[csperson alloc] initwithdisplayname:@"theptai intathep" handles:@[@"+66827364538"] handleidentifier:cncontactphonenumberskey]; attributeset.authors = @[person];
try this:
attributeset.supportsphonecall = @(yes);
Comments
Post a Comment