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 3497484
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:22:34+00:00 2026-05-18T12:22:34+00:00

Ok finally make my app to have setContentURL method. But now it’s break my

  • 0

Ok finally make my app to have setContentURL method. But now it’s break my app, and I am so close to the end 🙁
This is where code breaks:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
{
    // please work!!!

    NSString *title = [[NSString alloc] initWithFormat:@"bla bla"];
    NSURL *newURL = [NSURL URLWithString:title];

    [mp setContentURL:newURL];

}

This is method that is started when app is first time loaded, and it loads movie fine, problem in in call to setContentURL because thet is the point where my app crash:

- (void) readyPlayer
{
    mp =  [[MPMoviePlayerController alloc] initWithContentURL:movieURL];

    if ([mp respondsToSelector:@selector(loadState)]) 
    {
        // Set movie player layout
        //[mp setControlStyle:MPMovieControlStyleFullscreen];
        [mp setControlStyle:MPMovieControlStyleNone];
        [mp setFullscreen:YES];

        // May help to reduce latency
        [mp prepareToPlay];

        // Register that the load state changed (movie is ready)
        [[NSNotificationCenter defaultCenter] addObserver:self 
                                                 selector:@selector(moviePlayerLoadStateChanged:) 
                                                     name:MPMoviePlayerLoadStateDidChangeNotification 
                                                   object:nil];
    }  
    else
    {
        // Register to receive a notification when the movie is in memory and ready to play.
        [[NSNotificationCenter defaultCenter] addObserver:self 
                                                 selector:@selector(moviePreloadDidFinish:) 
                                                     name:MPMoviePlayerContentPreloadDidFinishNotification
                                                   object:nil];
    }

    // Register to receive a notification when the movie has finished playing. 
    [[NSNotificationCenter defaultCenter] addObserver:self 
                                             selector:@selector(moviePlayBackDidFinish:) 
                                                 name:MPMoviePlayerPlaybackDidFinishNotification 
                                               object:nil]; 

}
  • 1 1 Answer
  • 1 View
  • 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-18T12:22:34+00:00Added an answer on May 18, 2026 at 12:22 pm

    You allocate memory by performing [… alloc] but i don’t see any autoreleases or releases… This might be the reason that the app crashes because ObjC doesn’t have a garbage collector and you need to clean up yourself. If memory gets to high, your app will terminate.

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

Sidebar

Related Questions

I've been coding php for years, and now i have to finally make my
I finally have finished a Web Application and now I have to make it
I have this code to retrieve data from file then make some treatment, and
I've finally decided to make some tests for my apps but I'm stuck on
Finally deployed my ruby on rails 3.2 app but when trying to open it
I finally have a hardware guy that is insterested in controlling the firmware. This
In my app I have a lot of copy and paste code that is
On the Emulator with a default mail-app all works fine. But I have no
I have a LINQ method for the Search page of an in house app.
I have this app, originally written for iOS 2.x. I recently needed to add

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.