Auto Property Synthesis Warning in Xcode 5 iOS 7
Asked Answered
B

2

5

I'm getting a warning in Xcode 5 with the iOS 7 SDK that says

Auto property synthesis will not synthesize property declared in a protocol

I didn't get this warning in Xcode 4 with the iOS 6.1 SDK. Any ideas?

Here is my code:

List.h

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>

@interface List : UIViewController <UITableViewDataSource, UITableViewDelegate, UISearchBarDelegate, CLLocationManagerDelegate, MKMapViewDelegate, MKAnnotation>
{
    IBOutlet UITableView *tableView;
    IBOutlet UISearchBar *searchBar;
}

@property (nonatomic, strong) NSArray *annotations;

@end

List.m

#import "List.h"
#import "RSFM.h"
#import "AnnotationDetailView.h"
#import "DTCustomColoredAccessory.h"

@interface List ()

@end

@implementation List
{
    NSMutableArray *title;
    NSMutableArray *subtitle;
    NSMutableArray *displayItems;
    NSMutableDictionary *marketDictionary;
    NSMutableArray *farmMarkets;
    NSArray *keys;
    NSMutableArray *objects;
}

I'm getting the warning on the line:

@implementation List
Boone answered 16/9, 2013 at 19:30 Comment(1)
Nothing happens when I do that.Boone
E
11

You should have received some kind of warning because MKAnnotation protocol contains a number of properties and auto-synthesis has never been supported for properties defined in a protocol.

Either remove this protocol from the list you claim to support or implement appropriate properties / accessor methods to fulfil the stated responsibilities.

Euratom answered 16/9, 2013 at 19:34 Comment(0)
B
4

According to the iOS docs you need to synthesize coordinate in the MKAnnotation protocol. Unfortunately, the compiler doesn't give you this information, though it seems to know.

Burris answered 23/3, 2014 at 17:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.