0

I'm creating a react-native module I would like for this custom module to import another pod, specifically AFNetworking.

How do I go about this?

What I've done:

  • Adding pod 'AFNetworking', '~> 4.0' to my project's Podfile
  • Added s.dependency "AFNetworking" in my custom module's podspec
  • import "AFNetworking.h" in MyModule.mm

I get the error Expected unqualified-id

I've tried all variations of

#import “../../../Pods/AFNetworking/AFNetworking.h”
#import "AFNetworking.h"
#import "AFNetworking/AFNetworking.h"
#import <AFNetworking.h>
#import <AFNetworking/AFNetworking.h>

None of which seem to work

david_adler
  • 9,690
  • 6
  • 57
  • 97

1 Answers1

0

This does the trick

#import <AFNetworking/AFNetworking.h>

See What is the difference between #include <filename> and #include "filename"?

david_adler
  • 9,690
  • 6
  • 57
  • 97