120 iPS The Search Functionality in iOS 9 with Chris Grant
Show Notes
01:05 - Chris Grant Introduction
01:19 - iOS9 Day-by-Day Blogs
01:52 - Search APIs
03:27 - NSUserActivity
04:56 - Indexing
- Use Cases
09:06 - Displaying Results, Supporting Deep Linking
10:28 - Core Spotlight
11:54 - Images
13:34 - Benefits of the API
14:49 - Content & Discoverability
16:41 - Is anything missing?
18:24 - Testing
18:50 - Indexing Shared Data
19:30 - shinobicontrols
22:52 - iOS9 Day-by-Day Blogs
24:18 - Recommendations for Developers Updating Apps to iOS9
Picks
Hackathons (Alondo)
Flock (Alondo)
keen (Andrew)
Autodesk 123D Design (Andrew)
React Native Podcast (Chuck)
15 Minute Podcast Listener chat with Charles Wood (Chuck)
Orphan Black (Chuck)
fastlane (Chris)
Flock (Alondo)
keen (Andrew)
Autodesk 123D Design (Andrew)
React Native Podcast (Chuck)
15 Minute Podcast Listener chat with Charles Wood (Chuck)
Orphan Black (Chuck)
fastlane (Chris)
Transcript
[This episode is sponsored by Hired.com. Every week on Hired, they run an auction where over a thousand tech companies in San Francisco, New York and L.A. bid on iOS developers, providing them with salary and equity upfront. The average iOS developer gets an average of 5-15 introductory offers and an average salary offer of $130,000/year. Users can either accept an offer and go right into interviewing with a company or deny them without any continuing obligations. It’s totally free for users, and when you're hired they also give you a $2,000 signing bonus as a thank you for using them. But if you use the iPhreaks link, you’ll get a $4,000 bonus instead. Finally, if you're not looking for a job but know someone who is, you can refer them on Hired and get a $1,337 bonus as thanks after the job. Go sign up at Hired.com/iphreaks]
C:
Hey everybody and welcome to episode 120 of the iPhreaks Show. This week on our panel we have Andrew Madsen, Alondo Brewington –.
Al:
Hello, from North Carolina.
C:
I’m Charles Max Wood from Devchat.tv, and this week we have a special guest; that’s Chris Grant.
Ch:
Hi everyone.
C:
Do you want to introduce yourself really quickly?
Ch:
Yeah. So my name is Chris. I work for a company called ShinobiControls in the UK. We produce UI components for iOS and Android.
C:
Awesome. Now, I was looking at the blog post that you had up on the iOS 9. It was a day by day so it looks like there are multiple articles here, but the one that I was looking at was the search APIs.
Ch:
Yeah, so it’s a series. I’m releasing a post to the day by day series every week. We have released nine so far, I believe, and there’s four or five more coming. So if you're interested just go to the ShinobiControls blog and you can subscribe to the blog posts and they will each post each experience a new component from iOS 9, basically.
C:
Do you want to give us a quick overview on the search APIs?
Ch:
Yeah, sure. So in – after WDC this year, Apple introduced some new search API capability and Skype. This is for ambient spotlight search results on your phone with your own application. So if you run an application that has searchable content, you can list that in Spotlight. Whenever we use it, it types in a search term that will query your search entries and it will display in the spotlight and then that creates a deep link into your app.
There’s three different ways to do this, and the first way is within NSUser activity. And this is things like the stage that users previously been in your app, and you can associate the stage in your app with [inaudible], and then I’ll come up and serve you suggestions, which is now that you’ve featured iOS 9. One of the others is Core Spotlight, so when you download some data with your app and you can index that data with Spotlight, and then not all appear when the search is [inaudible], and then there’s also web search functionalities. So if you have a website and it has searchable content, you can add a metadata to your website and Apple has its own core service now, so that Apple [inaudible] your web URLs so just like [inaudible]. And then you can index your website’s searchable content in Spotlight as well. There’s really three different components.
C:
Yeah, this seems really interesting. So with the user activity are you just pushing stuff into the index or is there more to it than that?
Ch:
No, so the NSUser activity is just pushing stuff in the index as is Core Spotlight, the web markup stuff. And I was [inaudible] content on a website and in Spotlight, basically.
An:
I know NSUser activity was introduced in iOS 8 and 10.10 for hand-off, and that’s the way you can make your iOS device hand-off to a Mac app or whatever. So if you’ve already implemented that, so you already – you need a Mac app and an iOS app and you're doing hand-off by using NSUser activity in the iOS app. Do you need to do anything extra now to support making the user activities searchable on Spotlight, or is that something you get for free if you’ve already implemented handoff?
Ch:
I believe you get it for free but you will want to associate a metadata with that stage as well. So previously you wouldn’t be in associate in that search terms with that stage, but now you will want to be doing that so the results are more accurate.
An:
Alright, okay, so add a little more information butt is seems like it would be a pretty simple change if you’ve already started using NSUser activity and I actually have implemented this in an app, and of course the NSUser APIs is pretty simple, pretty straight forward.
Ch:
There’s not much to the APIs to be honest, even the Core Spotlight APIs. If you take a look at the blog post, this Core data sound [inaudible]. It’s quite simple stuff from a developer’s point of view.
An:
So that was actually my next question. I do Mac development and I’ve written a Spotlight importers because Spotlight has been accessible to developers on the Mac for as long as it existed – at least as long as I’ve been using it. And the process for making your apps content indexible in Spotlight on the Mac is hard but it’s not super straight forward, yet you have to write this ‘importer’ that’s really a plug-in for Spotlight that it loads up to index your content.
Does this new Core Spotlight API on iOS have anything in common with that or have they started from scratch and done something that is different and makes sense on iOS?
Ch:
I actually use the Mac version, but I think it’s useful and worth it to talk about this new stuff. At WWDC was all about new stuff and it’s all designed and works nicely with Swift as well. All you basically do is create an iproduceset – and then just index the iproduceset and you'll get completion, a hundred of that for that within your areas that good. It’s quite simple stuff.
C:
When I’m looking at this, basically the functionality is I swipe down on my home screen or on the index where it shows all the apps. And then I type something in that, I have told, Core Spotlight is indexable and then it'll show whatever that is in the search results?
Ch:
Yeah, that’s correct. Yeah.
C:
And does it show up under search APIs? Because I think that might be a little confusing for regular listeners. Swipe screen shot shows.
Ch:
Yeah, that was just the name of the project, so that was the old project, for what the app is called, that’s the name that appears. It’s split into sections.
C:
Okay, so I’ll have a section for my awesome app?
Ch:
Yeah, correct.
An:
You mentioned there’s this web markup part of this where you can actually have content on your website indexed in Spotlight. I’m kind of curious about that – what’s the use case, and also why do you think Apple’s doing that? What’s the benefit to users and how does that all work, really?
Ch:
In terms of the use case there could be many, many use cases. It’s basically just a way for Apple to provide us search results to users so search results will happen [inaudible] and you can get things like [inaudible] as well. And just lots of different metadata that it can provide just means that instead of getting plain text web results in the search, you get something a little bit more useful.
C:
One thing that I’m seeing here though is that it says ‘it allows apps that mirror their content to a website to index their content on Spotlight’. So not just anybody with a website can do this; you actually have to have an app that reflects that one way or the other?
Ch:
[inaudible], yeah.
An:
The whole point though is that this content that’s on Spotlight, or that’s on the web that’s Spotlight is able to index has to be available in your app as well, right? Somehow. Is that true?
Ch:
Yes, so if you had something like – say if you had an IMDB app, and you search for a film, it could display on the web or it could display in the IMDB app as well.
C:
Oh, I see. Basically then if I look up some actor or actress or TV show or something, it’ll show both?
Ch:
Correct, yeah.
C:
One thing that I did notice though was that it appears that you can actually have that work if you don’t have the app installed. So if I don’t have the IMDB app installed and I go search for Hugh Jackman or somebody, then it’ll still show up in the search results even though I don’t have the IMDB app installed? Or do I have to have it installed on at least one of my devices?
Ch:
No, you don’t have to have it installed and [inaudible] that is the biggest benefit for this. Just to drive new app installs, I think that’d be really, really big.
C:
So is that generally the idea then, is that they tap that web result and it goes to the website, and then – I know IMDB does this. They actually have that – so they have a pop over that says ‘do you want to keep using the web or do you want to download the app?’
Ch:
Yeah, and you can even with that you can put a deep link, so when you click using the app you will open what you searched for, which is really useful.
C:
So you have deep links that take you back into the app that particular piece of content.
Ch:
Yeah.
C:
Hm.
An:
That brings me to my next question which is, obviously, results in Spotlight are not that useful if they simply show up in a list and you can’t really do anything else with them. Of course, existing on iOS 8 or going back to whatever they have at Spotlight, you click on their result something actually happens. So what happens when the user taps on a result that is Spotlight content in your app, indexed with one of these three ways we’ve talked about?
Ch:
Again, it creates into the deep link, and you build the [inaudible] when your app is opened, it will do whatever it needs to do. Just by their appropriate results inside of your app.
An:
How hard is that to implement and specifically, how does the deep linking stuff works? What do you have to do to support these deep links into your app?
Ch:
Start your application, continue user activity
[Hosting and bandwidth provided by the Blue Box Group. Check them out at BlueBox.net.]
[Bandwidth for this segment is provided by CacheFly, the world’s fastest CDN. Deliver your content fast with CacheFly. Visit cachefly.com to learn more]
[Would you like to join a conversation with the iPhreaks and their gu;ests? Want to support the show? We have a forum that allows you to join the conversation and support the show at the same time. You can sign up at iphreaksshow.com/forum]
120 iPS The Search Functionality in iOS 9 with Chris Grant
0:00
Playback Speed: