Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIRMessagingDelegate can not find declaration #107

Closed
atayuksel opened this issue Sep 23, 2016 · 13 comments
Closed

FIRMessagingDelegate can not find declaration #107

atayuksel opened this issue Sep 23, 2016 · 13 comments

Comments

@atayuksel
Copy link

When I try to declare FIRMessagingDelegate in app delegate Xcode gives an error "Cannot find protocol declaration for FIRMessagingDelegate".

I imported firebase as implemented in the project

#import <UIKit/UIKit.h>
#import <UserNotifications/UserNotifications.h>
#import <MessageUI/MessageUI.h>

#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
@import UserNotifications;
#endif

@import Firebase;
@import FirebaseInstanceID;
@import FirebaseMessaging;

@interface AppDelegate : UIResponder <UIApplicationDelegate, UNUserNotificationCenterDelegate, FIRMessagingDelegate>

I imported firebase via cocoa pods and response is
Installing Firebase 3.2.1 (was 3.2.0)
Using FirebaseAnalytics (3.2.0)
Using FirebaseInstanceID (1.0.6)
Using FirebaseMessaging (1.1.0)

Everything seems fine but I could not solve the problem anyway? What could be reason for the problem?

@Benjaminm5
Copy link

I updated the cocoapod version (had 0.39.0) and now 1.0.1...

check version by entering: pod --version

then install the newest version with: gem install cocoapods

@atayuksel
Copy link
Author

Now I updated pods, It works well, thanks 👍

@jinguny
Copy link

jinguny commented Sep 26, 2016

"pod update" solved the problem. Thank you!

@MaxBerny
Copy link

MaxBerny commented Dec 7, 2016

I already have pod version 1.0.1 but yet I get the same problem. How to solve it

@anand-y
Copy link

anand-y commented Dec 26, 2016

@MaxBerny After updating to cocoapod version 1.0.1 ,
run pod update, it will solve your problem.

@revolter
Copy link
Contributor

How can you update to 1.0.1? 1.1.1 is the latest version.

@Benjaminm5
Copy link

Benjaminm5 commented Dec 27, 2016 via email

@i6mi6
Copy link

i6mi6 commented Jan 6, 2017

Although I updated the pods the problem remained. I fixed it by moving @import Firebase; @import FirebaseInstanceID; @import FirebaseMessaging; above the interface declaration (it was below by mistake)

@Anilkumarkotur
Copy link

Anilkumarkotur commented Jan 17, 2017

i tried all the suggestion still not working 😞. i am on pod version 1.1.1 and even if i go into Xcode doc of messaging() i didn't find the "remoteMessageDelegate".

@gnani1234
Copy link

i am on pod version 1.1.1 but still I didn't find the "remoteMessageDelegate".

@compbealov
Copy link

i have the same problem i haven't find remoteMessageDelegate yet

@Anilkumarkotur
Copy link

Actually this was my mistake, as i was migrating from GCM to FCM, first i need to remove the GCM framework and i have to add FCM. but i was adding FCM on top of GCM so i got into an state where i was facing duplication issue with one the class which in both GCM and FCM. while resolve it podfile.lock was acting very weird and this is the reason for mess.
https://developers.google.com/cloud-messaging/ios/ios-migrate-fcm

Thanks

@HaileApp
Copy link

HaileApp commented Feb 26, 2018

In my case,I've tried to update the pod and it failed.Then I deleted the podfile.lock and run pod install** It finally works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests