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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:04:28+00:00 2026-06-14T16:04:28+00:00

I keep on getting the Expected Method Body error when i try to run

  • 0

I keep on getting the “Expected Method Body” error when i try to run my app on Xcode. The bolded place is the place where I got the error. HELP!!! One More thing, I keep on getting a error saying “incomplete implementation” on the “@implementation SoundnoardFirstViewController” part. HELP!! thanks

#import "SoundnoardFirstViewController.h"

@interface SoundnoardFirstViewController ()

@end

@implementation SoundnoardFirstViewController

-(IBAction)PlaySound1:(id)sender1

**-(IBAction)PlaySound2:(id)sender2**

-(IBAction)PlaySound3:(id)sender3

-(IBAction)PlaySound4:(id)sender4

-(IBAction)PlaySound5:(id)sender5

-(IBAction)PlaySound6:(id)sender6

(IBAction)PlaySound1:(id)sender1:(id)sender { 
    CFBundleRef mainBundle = CFBundleGetMainBundle();
    CFURLRef soundFileURLRef;
    soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"This is the name of the clip", CFSTR ("sound file type"), NULL);
    UInt32 soundID;
    AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
    AudioServicesPlaySystemSound(soundID);
 }

-(IBAction)PlaySound2:(id)sender2:(id)sender{ 
    CFBundleRef mainBundle = CFBundleGetMainBundle();
    CFURLRef soundFileURLRef;
    soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"DoYouHave?", CFSTR ("mp3"), NULL);
    UInt32 soundID;
    AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
    AudioServicesPlaySystemSound(soundID);
}

-(IBAction)PlaySound3:(id)sender3:(id)sender {
    CFBundleRef mainBundle = CFBundleGetMainBundle();
    CFURLRef soundFileURLRef;
    soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"Hello", CFSTR ("mp3"), NULL);
    UInt32 soundID;
    AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
    AudioServicesPlaySystemSound(soundID);
}

-(IBAction)PlaySound4:(id)sender4:(id)sender {
    CFBundleRef mainBundle = CFBundleGetMainBundle();
    CFURLRef soundFileURLRef;
    soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"SoupBetter?", CFSTR ("mp3"), NULL);
    UInt32 soundID;
    AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
    AudioServicesPlaySystemSound(soundID);
}
  • 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-14T16:04:29+00:00Added an answer on June 14, 2026 at 4:04 pm

    declare the private methods inside the SoundnoardFirstViewController ()

    @interface SoundnoardFirstViewController ()
    
      //declare the private methods here
    
    @end
    

    Example:

    #import "SoundnoardFirstViewController.h"
    
    @interface SoundnoardFirstViewController ()
    
    -(IBAction)PlaySound1:(id)sender1:(id)sender;
    -(IBAction)PlaySound2:(id)sender2:(id)sender
    
    @end
    
    @implementation SoundnoardFirstViewController
    
    -(IBAction)PlaySound1:(id)sender1:(id)sender { 
        CFBundleRef mainBundle = CFBundleGetMainBundle();
        CFURLRef soundFileURLRef;
        soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"This is the name of the clip", CFSTR ("sound file type"), NULL);
        UInt32 soundID;
        AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
        AudioServicesPlaySystemSound(soundID);
     }
    
    -(IBAction)PlaySound2:(id)sender2:(id)sender{ 
        CFBundleRef mainBundle = CFBundleGetMainBundle();
        CFURLRef soundFileURLRef;
        soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"DoYouHave?", CFSTR ("mp3"), NULL);
        UInt32 soundID;
        AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
        AudioServicesPlaySystemSound(soundID);
    }
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting an expected identifier error at this line in my code =/
I keep getting this : DeprecationWarning: integer argument expected, got float How do I
I keep on getting this error error: expected specifier-qualifier-list for core data code im
Here is my code. I keep getting this error: error: expected primary-expression before ')'
I keep getting this error: End of Statement Expected. Here is where the error
I keep getting the ' Object Expected ' error within my page script when
Im setting up a simple method and I keep getting the following error: Syntax
I keep getting this error: expected specifier-qualifier-list before ‘tcp_seq’ in my header file. Here
I keep getting this error when I try to compile my code : cc
I've written a little header file, and I keep getting this error: expected specifier-qualifier-list

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.