EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

iOS Notifications are not working after migrating to NS 7 but are fine on Android #1688

Closed stephaneQ2 closed 3 years ago

stephaneQ2 commented 3 years ago

Hi @EddyVerbruggen,

Notifications are not working on iOS and Nativescript 7. Everything else related to firebase is working. Is this something that you have noticed before? I am thinking this may be an App/Bundle ID thing. Have you tested the NS 7 version of the plugin with notifications?

Let me know if there is anything specific that I can test for or any information that you need to help us fix this issue.

Thanks!!

EddyVerbruggen commented 3 years ago

No I have not tested push with N7 yet.

stephaneQ2 commented 3 years ago

Ok. Let me know if you run into the same issues. Thanks :-)

Philntps commented 3 years ago

I got this is issues too background noti is fine but foreground crash NS7 Angular10

nicmanzini commented 3 years ago

is it still the case?

stephaneQ2 commented 3 years ago

Yes.

stephaneQ2 commented 3 years ago

Guys,

I found the issue. I re-added the push notification capability in X-Code 12 and I noticed that entitlements file was different. This is what it was updated to:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>aps-environment</key>
    <string>development</string>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
</dict>
</plist>

Try it out! I hope this helps everyone else 👍

nicmanzini commented 3 years ago

Im on "@nativescript/firebase": "^11.0.0" and NS7 and I don't know how you do it but even with the apns key properly registered on the firebase platform et the firebase token from the log, I still don't receive notification even when the app is in background. How did you re-add the notification capabilities in Xcode 12? I did add it and it did not change anything. Did you do a ns clean before? I seems to have the same entitlement file as you

nicmanzini commented 3 years ago

It Works! However I had to launch the app using Xcode not using the command line: ns run ios both gave me the same firebase token however only when launching from Xcode the notification arrived

stephaneQ2 commented 3 years ago

Thanks for everyone's help!!!

kefahB commented 3 years ago

Hi .. I have same problem .. notification does not work at all with NS7 ? I have same entitlements but it dosent work !

tujlaky commented 3 years ago

What about CI tools? I can't use xcode in CircleCI.