Find related audios via Keywords - objective-c

I'm starting to implement an iphone application, that contains audio lessons.
my application is connect to calendar and map, so it takes from the user (places, appointment or meetings) that he wrote in Calendar or checked-in in map.
Then, I will display related lessons to him.
My question is: Is there any algorithm that can be user to find related lesson.
note that each lesson contains keywords and I want to match them with user input.
Thank you and I appreciate any kind of information that will help me :)

i'd just create a separate database which contained an array of keywords and somehow specified its associated audio file resource. IOW, NSArray and NSString should make this pretty quick to implement yourself.

Related

How to supply data for search bar suggestions

Basically I'm working on my personal project, and I'm building a react native app that serves a very similar purpose to that of eBay's or Gumtree or the like. Users can obviously search for a product, I want to show search suggestions based on what the user types. Search engines usually show suggestions based on what is also being searched by other users, or what data is already is already posted on the site.
Since this is a personal project neither of those two cases apply. I need a way to still provide suggestions to user searches.
One way I tried doing this, is by finding a txt file with a bunch of product names and filtering through that based on user search.
I tried doing the same approach but by using an API instead of a text file.
I couldn't find any resources for either of those 2 methods, so I don't really know what to do
Any suggestions or references to material would be greatly appreciated!

Best way to deal with IDs only containing numbers

We're trying to display some booking information to the users and we're asking to them the ID which has a 10 length numbers format like this one: 1553296942
In the stories, we try to identify the user input with an intent called bookingStatus and a entity called uid.
Thing is, this IDs are recognized as a wit/location type (it looks like coordinates to him, I guess) and it doesn't recognize them properly most of the times.
What would be the best approach to handle this situation?
For now, in the Understanding tab we're feeding the bot with lots of these IDs, adding the intent bookingStatus and marking it as uid entity aswell. Is this the right thing and shall we continue training it this way?
You can feed with the 10-length numbers. Actually there are only 10^10 possibilities for the uid entity. You can basically feed the whole 10^10 possibilities with a simple CURL command which contains a loop to 10^10.
How do you feed your NLP without the Understanding tab? Well..
Check the HTTP API Docs here
https://wit.ai/docs/http/20160526#post--entities-:entity-id-values-link
Have a nice day!

Search Apple App store by genre with iOS/Obj-c

How would you use Obj-c to search the Apple App store to do the following...
Return the details of the top 100 in the games overall category or a
specific games category
Return the details of a specific games in the games category
Anyone?
Well, as far as I know you have two methods to search the App Store:
Search API;
RSS feed generator.
There are many differences between those but the most relevant for your example is that with the Search API you cannot sort the results as they come sorted by relevance and it requires always a search term. The RSS feed generator already has Top Free, Top Paid and Top Grossing categories for you.
Given this I'm going to start answering your question for the RSS feed generator.
You use the RSS feed generator to generate feeds like this for the top 100 free games in the US store: https://itunes.apple.com/us/rss/topfreeapplications/limit=100/genre=6014/xml;
Take a loot at this link to get games sub genres;
You use NSXMLParser library to parse the RSS which already includes the app details.
You may use the initWithContentsOfUrl: method of NSXMLParser;
A quick how-to for this part can be found here.
You can also use StoreKit to get the details of the apps by their ID or show a modal view controller with a specific app but that will require an extra network request.
For the sake of completeness I'll also cover how you can use the Search API.
Use the Search API to create a URL that describes your search:
A URL like this allow you to search for apps with that matches "angry birds" - https://itunes.apple.com/search?term=angry+birds&media=software.
Process the results using NSJSONSerialization library. That already includes the app details.
Take a loot at this tutorial on how to use the NSJSONSerialization library.
In the end, as #Numan said, this two methods accomplish different things. You said you wanted to have the top 100 games from a specific category and also said you needed to search for a specific game.
You can use my descriptions to create one class that interacts with the App Store in these two ways and return an object defined by you that describes an app (or an array of objects).
You can access this info by RSS, look here http://www.apple.com/rss/
Also you can generate RSS feed http://itunes.apple.com/rss/generator/

Is there a way to get Address Book contact ID's from Sync Services contact ID's?

When getting the modified contacts from Sync Services, through the applyChange:forEntityName:remappedRecordIdentifier:formattedRecord:error method. The IDs in the address book are of the form 2C13E20E-6B24-4090-81FA-7A1E8B28119B, and even though some IDs of this kind are present in the ISyncChange * object, those are not actual contact ID's that can be found in the address book...
Is there a way to find out from Sync Services what a certain contact's ID is in the Address Book?
The reason for asking is that when saving large pictures for contacts in the Address Book, Sync Services does not save those pictures in their internal data storage. Therefore, contacts that have been modified or added with a large picture will be returned by Sync Services without the picture, basically offering incomplete information.
I need to get the Address Book ID, so that I can look up the contact's picture in ~/Library/Application Support/Address Book/Images/
Thanks!
It's a bad idea to rely on the Address Book id relating to an image in ~/Library/Application Support/Address Book/Images/ - you'd be better off finding an API that provides you the data you want to work with, because you aren't guaranteed that the image will be there then, or later (after an upgrade, this could all change!).
After a small amount of research, it appears that the api you want is documented here : http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AddressBook/Tasks/AccessingData.html#//apple_ref/doc/uid/20001023-103617
It's a little unwieldy because you necessarily need to understand their ABImageClient protocol and provide a callback, but I don't think it's that bad. This approach is much better than what you were doing - it's the Apple sanctioned way of getting this data and you won't have to worry about it breaking in the future.

Address Book contacts in Core Data

What’s considered ‘best practice’ when saving Address Book contacts in Core Data?
I’m writing an iPhone App, based on Core Data, where I need to save and recall Address Book contacts as part of the data model.
In the UI I plan to present a screen where the user can pick a contact from the current Address Book, create a new contact to store in the Address Book, or just create a ‘one-off’ contact with no saved record, local to the App only. These contacts are tracked in the context of the orders they have made, and not all contacts will require saving outside the App itself.
It feels ‘wrong’ to copy the data from the Address Book if using an existing entry, but not sure what to do if an Address Book record is edited or deleted.
I only need to track name and photo for the purposes of the App, so gut-reaction is to store the ABRecordID, and—because these can apparently change(!)—the first and last name, and only update local record if it’s updated (how to track that?).
Or can you store a ABRecordRef directly? (I imagine they aren’t persistent?)
I’ve done some searching on Google, and here, but can’t find any code samples or discussion on the integration of Core Data and Address Book in this manner; just lots of stuff on each in isolation.
Any one with some experience/gotchas on this subject point them out, or point me in the direction of some more reading?
Thanks.
Andy W
I would store the ABRecordID and then handle the situation for when they change although I have not personally seen a case where they change except when the user deletes all data and restores it from another source (moving from MobileMe to Google for example).
See Apples online Documentation on how to handle changing ids and what to store.