IOS9 Search API's Spotlight

Source: Internet
Author: User

iOS9 There are three kinds of API to provide search methods to enhance the way users follow our app and related content

Nsuseractivity

Web Markup

Core Spotlight Usage

The first two kinds of practical operation is not strong enough (follow-up) Here we first talk about the spotlight implementation mechanism and method analysis

IOS 8 When Spotlight can search the application name, iOS9, enhanced the depth of the search function, that is, you pre-set in the mobile phone "buried point", can be in the search, display to the user, when the user click on the exposed search results will be based on the need to wake up the application/jump to specify the page and other operations.

That is, this feature will only take effect if and only if you open the app at least once to trigger a bury operation.

Operation mode:

1. Introduction of header files using frame Corespotlight.framework#import <CoreSpotlight/CoreSpotlight.h>

2. To create a search data model, this completely depends on the general Model:title,content,iconimagepath,type

3. After loading the application to cache the spotlight data source, the premise is very simple system specification is not less than iOS9 or will hang up, such as the reason of the null pointer.

In other words, only iOS9 more than the use of the feature will be enjoyed, the same article said Universal links

Then, in the Appdelegate callback method to do the corresponding action, such as triggering jump to the specified page of the operation.

On the code:

1.

As I made the mark, here Nsactivity's property userinfo the only operational key-value pair inside

[@"kCSSearchableItemActivityIdentifier" :value]

So if there are any specific parameters to use in the triggering operation, embed this value.

Recommended multi-measurement is not the lower version of the system pit, I do not have iOS 9 under the real machine, write this article when not measured, if you feel there is a problem can write me a comment. I will also correct the content of the blog when I really use it.

:(I inserted a plist file, such as I can search for stomach ache, stomach ache content for example)

Then click to jump to the app whether it's pending or launching the app if a page is specified, it jumps to the specified page

Https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html

Http://www.cnblogs.com/CocoonJin/p/4703366.html?utm_source=tuicool&utm_medium=referral

Http://www.cocoachina.com/ios/20150819/13116.html

http://www.ithao123.cn/content-10752357.html

Mdsa.51cto.com/art/201507/484497.htm

Http://www.csdn.net/article/2015-07-16/2825222-search-apis

IOS9 Search API's Spotlight

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.