IPhone No photo album saved on iPhone

I am using the iPhone 2.0 SDK. I used the UIImageWriteToSavedPhotosAlbum API to save the image. The Saved Photos album is created on the iPhone Simulator when I save the image, but it is tested on a device that is added to the Camera Roll album. No errors occur during debugging, but the album of saved photos is not created on the device.

0
source share
2 answers

These are just different naming conventions between the simulator (and I image iPod touch) and the iPhone. Since the iPhone has a camera, the saved album is called "Camera Roll." Since the simulator does not have a camera, the saved album is called “Saved Photos” (or something else).

Using UIImageWriteToSavedPhotosAlbum () should write the photo to the corresponding album.

If the image is saved in Camera Roll on your iPhone, then your code works correctly.

+4
source

Depending on your device, you may need to use a photo library. Try the following:

UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; if ([UIImagePickerController isSourceTypeAvailable:sourceType] == NO) sourceType = UIImagePickerControllerSourceTypePhotoLibrary; if ([UIImagePickerController isSourceTypeAvailable:sourceType] == YES) { // acquire image } 
+1
source

Source: https://habr.com/ru/post/907827/


All Articles