Objective c - How to check if the photo metadata has been changed - ios

I am developing in-House iOS app with objective-c for capturing images and I'm depending on photos metadata to get the correct locations and dates, but the new iOS versions allow the user to adjusting and changing the whole photo information, and our field staff able to changing the photo metadata with fake details.
The only ways that can protect the informations:
1- How to check the photo if metadata has changed or not, and refuse the modified photo.?
2- It possible to create configuration file to make all photos with read-only?

The photo library, accessible through the Photos app, belongs to the user — not to you. So if you don't want the user to have normal powers over these photos, then don't store them in the user's photo library.

With other objects on iOS (I'm thinking of contacts in particular) you can store metadata of your own in Apple's database. I don't think that's the case with photos, sorry.
You could perhaps require your users take the photo in your app and store the location in a database of your own. You might be able to store the photo in the photos database if that's something you want.

Related

In a iOS app, how to share photos with another iCloud user without sharing the full UIImage, having iCloud handle this?

Many thanks for your help. I am developing an application in Swift for iOS 12+, using Xcode 11. It is a travelling application, and has a "Trip" Core Data entity. Each trip can hold notes, and I would like to use this library, ZSSRichTextEditor, to let the user edit and store the notes in rich text, optionally containing images. As it is, the library can insert images as links on the internet, or from the user Photos library. When using the latter option, the library takes the full UIImage and encodes it as base64, then it inserts it in the WKWebView that the library uses under the hood. Here comes my problem. I would like to let users of my app share trips between them, but I would like to not include the full pictures in the shared trip file, but references to the iCloud photo. Can somebody suggest a possible implementation ? Many thanks.

IOS photos privacy and image upload process

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 .

iOS 8: Storage Provider extension allow for importing photos? Could it allow for photos to get inserted into iMessage?

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.

ios : How to get photo url which is deleted in photo.app

I am having issue in my app, the app is photo related,
In my app I have required photo url which is deleted via Photo.app, is there any way to find in our app that which photo is deleted in photo.app
Thanks in advance.
No practical way, I suppose you could iterate over the photo library before the deletion and then iterate over the photo library after the deletion to see what the changes were.
I do a similar thing in my "Chanda" app. The photos are stored in iPhone Photo Library and a link is stored in the database. I believe that if you delete the photo from the Photos app then you will get nil or something when trying to fetch the photo.
Link a picture taken on my app

accessing ios photos and uploading to a webserver

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.

Resources