swiftobjective-cxcodecocoapodsgeofire

Trying to install GeoFire through Cocoapods, but getting Objective-C Module error


So there is an odd build issue I’m encountering.

I have an existing Xcode project where all my packages have been added through Xcode itself (I think Xcode basically uses Swift Package Manager underneath).

I came to a point where I needed to now use GeoFire . But Geofire needs to be installed through Cocoapods. But my Xcode project never used cocoapods.

So to integrate Cocoapods I did the following:

  1. brew install cocoapods
  2. opened terminal and navigated to root directory of iOS app (where <app-name>.xcodeproj exists)
  3. pod init
  4. opened the generated Podfile and added the following: … platform :ios, '11.0’pod 'GeoFire', '~> 4.0’
  5. pod install
  6. opened <app-name>.xcworkspace
  7. Then when I went to build the project, the following failure occurred (see image attached to question) enter image description here

None of the workarounds suggested have helped me thus far. Any thoughts?

NOTE: I am doing all this on an M1 Macbook.


Solution

  • Wow, strange issue. What ended up fixing it for me was to go to my pod file and replace: pod 'GeoFire', '~> 4.0'

    With: pod 'GeoFire/Utils'

    Now I can use GeoFire in my file as I wish.