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.
Related
I am an iPhone user and typically, when you want to upload a photo to an app, there are three steps:first, the app checks whether it has permission to access albums and if it does not ,it will ask you to give permission. Then, you will be presented with an interface from which you can select a photo from the album, and finally, you press a button to upload the selected photo to the app. Previously, I thought the app can only access the photo that the user selects, but then I saw this answer:
https://apple.stackexchange.com/questions/107404/is-it-safe-to-allow-apps-to-access-your-photos
which says: "When you give access to an app to photos...it can read all your photos on the device in an unencrypted form." "For example, once you give permission, iOS apps for popular services like Dropbox, Facebook, Flickr and Google+ can upload all your photos to their services. With iOS 7, these apps can also be allowed to do it in the background (when you're not actively running the app). Most users wouldn't even actively know which photos are being uploaded and when."
Millions of people are using ios system and many photos in the albums are private, including but are not limited to images of having sex, images of getting drunk, etc. so I think the most appropriate design is to let the app only access the photos that users selected, not all the photos on the phone. And I think a lot of users, like me, believe that when you give an app permission to access the album, it can only access the photo selected by users, not every photos on the device.
Since I'm a programmer(but not an ios programmer), I take a look at the ios documentation, and I found a class called UIImagePickerController. I believe it is through this class that the app gets a selected image from the user, so it seems to me that an app can only access the selected image. But on stackoverflow I also found an answer about how to select all photos from the device: IOS Photos framework
So my question is, if you give an app permission to access the album, can it only access the photo users select from UIImagePickerController, or every photo on the device?
Once a user grants permission to access the photo library, that iOS app has complete access to every photo in the user's photo library. The permission is not for a specific photo. And UIImagePickerController is only a graphical means to allow the user to select an image. There are APIs that allow the app to access any photo without user interaction. And all of those APIs are covered by the one single permission to allow access to the photo library.
#rmaddy is correct that the user grants permission to access the entire photo library on the user's device. However, note that iPhone users have the option of hiding photos by viewing the photo and tapping the share button (Tap share and select Hide.) See Apple support article .
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.
The documentation for the Storage Provider extension only refers to documents and files. It's not clear if it works for images and photographs. For instance, could an app create an extension that gets invoked in iMessage when the user taps the camera icon to insert a picture from the Photo Gallery?
It depends on how Apple implements the iMessage photo picker. If they go through the document picker API, you will get a chance to provide images. If the use the photo picker view controllers, however (PhotoUI framework or otherwise), you will not be able to.
Apple is most likely to go through the second route, but if this is an important feature for you, make sure to file a an enhancement request with Apple and post the radar number here so people can duplicate.
As of beta 2, Apple does not use the document picker API, so you will not be able to add your own data source for images if the Messages app does not change.
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.
I'm making a quest (for iPads) and would like to use QR codes that users have to scan and then do certain tasks: The user scans the QR code, which links to a text that asks them to take a picture of a certain object and a button that opens up the camera, once the picture is taken it is saved. I was thinking of a blog, where images can get uploaded once they are taken, but they could as well be stored on the iPad. I haven't found a solution using blogs, as taking an image can't be prompted, any idea how it could be done?
Thanks
Not really possible with a web app. You could have the link in your QR code point to your native app’s custom URL scheme, as in myapp://whatever, and then both get and upload the photo through that app, but what you’re trying to do isn’t possible through Safari.