I'm new to Objective C, and am getting a little confused by the behavior of my code.
@property (nonatomic,retain) NSString *certificate;
@interface MEDTNetworkAuthentication : NSObject<NSURLSessionDelegate>
-(void)authenticate:(NSData*) certificateData andAuthData:(NSString*) authorization andURLSession:(NSURLSession*) careLinkAuthenticationSession;
Assigning to 'NSData *__strong' from incompatible type 'NSString *'
Now that you've posted real code with real property names and real method names, the problem is obvious.
As I guessed, your property is named
cert. So your
setCertificate: method is hiding the setter method for your
certificate property is of type
NSString and your
setCertificate: method takes a parameter of type
NSData, you have a conflict.
The proper solution is to renamed your
setCertificate: method so it doesn't conflict with your property.
Maybe change it to