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]; 

enter image description here

try this:

attributeset.supportsphonecall = @(yes);


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -