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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:42:11+00:00 2026-06-11T17:42:11+00:00

I have thoroughly looked through this forum and I have not found a solution

  • 0

I have thoroughly looked through this forum and I have not found a solution to this issue. When my app launches during the splash screen I want a 5 sec sound clip to play then stop when the app is done launching and the home screen is shown.

In the AppDelegate.m

-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *musicFile = [NSURL fileURLWithPath:[[NSBundle mainBundle]
pathForResource:@"bknewsroom2" 
ofType:@"caf"]];

AVAudioPlayer *launchClip = [[AVAudioPlayer alloc] initWithContentsOfURL:musicFile error:nil];
[launchClip play];

Now I have a whole bunch of stuff loading within didFinishLaunchingWithOptions this is just one of many things. The sound won’t launch in the simulator nor will it launch on my phone. So am I missing something? Again it is a 5 second clip that I want to play when the app launches for the first time. Any advice would be greatly appreciated.

  • 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-06-11T17:42:13+00:00Added an answer on June 11, 2026 at 5:42 pm

    I fixed this issue:

    in the AppDelegate.m

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //------ PLAY SOUND CLIP WHILE LOADING APP -----
    NSLog(@"launch banner with clip");
    NSURL *clip = [[NSBundle mainBundle] URLForResource: @"soundfile" withExtension:@"caf"];
    self.startupPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:clip error:NULL];
    [self.startupPlayer play];
    

    Now when the application launches, the sound clip plays. It does hiccup once which I’m looking into, but the function works. Also, I put this at the top of didFinishLaunchingWithOptions if it was in the middle some place, it would work.

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

Sidebar

Related Questions

I have looked thoroughly, but I have not found the solution (or perhaps I
I've thoroughly looked for a solution and have not found one. It seems really
I realize this is an unbelievably common issue and have looked very very thoroughly
I have looked all over the web for this sort of thing i've found
I have an app which was tested thoroughly and working fine on Android Gingerbread
First let me say I have read this useful article thoroughly and am using
I have searched quite thoroughly on this but can't seem to find an answer.
Eric Lippert's comments in this question have left me thoroughly confused. What is the
I have searched internet and stackoverflow thoroughly, but I haven't found answer to my
I'm thoroughly stumped by this one. I have a static class which manages a

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.