0

Hello everything is working fine now, but when ever i try to archive the my project i am facing this error "No such module 'Alamofire" i don't know what happend followed many post on stack overflow but still facing same issue my pods

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'WithinRider' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for WithinRider
   pod 'SwiftyJSON', '~> 4.0'
   pod 'Alamofire', '~> 4.7'
   pod 'MRProgress'
   pod 'GoogleMaps'
   pod 'GooglePlaces'
   pod 'SwiftGifOrigin'
   pod 'SDWebImage', '~> 4.0'
   pod 'Toast-Swift', '~> 3.0.1'
   pod 'Firebase/Core'
   pod 'Firebase/Messaging'
   pod 'AKMaskField'
   pod 'Socket.IO-Client-Swift', '~> 13.2.0'
   pod 'BadgeSwift', '~> 5.0'
   pod 'SwiftyGif'
   pod 'PagingTableView'
   pod 'AlamofireObjectMapper', '~> 5.0'


  target 'WithinRiderTests' do


    inherit! :search_paths
    # Pods for testing
  end

  target 'WithinRiderUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

error

No such module 'Alamofire'
Jhony
  • 187
  • 1
  • 4
  • 16
  • https://stackoverflow.com/q/32466073/5255016 refer this question. It might help you – Saurabh Aug 21 '18 at 05:36
  • There are many solutions provided to above question, just try them out. – Saurabh Aug 21 '18 at 05:43
  • i update my post – Jhony Aug 21 '18 at 05:48
  • 1
    @Jhony First of all Remove **pod 'Alamofire', '~> 4.7'** from the pod-file and then pod install deleter the derived data and archive data then add **pod 'Alamofire'** without mention version and pod install maybe it's works – Nikunj Kumbhani Aug 21 '18 at 05:57
  • 2
    Make sure all the deployment targets need to be the same, such as in the project file, in target, and the pod project as well. – Saurabh Aug 21 '18 at 05:59
  • i set deployment target 10.3 everywhere but still same issue – Jhony Aug 21 '18 at 06:05
  • 1
    did you try @NikunjKumbhani's solution? – Saurabh Aug 21 '18 at 06:08
  • Also check if you have "Alamofire" in Embedded Binaries and in Linked Framework and Libraries – Saurabh Aug 21 '18 at 06:13
  • 1
    When using CocoaPods, it's necessary to start Xcode by opening your project's .xcworkspace file, instead of the usual project file. This is detailed in an answer to the question @Saurabh mentioned. Can you verify if you're doing this correctly? – waldrumpus Aug 21 '18 at 08:56

3 Answers3

1

Have you tried the standard routine?

1. Clean the project

2. Close Xcode, reinstall the missing pod, reopen Xcode

3. Build the project

KLD
  • 162
  • 2
  • 10
0

I got the same error while archiving. Here is a link for proper way of doing that. Sometimes it won't solve your issue. It didn't solve my issue as well. So I had to Edit scheme. Under Achieve I changed Build Configuration as I have several build configurations. And then try to re-archive the project.

Wimukthi Rajapaksha
  • 961
  • 1
  • 11
  • 23
0

I have solved the issue by changing the POD and Project target deployment target as same.

Manishankar
  • 327
  • 1
  • 12