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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:27:15+00:00 2026-05-25T22:27:15+00:00

In WebServiceAPI.h, which I referred in the code below, i declared a protocol with

  • 0

In WebServiceAPI.h, which I referred in the code below, i declared a protocol with a required metod -(void) apiFinished:(WebServiceAPI *)api. When compiling the code i get this error: WebServiceAPI.h:13: error: expected ‘)’ before ‘WebServiceAPI’ (line 13 is where the method of the protocol is declared). where am I doing wrong?

#import <Foundation/Foundation.h>
@protocol WebServiceAPIDelegate
@required
    -(void) apiFinished:(WebServiceAPI *)api;
@end

@interface WebServiceAPI : NSObject{
    NSString *address;
    NSMutableData *dataWebService;
}

@property (nonatomic, assign) id <WebServiceAPIDelegate>delegate;
@property(nonatomic, retain) NSString *address;
@property(nonatomic, retain) NSMutableData *dataWebService;
@end
  • 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-25T22:27:16+00:00Added an answer on May 25, 2026 at 10:27 pm

    The problem is that WebServiceAPIDelegate doesn’t know about the class WebServiceAPI when it is defined. Add a @class directive before you create WebServiceAPIDelegate @protocol declaration.

    // Add the following line to let the compiler stop worrying about 
    // the existance of class WebServiceAPI
    
    @class WebServiceAPI;
    
    @protocol WebServiceAPIDelegate
    @required
        -(void) apiFinished:(WebServiceAPI *)api;
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to upload a pdf file using webservice api. But this api
Are there any Public WebService API that I can query and get the search
I have declared a protocol, everything seems to work fine, even Xcode auto-complete the
I have a Webservice(API) which I am passing to the DOM parser and it
From this question:- https://stackoverflow.com/questions/1342611/is-there-a-webservice-api-to-grab-a-screenshot-of-another-website and some other questions/google I got some results like:-- http://www.bitpixels.com/
I'm write a Air application that consumes a beta webservice API. Sometimes this APIreturns
When there is no webservice API available, your only option might be to Screen
I learning Python (coming from a dotnet background) and developing an app which interacts
EDIT: THIS QUESTION IS INVALID SINCE THE SERVER I'M USING HAS SUDDENLY EXPIRED. PLEASE
I have a web service to which I send a xml request (application/x-www-form-urlencoded encoded)

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.