I'm making an Apple Messages app clone and am currently mimicking "New Message" design. I have a UITableView (to display the results) with a UISearchController (to search for contacts).
I'm trying to find the best way to search through a user's contacts on their phone while their typing.
The function CNContact.predicateForContacts allows me to search for contacts by either a name, phone number, or email address. But, I'm unsure if this is an efficient method because the search needs to be like the Messages app; where a user starts typing typing it searches for multiple matching fields and displays those results almost instantly. For example, if a user types in a letter, it will search for matching names and email addresses or if they type in a number it will search for matching names, phone numbers, and emails with.
What is the best practice to do this?? I looked at everywhere and even watch Apple's WWDC 15 video on contacts to find the best way for this but have not found a concrete explanation / answer.
Related
Is there currently a way to query the Microsoft Graph for contacts by phone number. I see that it is possible to filter contacts by the 'mobilePhone' field, but not by 'businessPhones' or 'homePhones' fields. Any way to search in all those fields at once? That would be handy!
It doesn't look like there's a way to do this currently. It doesn't look like filtering is supported on those collections. We'll need to go back and see whether we can add filtering support for these attributes.
it looks like at this website https://sensortower.com/ you can easily get the keywords an app publisher inserted when he submitted his app to Apple Store. I searched the docs (http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html) of the Itunes Search API but I could not find any way to get the keywords. How did the do? Am I missing something important?
As far as I know, you cannot query for keywords.
What I think they do (and I am pretty certain) is that they query the app store regularly against a database they hold.
This database might hold keywords based on the descriptions and app titles of existing apps (basically just all words mentioned there). With this information they create random search term combinations and query the search API with it.
Afterwards they "guess" the app's keywords according to the position the app gets in the result list with the specified search terms. The higher its ranking the bigger might be the chance that it actually uses one of these keywords.
Using the iTunes search api for app search, is it possible to pre-filter the results, so that the search terms get applied to a specific set of fields? For instance, the title. I am sick and tired of not finding anything, just because it is buried within the results, and some other more popular, but completely irrelevant app appears on top.
The iTunes Search API does provide this feature, the documentation is pretty clear on how to do this.
http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html
Look at the list of parameters you can append, the parameter you are looking for is "attribute":
The attribute you want to search for in the stores, relative to the specified media type. For example, if you want to search for an artist by name specify entity=allArtist&attribute=allArtistTerm.
In this example, if you search for term=maroon, iTunes returns "Maroon 5" in the search results, instead of all artists who have ever recorded a song with the word "maroon" in the title.
The default is all attributes associated with the specified media type.
I need to add a very common Google functionality to an iPhone app I am developing. The idea is that the user is presented with a TextBox where he can write an address (i.e.: "Amsterdam av)". The thing is that I want to add some "help" for him, se when he writes a street name, the app will show him a list of partial matches, like google Maps does here:
sample http://www.timotteo.com.ar/google.png
I canĀ“t find the exact class in the google API. It doesn't need to be as fast as google's own search, maybe the user can write "amst" and press a search button, to be presented with a list of partial matches. The API I'm looking for show return in some way a list with posibilities. All I could find for now where method that gives you the lat/long when you feed it with a specific address. Does somebody know what combination of methods/classes I should use? Maybe some example?
Txs in advance!
Perhaps you are looking for the autocomplete feature of the Places API:
https://developers.google.com/maps/documentation/javascript/places#places_autocomplete
This won't autocomplete for all addresses or streets, but rather for businesses, notable landmarks, etc.
If you want autocomplete for street addresses, I do not believe that is available through any documented APIs. That doesn't mean workarounds don't exist, but they may depend on more details about your use case. (For example, if you only care about a narrow geographic area, it may be possible to simply have a list of all the streets in your own database and handle the AJAX call yourself.)
Actully what I was looking for is this:
http://maps.google.com/maps/geo?q=amsterdam%201543&output=xml&oe=utf8&sensor=true&hl=es&gl=ar
That URL returns and XML with all the autocomplete options. All I have to do is parse that XML and voila! There I have my list.
I am working on a erp system, being developed using Ruby on Rails. I want to create a sales order by reading the contents of the email. I can recognize by reading the contents if its a sales order or inquiry.
Now a step forward I want to read email and fetch the items in the list. I am planning to take words from the email and search them in the database under items. I can't fix a certain format for the email.
I am going to use following approach.
I'll be using ferret(initially, may switch to sphinx or similar) to search the items in the emails content.
1). Loop through items table and search them for exact phrase match.
Email.find_with_ferret("item+name")
2). Search email for item name split keyword. Email.find_with_ferret("items nice name")
3). Fuzzy search Email.find_with_ferret("items nice name~")
Please help me to improve this.
You're going to need to intercept the emails with rails. Here's a decent article explaining the various approaches to doing this:
http://steve.dynedge.co.uk/2010/09/07/incoming-email-in-rails-3-choosing-the-right-approach/