8

An interesting thing happened this morning, I updated Xcode to version 9.3, and after that, I can't archive my project. I can build it, run it on the device, but when I try to archive it, I get that I am missing some modules, like Alamofire, etc...

enter image description here

enter image description here

I am using cocoapods as dependency manager. And everything worked fine until this morning. Does anyone have the similar issue?

Krunal
  • 77,632
  • 48
  • 245
  • 261
MegaManX
  • 8,766
  • 12
  • 51
  • 83

3 Answers3

2

Reset Cocoa Pod

Remove Pod from your project and add again.

or

try sudo pod repo update or pod repo update


And one more importance thing you must be missing is:

Set your command line tool version, in your Xcode.

You can download latest command line tool from Apple Download Portal, if you have paid apple developer account/id.


Here is current stable Xcode Tools and supporting command line tool download link. (Ensure you'are logged in using premium developer account on Apple Developer Account to access these links)

Xcode 10

Xcode 9

Once you've latest command line tool installed in your system, set it from Xcode Menu.

(Xcode Menu Items) Xcode ► Preferences ► Location ► Command Line Tool ► Select appropriate command line tool

enter image description here

enter image description here


Update Alamofire in your pod file.

Try this: Alamofire Installation

pod 'Alamofire', '~> 4.7'

Krunal
  • 77,632
  • 48
  • 245
  • 261
1

Can you ensure that you have Swift version 4.1 when running xcrun swift -version

Also try to build your project without Alamofire (comment it in Podfile), then compile again with Alamofire.

Moreover are you sure you have opened the .xcworkspace instead of the .xcodeproj ? I know it might be dumb to ask, but it happens :)

  • Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1), removing and adding alamofire did not fix it. .xcworkspace is opened. What's interesting that I can build it and run it, I only get these errors while trying to archive – MegaManX Mar 30 '18 at 14:03
1

Make Sure you have accepted apple's agreement go to your apple account. I have recently faced this issue after updating my xcode to 9.3 swift 4.1 https://developer.apple.com/account/

Ahsan
  • 503
  • 4
  • 12