jiblylabs
jiblylabs

Reputation: 131

Getting a fail build because of an NSArray line error

When trying to build my xcode project, I get an error at this line:

- (NSArray<H24CommercialSlide * >*)allSlides;

Giving me a Parse issue: Expected '>' & Expected ')'

Not sure how to resolve this issue and what has changed in xcode that makes this previously working code fail.

Any ideas?

Full code snippet:

#import <Foundation/Foundation.h>

@class H24CommercialSlide;

@protocol H24SlidesProviderProtocol <NSObject>
- (NSArray<H24CommercialSlide * >*)allSlides;
@end

@interface H24SlidesProvider : NSObject<H24SlidesProviderProtocol>

@end

Upvotes: 0

Views: 60

Answers (1)

Willeke
Willeke

Reputation: 15598

Lightweight generics were introduced in Xcode 7. Install Xcode 7 or change

- (NSArray<H24CommercialSlide * >*)allSlides;

to

- (NSArray*)allSlides;

Upvotes: 1

Related Questions