accessing ios photos and uploading to a webserver - ios

I am trying to build an iOS application that will display all of the iOS device's photos in a view. The user should then be able to click each photo to select (multiple selections allowed) then after selecting, upload the photos to a webserver.
Is it possible to access the photos that are controlled by the Photos application? Does anyone know of any efficient way to get access to the photos (third party framework) and/or a tutorial?
Thanks

Apple's developer site lists the Assets Library Framework as a way "to access the pictures and videos managed by the Photos application." The documentation there is fairly extensive, and looking around the dev site more should yield several tutorials and example apps.

AFAIK you can't grab all images from camera roll and use them in your app but you can have a UIImagePickerController that lets the user choose the image from their camera roll and a delegate is fired when they select one (or take a picture depending on how you set it up) then you can use that image in your app.

Related

React Native IOS Block Photo Library Access

I have been researching this for serval days and have not found the answer. Is there a way to block access to Photo Library on IOS. I have an app that contains a web view and in that web view there is an option to upload a photo. I would like that option to not appear and only appear the take photo option (In this image take photo does not show because it was taken from my simulator).
There is a handy package for the same called react-native-image-picker.
It allows you both to take a photo and access library unless the user does not grant access.

How to download a 3D model from a website and load content into ios app using Swift

Can someone explain the process involved to allows users of my app to visit a website using Safari to download 3D models and subsequently launch the app for the users to view the models. I am currently working with Scenekit to visualise 3D models that have been pre-loaded at build time, however I would like users to be able to access 3D files dynamically after they have uploaded them to my website. After some initial research, I believe Universal links may direct me in the right direction, however I cannot find a suitable source that supports downloading files using these links. An example of the desired functionality is below (screenshot taken from another app).
The user visits the website and downloads the 3D model.
After pressing the download button, an alert pops up and allows the user to launch the app. In doing so, the 3D model is downloaded into the app.
Thank you in advance.
You can use for it Universal Links, or Deeplink. iOS will detect this action and offer to you open in app. But remember, app MUST be installed on your device, otherwise it goes to AppStore to find your app.
So u can put into download URL your 3D model and send it by Universal Link.
Here is documentation from Apple how to use it.
https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content

How to get images from email or desktop into iOS app?

I know this is a very basic question, but something I'm never quite sure of, is how do you get images from say your email, or from your desktop (say a Mac) into your iOS app?
Let's say I develop an app and I want people to be able to put their company's logo into it, how would they do that? I presume they don't have their company logo in their phone, so how would they get it from another source into the app? If they linked to it on the web, wouldn't that just open a UIWebView to show it? i.e it wouldn't load the actual .png from the web direct to be used by the app or would it?
So, to avoid long comments, I'm putting my answer here, although this is a very general question.
The common thing with all the apps that want an image input, is that they require the user either take a photo with their phone camera, or grant access to the photo library, so that the user can select an image and upload it to the app. If you have used any of the photo-involved apps these days, you should be familiar with this. Example is Instagram, Facebook, Flickr, etc.
However if you really really want to let the user download it off the internet through your app, then you should embed a web browser in your app, allowing the user type in a URL and save the file in that URL to the documents/downloads folder in your app, and then allow them access those folders to browse and upload stuff. A good example of this kind of app, is "NuageApp" which is actually a client for the Cloud App. It's really handy to deal with file sharing the way NuageApp (funky name, huh?!) does, however it's far more complicated to implement that, than the access to the photo library.

How can I load images received from iMessage? [iOS7]

I am trying to load the images received from a contact in iMessage, but I have not found in iOS SDK to do this.
Load the contents of incoming iMessages.
Load the images received by iMessage.
Someone who knows how to help me?
This can not be done with on iOS with the iOS SDK. Due to privacy concerns Apple does not allow access to any messages received via the messages.app.
If you're looking to pull images directly from the Messages app, then no you can't do that. If however, you're okay with only viewing the images that the user has chosen to save to the camera roll, then yes you have a few options.
You can use the UIImagePickerController class to allow the user to select photos from their camera roll, or the AssetsLibrary Framework to get references to these images without the user selecting them. Both solutions do require the user granting you access to the camera roll though.

What is the equivilent to a ContentObserver in iOS?

I use a ContentObserver in my android application to receive a notification whenever a photo is taken. Obviously iOS doesn't use the intent system, so is there an equivalent or alternative way to do this? I would prefer not to write a full camera application if possible.
This is not quite possible. Even the latest Google+ application on iOS, with its Instant Upload feature does not get notified when photos are taken, it simply checks the asset library while the application is running, and then as long as possible while running in the background before getting timed out by the OS.
The following is from the Google+ help on the matter:
Note: Photos and videos will upload while the Google+ application is
open and for a brief period of time afterwards.
HTH
You cannot run in the background and get notified when a picture is taken and saved to the Camera Roll by another app on iOS.
That said, you don't really need to write a whole camera app to be able to let the user take pictures from within your app, or to access Camera Roll from within your running app.
Take a look at UIImagePickerController. It is really easy to let the user select or take a photo on iOS.
There is no equivalent to ContentObserver in iOS.

Resources