I know my app can read the photos saved in iOS photo-library; also my app can save a new photo in the default iOS photo-library. But what I am trying to achieve is something like this: the default Photos app should be able to send a photo to my iOS app, just like you can share a photo to Facebook or send to iOS Mail app.
I want my application to be listed in this screen. Note: this is a screenshot of iOS6 Photo application.
POSSIBLE!!!
This thing is very interesting on iOS.
You have to tell iOS what kind of files your app can open (see pic below)
Kind of file your app can open will be set by Conforms To
field
(see all kinds
https://developer.apple.com/library/ios/documentation/miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html)
This is a best sample about it (http://www.raywenderlich.com/1980/email-tutorial-for-ios-how-to-import-and-export-app-data-via-email-in-your-ios-app)
You have to implement -application:handleOpenURL:
in AppDelegate
-(BOOL) application:(UIApplication *)application handleOpenURL:(NSURL *)url {
//url is a local url of photo you've chosen, iOS copied it into document folder of your app
//do what you want
}
================================================
If you want to see how some app (Dropbox, GoogleDrive ...) can open some kind of files, you can see their info.plist
files
Good luck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With