Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FirebaseMessaging module not found using cocoapods iOS

I'm getting a error that 'FirebaseMessaging module not found'. Below is my pod file structure.

Pod file structure

Official documentation shows Firebase/Messaging is available. I've written in pod file and tried to install it. The stats in terminal doesn't shows FirebaseMessaging installation and same does that pods directory.

Below is terminal stats.

Terminal screenshot

Where I'm going wrong?

like image 641
Jayprakash Dubey Avatar asked Jul 13 '16 05:07

Jayprakash Dubey


3 Answers

This code is from Firebase example Podfile for Messaging.

I'll say, try and change your Podfile, close XCode and run pod install

use_frameworks!
platform :ios, '7.0'

pod 'Firebase/Messaging'

target 'FCM' do
end
target 'FCMSwift' do
end
target 'FCMTests' do
end

I'm not sure if the order does change something in the way the pods work.

like image 152
Idan Avatar answered Oct 30 '22 06:10

Idan


The culprit was Pods! I removed all CocoaPods from Project using this link.

Thereafter, I again added Pods to project using this link.

Screenshot for logs

It really worked later!

like image 30
Jayprakash Dubey Avatar answered Oct 30 '22 08:10

Jayprakash Dubey


Just for record as that was the situation I faced. If you created a new target after installing the pods, you will get "Module not found" error. The weird thing that the project will build successfully. However, autocompletion won't work and these silly errors (module not found) will appear here and there.

To solve the issue, you need to introduce the new targets in Podfile. A systematic way to do that will be:

$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod clean
$ rm Podfile

Then remove the Xcode workspace, and proceed with a new fresh Pod install.

like image 36
Abdalrahman Shatou Avatar answered Oct 30 '22 06:10

Abdalrahman Shatou