Implementing iOS camera upload - ios

Dropbox, Google Photo and other apps support something called "Camera Uploads" option. This uploads all new photos were taken by the device automatically w/o need to launch the application.
How to implement similar functionality? What APIs to use? Are there dev guides describing the solution or part of it?

Related

Image sharing in iOS

In iOS I noticed you can select a photo in your Photo app and then share it using other apps (eg. Whatsapp, Telegram, etc.). I would like to implement the same functionality in my app, but I don't know where to start. Can you help me? The things I don't understand are:
how my app can be listed between the apps that can share images;
how my app "knows" what to do when a user selects an image;
I know this is basic, maybe trivial, but I searched a little maybe using the wrong keywords, I dunno.
Any help is appreciated.
Here is a reference on accessing images iOS:
Open gallery with photos and videos
Here are some references on sharing images with iOS:
Sharing and Actions
App Extension Essentials

Integrating Live Photos in my app

I have some live photos that I am trying to use in my app. I am kind of confused on how to integrate them so I can use it in the app. I currently have an image view, but how do I add the live photo to it?
There is really no simple out-of-the-box API from Apple to integrate Live Photo in iOS apps.
That being said, there's an interesting article that has been going around lately which will explain what Live Photo is under the hood and how you can use it.
PHLivePhoto & PHLivePhotoView are available in iOS 9.1+
https://developer.apple.com/library/ios/documentation/Photos/Reference/PHLivePhoto_Class/index.html#//apple_ref/occ/cl/PHLivePhoto
https://developer.apple.com/library/ios/documentation/PhotosUI/Reference/PHLivePhotoView_Class/
These should be all you need to support Apple's Live Photos in your app.

Is it possible to take a photo with an iPad from a web page?

I'm building a web intranet app that will track inventory and I would like to be able to take a photo of each item using the built in camera from an iPad. Is this possible?
I've done a similar thing with barcodes using an app, but I haven't found anything that will do the same with a photo yet.
This stack overflow question may help:
HTML5 Camera Access Through Browser in iOS
#user295691 writes:
In IOS6 apple supports this via the < input type=file > tag. I
couldn't find a useful link in Apple's developer documentation, but
there's an example here
http://www.aaronlumsden.com/articles/ios6-the-benefits-for-html5-web-app-development/
You can use PhoneGap framework to achieve this. JavaScript is used as bridge between Web app and Native functionality.

Is it possible to add an app to the native share dialog?

I am assuming it is not possible to add apps to the native share dialog, like the one used in the Camera Roll. However I see screenshots around with different apps in the dialog.
Is it only apps that are integrated in the OS that can be in this dialog? Or is it possible with some scheme or something?
I have researched the possibilities of UIDocumentInteractionController mentioned by 'The Tiger' and came to the conclusion that it is not possible.
I have looked at the Apple Documentation, declaring the Document Types in the info.plist works for other apps but not for Mail, Images / Camera Roll / etc; the native share dialogs.
Edit:
I really don't get the downvotes....
Here are some references that say it is not possible:
https://devforums.apple.com/thread/140939?tstart=0
why-cant-i-register-my-ios-application-to-handle-the-image-file-type
register-app-to-open-image-files
associate-audio-and-video-types-with-iphone-app
add-a-file-association-with-tiff-files-on-ios
associate-image-file-types-utis-with-ios-app-doesnt-show-open-in-in-m
You need to subclass UIActivity to achieve this.
Theres an example for Dropbox:
https://github.com/goosoftware/GSDropboxActivity
Register your app as supporting the file types that you want to open and add the code to open them. See Document Interaction Programming Topics.

Upload file from iPhone media library, in 2012

I'm about to launch a service where one of the feature is to upload files with an 'upload' button on a website. Some years ago, I made some program for iPhone, and I remember that it was impossible to upload an MP3 from the library, because each app is in its sandbox, though I was able to upload MP3 placed in the sandbox itself.
There is an old post on SO about the impossibility to upload from the library to a website:
A html5 web app for mobile safari to upload images from the Photos.app?
Is possible as of may 2012 for an iPhone/iPad to be prompted into the music library when clicking on an html upload button?
I don't think things will evolve in your way on iPhone.
I assume your service will not be in native objective-c.
look at the features of phonegap to see what interactions are currently possible :
http://docs.phonegap.com/en/1.8.0/index.html
You can probably develop a dedicated app to extract the music file using the Media Player framework and send them to your service, but I barely doubt it can pass the apple verification team.
Apple will not allow you to do this. Although it may be possible using private APIs or perhaps the Media Player framework, it will not be accepted by Apple.

Resources