Hi,
I'm testing the IosImagePicker plugin class from Andy Bower
@bowerandyBefore setting the sourceType to the picker (setSourceType(sourceType)) Apple recommends to ask if the sourceType is available by means of calling the isSourceTypeAvailable method of the UIImagePickerController class.
Apple says you never have to assume that a device has a photo library, even if the device has a library, this method could still return NO if the library is currently unavailable, or the device simply has no camera (if you're trying to set it):
http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/PickinganItemfromthePhotoLibrary.htmlHow could be improved the code for the IosImagePicker.lua to have this method into account?
Thanks,
David.
Comments
I'm assuming, because you mention IosImagePicker.lua above, that you are using the Hot Wax version of the image picker and not the ObjectiveC plugin that I wrote sometime before. If so, you can easily test a particular source type is available by adding these methods to IosImagePicker:
Best regards,
David.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989