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

  • SEARCH
  • Home
  • 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 5974575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:57:43+00:00 2026-05-22T20:57:43+00:00

In my app, I have write this code for capture video -(IBAction)takeVideo:(id)sender { [self

  • 0

In my app, I have write this code for capture video

  -(IBAction)takeVideo:(id)sender {

        [self startCameraControllerFromViewController: self

                                        usingDelegate: self]; 
}

    - (BOOL) startCameraControllerFromViewController: (UIViewController*) controller usingDelegate: (id <UIImagePickerControllerDelegate, UINavigationControllerDelegate>) delegate {

        if (([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == NO) || (delegate == nil) || (controller == nil))

            return NO;

        cameraUI = [[UIImagePickerController alloc] init];

        cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;

        // Displays a control that allows the user to choose picture or

        // movie capture, if both are available:

        cameraUI.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];

        // Hides the controls for moving & scaling pictures, or for

        // trimming movies. To instead show the controls, use YES.

        cameraUI.allowsEditing = NO;
        cameraUI.delegate = delegate;

        [controller presentModalViewController: cameraUI animated: YES];

        return YES;      }


    - (void) imagePickerControllerDidCancel: (UIImagePickerController *) picker {

        [[picker parentViewController] dismissModalViewControllerAnimated: YES];

        [picker release];   
 }

    - (void) imagePickerController: (UIImagePickerController *) picker didFinishPickingMediaWithInfo: (NSDictionary *) info {


        // Handle a movie capture       cameraUI.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];    NSString
    *mediaType = [info objectForKey: UIImagePickerControllerMediaType];
        if (CFStringCompare ((CFStringRef) mediaType, kUTTypeMovie, 0) == kCFCompareEqualTo) {



            NSString *moviePath = [[info objectForKey: UIImagePickerControllerMediaURL] path];

            if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum (moviePath)) {

                     UISaveVideoAtPathToSavedPhotosAlbum (moviePath, nil, nil, nil);
            }
        }
        [[picker parentViewController] dismissModalViewControllerAnimated: YES];
        [picker release];   
 }

compile and run this code, its working and
after taking video i pressed use button to save video then app is crashed and display “EXC_BAD_ACCESS” error msg on terminal

so, pls help me how to solve this error

  • 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-22T20:57:44+00:00Added an answer on May 22, 2026 at 8:57 pm

    In iOS 4 or later you can use an instance of UIImagePickerController to capture video. This is a fairly high-level convenience class, so the degree to which you can control the capture and then manipulate the captured video is limited. You might have to resort to lower level APIs available in AV Foundation.

    Once you have the video data, you should be able to attached it to your composed e-mail as a mime attachment. You simply need the video in an NSData object and must specify the MIME type for the attachment.

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

Sidebar

Related Questions

I have a vb.net web app, and I need to give my users the
I have a webservice method which takes an Id and then will kick off
I have a library method Common.addTheUsualStuffToTheModel(model) that needs to add various attributes to the
I'm making an Android app where the user can download files from a FTP-server.
I'd like to print only those IIS6 pools that are stopped or stopping (have
I'm trying to use sqlcmd on a windows machine running SQL Server 2005 to
[Apologies if my question title does not accurately describe my problem- if you can
Autofocus is not working on the first AVCaptureSession when I create a second AVCaptureSession.
I am using readability class to check network availability and it works fine with

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.