Using Alamofire with an iOS 8.0 Embedded Framework Using Alamofire with an iOS 8.0 Embedded Framework xcode xcode

Using Alamofire with an iOS 8.0 Embedded Framework


Yes, it is possible to use Alamofire within your custom framework, but you need to also include Alamofire in the podfile of your sample project (the project that uses your framework). Your podfile should look like this:

platform :ios, '8.0'use_frameworks!target 'MyApp' do#   pod 'MyFramework'  Include MyFramework if it is a cocoadpod   pod 'Alamofire'end

The error "Missing required module 'Alamofire'" happens because your framework doesn't actually include Alamofire when you use it in some other project, and you cannot import Alamofire in your sample project for the same reason.

If you plan to make your project a Pod you can include the following line in your podspec:

s.dependency "Alamofire", "~> 3.1.5"

Including Alamofire as a dependency in the podspec instructs cocoapods to also include it when your framework is installed.

Hope it helps.


Not 100% sure if this is your issue of not, but for swift stuff you have to use the use_frameworks! directive in your Podfile. Could that be the issue?

I ran into this once and found answer from https://www.raywenderlich.com/97014/use-cocoapods-with-swift