Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3319128
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:47:17+00:00 2026-05-17T22:47:17+00:00

Hi everyone I am trying to make a camera app. I am doing this

  • 0

Hi everyone I am trying to make a camera app. I am doing this as

picker.sourceType = UIImagePickerControllerSourceTypeCamera;

where picker is the object of UIimagepicker Controller.

But when is run the code then the application terminates showing the error.

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘Source type 1 not available’

I am using this on simulator. I know that it is not possible to check camera in simulator, but we can test for that. I think it might be that because camera is not available thats why it’s terminating.
But I saw an application with the same code but that was running on the simulator, just showing the camera view.
Just help me out how to resolve this problem. And moreover how can I put my custom view to the camera in that app?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:47:18+00:00Added an answer on May 17, 2026 at 10:47 pm

    You need to check if the device has camera available before setting the sourcetype.

    The following can check if device has camera available.

    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])  {
    }
    

    You can’t check the camera functionality from your simulator. You can assign UIImagePickerControllerSourceTypePhotoLibrary as the sourceType to test on simulator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey everyone, I am trying to run the following program, but am getting a
Hi everyone, I'm trying to make my application support Logging but I'm very new
Hey everyone. I'm trying to make a swing GUI with a button and a
I am trying to make a simple experimental app. I'd like for it to
Hope everyone is doing well I am having a problem with make files in
Hello everyone I'm trying to make a flash uploader. The issue however that has
Hey, I am trying to make my datagrid printable. To do this, I am
Hello everyone I'm trying to make a jquery Menu just like the one in
Hey everyone, a new guy here in C#.Net. I'm trying to make an application
Hey everyone, So, I'm currently trying the implement the APNG Specification , but am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.