Question

"Incompatible pointer types assigning to NSObject *__weak from NSObject"

When using MGTwitterEngine I get this error. If I turn off "treat warnings as errors" it seems to skip over. Why is this happening?

__weak NSObject <MGTwitterEngineDelegate> *_delegate;

When I tried removing the __weak I got more errors.

Was it helpful?

Solution 2

- (id)initWithXML:(NSData *)theXML delegate:(NSObject *)theDelegate connectionIdentifier:(NSString *)theIdentifier requestType:(MGTwitterRequestType)reqType responseType:(MGTwitterResponseType)respType URL:(NSURL *)theURL

becomes

- (id)initWithXML:(NSData *)theXML delegate:(NSObject <MGTwitterParserDelegate>*)theDelegate connectionIdentifier:(NSString *)theIdentifier requestType:(MGTwitterRequestType)reqType responseType:(MGTwitterResponseType)respType URL:(NSURL *)theURL {

And replace similar instances of NSObject delegates, usually in init methods, throughout the MGTwitterEngine.

OTHER TIPS

Try use __unsafe_unretained id instead of using __weak NSObject*

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top