7
votes

I installed Alamofire via cocoapods successfully and have been using it when building and running the app on a device from Xcode. Now when I go to archive my project for distribution I get the error:

No such module 'Alamofire'

I switched my provisioning profile to the correct Ad Hoc profile I've been using for distribution, but since I switched to using cocoapods instead of manually installing Alamofire I've been unable to archive. I tried to fix by setting "Build Active Architecture Only" to "No" under build settings but no luck.

4

4 Answers

10
votes

There is a chance of mismatch versions between

enter image description here

and pod global platform for your project

enter image description here

0
votes

you need add import Alamofire to your swift files

0
votes

Try this in your pod file for install Alamofire

platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'Alamofire', :git=>'https://github.com/Alamofire/Alamofire'
end

I hope this will help you.

0
votes

I had different bug with same outcome. Bug was caused by custom build scheme which used wrong configuration to create archive. Archiving reported unrecognized library.

enter image description here

After changing configuration to AdHoc_Fortex_D_Env archiving recognized all libraries.