iPod Touch – Check if Camera is Available

Previously my first iPhone Application was rejected by Apple App Store. That application has a feature which allow users to take a photo or select an existing photo in the gallery.

As iPod Touch does not have a camera, the application crashes when user decide to take a photo. That’s why App Store rejected it.

So i have to check if the camera of the device is available. The following piece of code can do.

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
	// If camera is avaialble
else {
	// If camera is NOT avaialble


Done =)

Reference: Checking iPhone for Camera Support and Video Recording

2 thoughts on “iPod Touch – Check if Camera is Available”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.