Swift. Could Not Build Objective-C Module 'Alamofire'

Error: Could not build Objective-C module 'Firebase'

There is only one way to solve this issue.

  1. Quit Xcode.
  2. Delete project's temp files located at ~/Library/Developer/Xcode/DerivedData
  3. Delete ProjectName.xcworkspace
  4. Delete Podfile.lock file and Pods folder
  5. Run pod install.
  6. Open the newly created ProjectName.xcworkspace file and build.

Xcode fails to build new projects (12.4) - Could not build Objective-C module 'SwiftUI'

I figured it out! MY Xcode was using the wrong toolchain version even tho I tried to uninstall Xcode and reinstall it.

Make sure you have selected the correct version, in my case since I was running Xcode 12.4, I had to use version 12.4 for toolchains. It's weird that Xcode did not manually change it since I updated.

To updated version:

Xcode > Preferences > Components > Toolchains > and then select your
version

Swift Package Manager with Xcode - Could not build Objective-C module

This sounds like a bug that was recently fixed in the package manager (https://bugs.swift.org/browse/SR-3121). Have you tried a recent snapshot from https://swift.org/download/?

I tested the package you describe with a recent version of Swift 3.1 and it worked fine.

Could not build Objective-C module 'JSQMessagesViewController'

I fixed the problem by going through the following steps:

  • Clean the project, including the build cache (Command-Option-Shift-K)
  • Removing the pod.lock file and the pods.xcodeproj files
  • And then closing Xcode and running pod update again
  • Then building again.


Related Topics



Leave a reply



Submit