Is it possible to search for objects in Photos? - ios

do you know if it's possible to use the Photos Framework to search for specific photo categories (auto-generated by Apple's ML) in iOS 10?
For example, I'd like to get all the photos with a car in them.

I haven't found any reference regarding this in Apple developer documentation. I have a feeling that this Photos app inbuilt feature we see in iOS10, hasn't been made public facing yet.
I did find this article covering the different categories someone found out: Photos ML categories
Hopefully, in WWDC this June we will have more access.
Kind regards,
Mukund

Related

Method of integrating a certain persons Twitter account into iOS App

In my app so far, I have to implement all the Twitter posts from a certain individual into a table view, and it automatically updates when the person tweets a certain post. Is it possible to mention a certain individual e.g. #John.. If it is possible, how can I do it? If not just let me know and I will delete this question as it could be too ambitious. Thanks!
I don't quite understand what you mean. I do a little!
There is a quick and easy way of doing this! One easy way is to use Twitters own SDK called Fabric. See Here
See this link for the timeline stuff and integration to your app Documentation
This should help you out!
P.S. Let me know how you get on!

User pick a contact from address book using new iOS 9's Contacts framework

With iOS 9 the old Address Book API will be deprecated and we will have to use the new Contacts framework for any contacts-related feature.
My question, is there any way to present a View Controller so the user can pick a contact the same way you did with the Address Book framework?
If not, I suggest a discussion about which is the best solution for that, as we will have to stick to this framework from now on.
I believe the solution you are looking for is CNContactPickerViewController. You can find the reference here. I also suggest watching the WWDC video about the new Contacts Framework, as there isn't too much information yet on Stack Overflow.
Sorry, but I do not know how to use NSPredicate in conjunction with this controller, and it is required.

Get PHAssets based on "Face" metadata

Using Photos in Mac users are able to tag people in photos. This data is then synced to the cloud where they can preform face searches in Photos on iOS. The type of metadata seems to be "Face". Is it possible to get all the assets associated with one of these faces? I'd like to grab all the images with a certain person in it. You are able to do it in the Photos search in iOS so my hope is that it is also open to other developers.
Does anyone have any ideas?
Thanks in advance.
Apple released an SDK for accessing Apple Photos called Photo Kit. In the documentation, you will find API access to the photos application and photos cloud. However, if you are looking for an HTTP API I do not believe one has been announced publicly.
If you only need access to is data on Photos MacOS app I would recommend digging through the SQLite photos.db located in the photos library database directory.
/Users/[yourUserName]/Pictures/Photos Library.photoslibrary/database/photos.db
I am working on a project this weekend that requires similar face data and will document my progress. Here is a sample SQLite query you can use to get all faces, photos, and corresponding person:
SELECT *, RKFace.modelId AS fId
FROM RKFace
JOIN RKMaster ON RKMaster.modelId = RKFace.imageModelId
LEFT JOIN RKFaceGroup ON RKFaceGroup.modelId = RKFace.faceGroupId
LEFT JOIN RKFaceCrop ON RKFaceCrop.faceId = RKFace.imageModelId
LEFT JOIN RKFacePrint ON RKFacePrint.faceId = RKFace.imageModelId
LEFT JOIN RKPerson ON RKPerson.modelId = RKFace.personId;
I hope this helps. :-)
There is no API for that kind of stuff on iOS at the moment.

How to filter spotlight tracks in soundcloud API

I'm currently working on an iOS app using the Soundcloud API, and it's working great so far. Something that I haven't been able to figure out, however, is how to construct an URL in order to get only the tracks pinned as spotlight tracks from a certain user.
For example, let's say I'm using the following URL:
http://api.soundcloud.com/users/username/tracks.json?client_id=mySecretId
I've carefully gone through the API documentation at developers.soundcloud.com/docs/api/, but it feels like there's a subresource I'm missing.
I'm aware that I can use the created_at filter to show the most recently added tracks, but if I'm understanding the platform correctly, a spotlight track does not necessarily have to be one of the most recently added?
I would be ever so grateful for feedback on this subject!
Cheers
/Anders
Spotlight is not available via public API, sorry.

iOS discussion board / comments board API or sample?

I'm trying to find examples of code libraries or sample code for adding a commenting functionality in my apps. I've successfully implemented the Disquser iOS wrapper (http://bit.ly/iadisquser) in a couple of my apps but find it difficult to manage. I've seen other apps that incorporate a commenting feature that's cool, including theCHIVE Lite app, that looks like its using Facebook maybe?? Any hints or suggestions?
Look at QuickBlox Custom Objects code sample. I think it's what you need.
It represents user's notes, which he can create & comment. So, you can implement this comments logic into your apps and comment any item you want
There's a good tutorial for building a chat app that may help you get started, you can find it here: http://www.ibm.com/developerworks/library/x-ioschat/index.html

Resources