My app is working good on iPhone 5 but has a problem in iPhone 4 with the same iOS 6.0.
The problem is: When I try to open the photo gallery this issue came “This app does not have access to your photos and video”?
How can I solve this in my application programmatically?
There is nothing in the app what you could do.
The first time you attempt to access the library iOS will ask the user whether the App may access the library/photos or not. In your case the user using the iphone 4 tapped on ‘no’.
At the same time an entry is created in the settings/privacy/photos/ with the display name of your app and your small settings icon (if you provided one – otherwise the standard icon will be shrinked automatically)
Go there and switch from off to on.
Do not expect this switch to take effect while the app is running. Along with the address book, not the photographed, I even observe some crashes when this setting is changed while the app is running.