Betsy
Betsy

Reputation: 219

cannot find protocol declaration for NSObject

I was creating an NSObject class for doing web service. But while creating the protocol ,an error comes displaying"cannot find protocol declaration for NSObject" .In Xcode 4 I never came across such problems.Now I am using Xcode 6. Pls help me. Code is as below.

@protocol web <NSObject>
-(void)(NSArray *)urlArray;    
@end

#import <Foundation/Foundation.h>
@interface Webclass : NSObject    
@end

Upvotes: 3

Views: 5377

Answers (1)

Gevorg Ghukasyan
Gevorg Ghukasyan

Reputation: 416

Write your protocol under #import and put name on your method

#import <Foundation/Foundation.h>

@protocol web <NSObject>
-(void)methodName:(NSArray *)urlArray;
@end
@interface Webclass : NSObject
@end

Upvotes: 18

Related Questions