Home > Mobile >  No such module 'FirebaseFirestore' watchOS
No such module 'FirebaseFirestore' watchOS

Time:12-02

After I added watchOS target, "No such module 'FirebaseFirestore'" appeared in the file which is a member of both targets (main target and watches target). The rest of the pods seem to work correctly. (despite the FirebaseFirestoreSwift, which is not installing when pod install)

I am using Xcode 14.0.1 on an M1 mac.

What is wrong with this pod and how can I fix it?

My Podfile

#platform :ios, '16.0'
use_frameworks!

def firebase_pods
  pod 'Firebase/Database'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'
  pod 'Firebase/RemoteConfig'
  #pod 'FirebaseFirestoreSwift'
end

def helpers_pods
  pod 'R.swift'
  pod 'Resolver'
end

target 'HonestMate' do
  platform :ios, '16.0'
  use_frameworks!

  helpers_pods
  firebase_pods

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

  target 'HonestMateUITests' do
    # Pods for testing
  end

end

target 'HonestMate Watch App' do
  platform :watchos, '9.0'
  use_frameworks!

  firebase_pods
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
    end
  end
end


```
`

I tried Command Option K, cleaned Derived Data, checked is xcworkspace opened. Tried deleting and reinstalling the pods, updated cocoa pods to cocoapods-1.11.3. Using SPM is not suitable, because I have R.Swift pod.

I also tried installing pods from GitHub repo (https://github.com/firebase/firebase-ios-sdk/blob/master/README.md#installing-from-github):

 pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
  pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'

but have an error The platform of the target HonestMate Watch App (watchOS 9.0) is not compatible with FirebaseFirestore (10.3.0), which does not support watchOS.

CodePudding user response:

Firestore is not available for watchOS. See this table for the Firebase Apple platform matrix support details.

  • Related