React-native-fcm: [IOS] Error with Setup

Created on 6 Jul 2016  路  72Comments  路  Source: evollu/react-native-fcm

Hey,

If I try to use this package, and try to write [FIRApp configure]; I get an error that this command is undefined.

Any Ideas or suggestions?

Thanks
Alex

All 72 comments

can you bring a screenshot of error?
Have you added the import on the top?

If added like you described in the install introductions here on github.

I actually don't have an system with FCM running at the moment, but I will make one and try to send a screenshot

fcm

As you see on the screenshot I got more errors today.
I added the Framework with this Documentation Firebase Official

Because I am not allowed to use pod.

Hope you could help me

since the build can't even recognize FIRApp, can you check if the library is linked to the project in Build Phase?

fcm 2

As I can see (screenshot) everything is linked correctly?

not using cocoapod seems be a good idea given the issues we've encountered lately. Let me try this approach a bit more and get back to you

fcm 3

I got rid of two from the errors with the rnpm linking again. Now its just the '[FIRApp configure];' error seen above.

Thanks, hope we will find a fix soon ;)

question: How did you make RNFIRMessaging compile? It complains
'FirebaseAnalytics/FirebaseAnalytics.h' file not found

for your issue, try add #import "firebase.h" on the top

I even didn't get it to compile. Get the same error as you.
Even if I add the Import, I get the error. See my first Screenshot in this issue :(

I see :(

Well actually, the [FIRApp configure]; is not the problem, if I start compiling the error is going away and the only error left is:
fcm 4

try pulling another Firebase.h file into the library project?

What do you mean?

I still have the Problem with RNFIRMessaging

working on it

@alexanderniebuhr I'm still getting 'FirebaseAnalytics/FirebaseAnalytics.h' file not found. Do you have FirebaseAnalytics.framework?

Nop. As I said I used official Firebase Documentation with the following SDK provided by them

https://dl.google.com/firebase/sdk/ios/3_3_0/Firebase.zip

For analytics, did you just move 4 files into project?

I moved the 4 in the Analytics folder and the 2 in the Messaging folder to my project

can you share your project? I just can't get working

Nob sorry. Its not possible :(

Any other Ideas for fixing? I really would like to use it in my App :/

try changing react-native-fcm/ios/RNFIRMessaging.h change to `#import "Firebase.h" and add a Firebase.h file in the project

Still getting following error:

fcm 4

have you added Firebase.h file in the project (RNFIRMessaging.xcodeproj)?

Yep after compiling failed now:

fcm 5

the same issue as I have. Need to find out where this header file is located

Ok thanks :/

Hope this will be fixed soon

If you have time could you help me look for it? Since your main project can find it somehow

I'll try my best, and will post any news here.

done!

Great to hear :) What is the fix?

Simple fix is adding search path in the RNFIRMessaging, both header and framework. I'm trying another way which embed Firebase frameworks into this repo

Ok great I am up to the cool fix coming out soon as an update here :)

no..it is not a good idea to put frameworks there.. I will post the fix in another branch and you can test it out

Well .. Thanks, but you also just could make a little manual for the fix. :)

I'm leaving the cocoapod route myself too so that the project is much cleaner and straight forward. so just wait couple more minutes
but pods will still be supported in this repo

Thats fine :) I am very happy you found a way.

True story. But since I did experience very very very bad stuff with cocoa pod I am now on my way to actually control everything manually

try nopod branch

Thanks, I will have a look

HM :( Sorry that I still have an error:

fcm 6

Am I doing anything wrong?

The zip file is missing a framework file. I pull it from cocoapod. Any way i can share it for download?

That would be great. I really don't know why the Official SDK zip is missing one :(

Why you not include the framework file in the 'nopod' branch under an folder 'frameworks'?

pushed

GREAT!! Don't get the error anymore :) :D

But ... Now I have this problem :(

fcm 7

But in my directory under .../ios/ I added the file from Firebase Console

you need to download info.plist from firebase console.
you need to go to xcode project settings=>Capabilities=>Background Modes => enable remove notifications

Ok strange... I've done that, but needed to restart Xcode :O Now I am curious if sending an message from console will work

ok. keep in mind that ios emulators don't not support push notification

Yeah I know that, but I am not Sure if my APN Certificate will work :/

Ok my certificates are wrong :/

Could you please tell me my error. I have done anything according to the following introduction:

https://firebase.google.com/docs/cloud-messaging/ios/certs

I can't see your console :)
I remember I downloaded a profile and converted to .p12 before uploading to gcm.

fcm 9

Forgot the screenshot :O (FACEPALM)
Yeah I did this too with the certificate

**UPDATE: Okay weird think. I still get the console output with Failed to fetch APNS toke but then I get an toke (I guess) in log.

If I am in foreground I get the log connected to FCM, BUT if I put App in Background it logs Disconnected from FCM.
No Messages send over Firebase console is shown :(**

I don't get it do run :(

I just want to use Firebase Analytics and Notification (push) for my app :/ Why is this so complicated :O

Disconnecting from FCM when going background is suggested by google, you should get data notification once you resume

are you having android project?

Ok. I am not sure if my problem is clear.

I need to use Push Notifications for my Project. As such I don't know why I am not getting any Push Note to my iPhone 6.

Is something wrong with my certificates. (Seen in the last Screenshot)?

Any Ideas or Suggestions?

Nop Android is still in Development and not in a state for testing

If device is registered correctly, you should get a token. I don't see it in screenshot
How did you close/kill the app when you test notification?

Here my console, is this all correct?:
fcm 10

I just open my App and push the Homebutton, to put App in background.

And in saying that Firebase Analytics does Work for me. So in my Firebase console I am able to see some analytics data. But I can't get the Firebase Push Notification to work

UPDATE: Here Screenshot of my console. Saying the Notification is done. But in the detailed overview, there is 0 send? :O
fcm 11

Just tried I can send and show notification.
Can you try sending notification target all device under ios project?

I've done both. With the FCM Token for my device, and with the target all device.

I don't now. What am I doing wrong :(

Can you check if the app is blocking notification? Did you see the prompt that ask permission for notification? Try reinstall the app? Restart the phone? APN gets hiccups sometime

I'll try reinstall. But I allowed my App for Notification, yeah I did see the prompt.

I have no Idea :(

Not still no working. But what could be the Problem?

Just checking if you use the same setup than me :)

Were have you put the Usage code from you Install Guide?
What React-Native Settup are you running 'Release or Debug' sheme?
What Signing 'Developer or Distribution'?

signing is developer. But I may have used production App Push Service cert to generate .p12 file

Going to sleep now. good luck

Ok same Setup here. I actually have an important meeting here. So hope we can fix this tomorrow. :(

So after some mature Meetings with my lead senior dev, cto and ceo. I still can't get the notifications to work :(

Any Ideas or Suggestions for my problem?

hey can you join gitter of this repo? The issue conversation is too long and it is not related to this repo itself

Done

configuration issue, check gitter

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andryuwka picture andryuwka  路  6Comments

jitenderchand1 picture jitenderchand1  路  4Comments

404sand808s picture 404sand808s  路  5Comments

sf577 picture sf577  路  3Comments

mts88 picture mts88  路  5Comments