I work on a sports app, and we'd like our users to be able to use spotlight to search for teams, players and leagues. When they tap on a search result it will open the app the relevant screen. We already support this mode of entry via push notifications, url schemes, etc so the mapping of identifier to screen isn't a problem.
What I'm wondering is how to best go about adding all of our content to Spotlight's index.
I've made a sample app that fetches each team in the app on first launch and creates a CSSearchableItem for it. This works fine, but I have a few concerns:
- We have hundreds of teams, and thousands of players. Is this the appropriate kind of content to be indexed?
- Is this brute-force populating of the search index appropriate, or will it have performance implications?
- Should we be using NSUserActivity instead? We use them already for handoff, but am I correct in thinking that each NSUserActivity will only be indexed when the screen is first visited?
- We have a public website that maps pages for each team/league/etc to screens in our app, will having the site opt in to the web crawler APIs be enough?
Thanks!