0

I am using several pods in my iOS app that make reference to sharedApplication, and as such cannot be compiled for a Today extension.

The thing is I really need AFNetworking, so I'd like to be able to tell CocoaPods to just include AFNetworking when compiling the extension. Is there a way to do this? I've looked through the documentation but it's not clear.

Leah Sapan
  • 3,621
  • 7
  • 33
  • 57

1 Answers1

3

To do this you just need to specify multiple target blocks in your Podfile. For example:

# Normal app pods

target :extension, :exclusive => true do
  link_with 'extension'

  # My extension pods
end

Note that 'extension' here corresponds to the name of your extension target in Xcode.

Keith Smiley
  • 61,481
  • 12
  • 97
  • 110