 I was a developer at Homage, which is an on-demand home care service startup. So I'm going to share something about how to make your app content, the private content of the app, searchable through Spotlight. Anyone who uses Spotlight for the app to search the content or something. So many people using it. That's cool. Yeah, so there are like different modes of search for your apps. Basically, discovery, which is like simply you search your app going on the app store or going from your Spotlight. So you just type the name of the app and it searches, which is actually added by Apple default. Then rediscovery is like bringing back the user to your app, which is like that's the most important part. The search by user, he uses it, but how to bring him back to the same app. And then index by searching, which is like used by most of the file systems and all. Then user will be searching, which is like user did some activity in your app. Let's say user read some sport news and bring him back to the sport news section of the app or something. So yeah, we're going to discuss all these things in very short. Yeah, so basically two frameworks can be used should be important for adding the Spotlight search for your app, which is like core Spotlight and mobile services. It's very simple, like if you see we just create a searchable item attribute set, which contains all the searchable items as a CS searchable item object. Yeah, and we use the mobile services framework to define as an identifier type, like your content type is of what type here we are using as a string. So you just set the title for it, description for it, keywords. Keywords are the basically text used for your indexing. Thumbnail, you can add an image to it. Then query string is actually a unique identifier for your search result. Let's say you are searching for a room. So on a spotlight you search like a room and many results come there. So each item has a unique, has a domain identifier and a query string. So query string is a unique ID for that item and domain identifier is like a bundle ID or something package ID for that particular group of searchable results. Yeah, so simply like few lines of code to add your searchable items. Then you just add to the index searchable function and the API itself adds all the items for indexing. So basically how it works is like, let's say you search for something and let me show you on my phone. Yeah, let's say I search for a ride. So it gives me options for different, different apps here. Well, it didn't give me any option for Uber or Grab. Too bad for that. But yeah, let's say Yelp is there. So if I click Yelp, it will bring me to the Yelp app directly. So this is one of the cool features like app can use to bring back a user to their app. Yeah, this is a simple example. So when I tap, yeah, so what basically happens is this function of the app is called, which is I think you guys most of the time use when you bring the user from a universal link. So I assume like most of you using universal links, using branch or somewhere. But yeah, so this method is called and here actually you can take the action. What exactly user want to go to or what exactly you want to bring user to, which screen you want to bring user to. So this is simply like few lines of code and you just add an index to your app. For example, for my app, I added like a medication. So we provide like home care services, which is one of the services is medication services. So if you search medication, I'm not sure why I'm not trying the app, but yeah. So basically it's supposed to show the app there and it will bring you to the specific screen in the app. Then another is user's best search, which I talked about earlier, which particular screen you want to bring user to. Let's say for a news game, you want to bring user to sports section. Let's say they keep searching for this kind of news. So definitely you want to track those kind of activities of users and bring them to that page again. So simply you can add NSUser activity object in your, everyone can see right. Yeah, very simple to add a NSUser activity object with your view controller. You can just create an object with a unique identifier. You can group it, let's say for our case, we have a schedule which is services. So we just group it following the convention of the reverse DNS like company name and the group name. You can define a title for it and eligible for search. So basically users can choose to off the indexing, the search indexing. So you have to put this variable as a true or false. And when user come back from the search item to your activity or to your view controller, you can also check like user has made it true or false. Yeah, then you can add several keywords which user want to search for something. And then you make that activity as a current activity of the user, which will actually disable the previous activity whatever user was doing. So this is a simple code to add a user activity. And yeah, basically this is the one we call when user tap the activity reason. So this is the action you take. So you search for the activity type for simply adding an item. The type is item action type. And the one we defined ourselves, the one we defined with the unique identifier, you can just check with the unique identifier and just do the action what you want to do. And user info, activity or user info will give you the information you actually passed through the searchable item. So yeah, when debugging, when you try to implement this spotlight feature, you can just delete the previous one because sometimes it cache and maybe you keep going to the previous view controller. So you might want to delete the previous cache item and then re-input the items. Then yeah, of course, please make a check for core spotlight available because it's only available after iOS 9. And you can improve the ranking of your app using like navigation to phone calls, navigation and phone calls actions. Let's say you have a social networking app. You can use the phone calls or navigations and it will actually, one of the metrics used by Apple to increase the ranking. Yeah, also keep your content current because let's say most of the time you update the app, contain the app and your previous content is not there. So definitely it is not going to search for your app anymore there. Or even if you search, your user will not be able to take the action what you wanted them to do. And don't spam the index. Let's say you just put like 1000 or you can, I'm not sure what's the limit for keywords there but yeah, Apple will definitely find out like if you're putting like every single keyword there to make it searchable and they will rank you lower in the search. And get to your content fast because that part is time. Let's say I'm searching for food or something. Yeah, again it shows me. Let's say, yeah. So yeah, it should immediately bring me to this page. What some developers do is like they show an error in between before the transition. So just to capture the user at event and all. So yeah, Apple actually tracked that part and as fast as you bring the user to the actual content your ranking for the searching goes up and your results will be at the top. So yeah, basically that's all about it. That's a very simple thing, of course, but you can use it to make your private content searchable and yeah, increase your user. Thank you so much for sharing. Does anybody have any questions from here? Okay. Next up we will have a quiz.