What is the path of photos album on iPhone device? - iphone

I was trying to save a PNG file to photos albums folder on the iPhone device with a .png extension so that the transparency remains..
My question is:
What is the path of photos album UIImageWriteToSavedPhotosAlbum function is using?
I am using data write to file method..
Thanks

You can't access assets on the file system directly (assuming this isn't a jailbreak question). In addition to UIImageWriteToSavedPhotosAlbum, the Assets Library Framework provides access to the photo library if you're targeting newer versions of iOS.

Root/private/var/mobile/Media/DCMI/100APPLE

Related

Creating a new directory in the photo library of iPhone using PhoneGap

I am currently developing an mobile app using the PhoneGap framework. I am just wondering if there is any PhoneGap APIs or plugins that will allow us to create a new directory inside the iPhone's photo library. So every time when a user is using my app to capture a picture, I can have it saved into that directory.
From my little knowledge, currently you cant create a new directory inside the iPhone's photo library using phoneGap
However you can save an image in to iPhone's photo library.
See the below code
save image
function runImageTest(img)
{
PhoneGap.exec("ImageHelper.saveToUserLibrary",img);
}
Please see the discussions here

Phonegap: Save a photo to a specific path

I'm using cordova framework to develop applications on iOS.
I need to save a photo (just taken) in a specific path, but cordova default sets it to localhost/var/mobile/Applications/.../tmp/cdv_photo_006.jpg while I want to save it in .../www/data/camera/cdv_photo_006.jpg
How can I fix it?
in IOS you have just just access to your app bundle(temp + document folder) at least in non-jailbreak iphone's and ipad's , so what you are doing is impossible.

How can I retrieve and copy all photos/videos from Photos app to my app programmatically?

How can I retrieve and copy all photos/videos from Photos app to my application programmatically?
You need to make use of ALAssetsLibrary for iOS 4.0–9.0, or the Photos framework for iOS 8.0 and newer.
I don't think it's possible - Apple doesn't allow access to the photo library. (although i'm sure there is a way through jailbreak/private methods, but it won't be sanctioned by Apple).
You can, however, save photos with UIImageWriteToSavedPhotosAlbum and pick photos manually from the photo library with UIImagePickerController.
EDIT: Actually, it looks like you can get photos using the Assets Library. Check out this tutorial.

Iphone - How to Read book file from device

I imported pdf file to iphone device using iTunes. I verified that the pdf file stored in 'root/user/media/books' path. Can i read this file in my program?
Is there any way to read the file? Please Help me.
Thanks in advance.
The SDK doesn’t provide any access to the books (including PDFs) in the user’s media library. For your app to read a PDF that was added via iTunes, it needs to be added to your app specifically, using the iTunes file sharing malarkey (look up “UIFileSharingEnabled” for more information on that). You can file an enhancement request with Apple to try to get them to add support for accessing the user’s book library, but don’t count on it.
Here is a guide on how to view a pdf on the screen. Here is a previous post about how to parse a pdf using CGPDFScanner. Hope that helps!

Access Photo Library without using UIImagePickerController

Everyone.
Is there any way of accessing photos on my iphone without using UIImagePickerController?
Can I somehow use NSFileManager for this purpose? If not then is there any alternative?
Best Regards.
The Assets Library Framework allows you to access the photos and videos managed by the Photos application, which includes those that are in the saved photos album, those coming from iTunes and those that were directly imported into the device
See the official docs for more information.
There's also a very good tutorial here on how to use it, including a video.