1

I'm Using AFNetworking (3.1.0) in Pods, and I'm trying to subclass SessionManager class in it.

When I try to use:

 __weak typeof(self) weakSelf = self;

in the subclass, I get an error

'__weak' only applies to objective-c object or block pointer types; type here is int" warning

I see this is similar to:

'__strong' only applies to objective-c object or block pointer types; type here is XXX" warning

I checked my framework search paths, but I did not have framework path listed there.

In the framework search path for my target settings:

$(inherited) non-recursive
$(PROJECT_DIR) non-recursive
$(PODS_ROOT) recursive

I'm not sure what to change to fix the error.

Pods_Test.Framework Header:

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif


FOUNDATION_EXPORT double Pods_Test_ContactVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_Test_ContactVersionString[];

Can someone point me in the right direction?

jscs
  • 63,694
  • 13
  • 151
  • 195
Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109

0 Answers0