如何在iPhone中搜索新的xcode应用程序中已安装的应用程序和内容文本?
我正在尝试使用 UISearchBar 在 iphone 中实现内容搜索。当我将 dataArray 作为字符串源时,我可以轻松地在该字符串中进行搜索。但是我想提供已安装应用程序的列表进行搜索,以便当我搜索时该应用程序将像聚光灯一样显示在列表中我无法理解如何给出搜索 dataArray 之外的数据的路径,或者如何搜索 iphone 中已安装应用程序列表的列表?
I am trying to implement the content search in iphone using UISearchBar. When i am taking dataArray as a source of strings,I can easily search in that strings.But i want to give the list of installed applications for searching so that when I'll search then that application will be displayed in the list just like spotlight search do.I cant understand how to give the path for searching the data outside the dataArray or how can i search the list of installed applications list in iphone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有两种方法可以做到这一点 -
a) 尝试应用程序的自定义 URL 并检查 canOpenURL 是否返回 YES。
b) 检测正在运行的进程并尝试从中找出应用程序名称。
有关详细信息,请查看 http://amitay.us/ihasapp/index.php 。
但是,请记住,Apple 不赞成这种做法,并可能导致您的申请被拒绝。
There are two ways you can do this-
a) Try custom URLs for apps and check if canOpenURL returns YES.
b) Detect the running processes and try to figure out the app name from there.
For details, have a look at http://amitay.us/ihasapp/index.php.
However, keep in mind that such practices are frowned upon by Apple and may lead to the rejection of your application.
您无法在应用程序的沙箱之外获取/被允许,因此您无法获得已安装应用程序的列表。
You can't get/are allowed outside of the sandbox for your application, there for you can't a list of installed apps.