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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -