Why is my react native app asking for push notification permission on second login? - react-native

I recently upgraded my react native version to 0.68 and I realized that my app doesnt ask for permission for push notification immediately after the user logs in. Only when the user logs into the app the second time does my app ask for permission to send push notifications. Is anybody facing a similar issue? Is there any way I can manually ask for permission from the user as soon as the first login? I tried looking at PermissionsAndroid packagage but it doesnt seem to have the parameter for push notifications for RN version 0.68. Any suggestions? Thanks in advance.

Related

Error Logging into this app with facebook is not available at this time

today i get into this error using react native with expo managed workflow, i try with facebook sdk, expo-auth-session, webview url, so them i give up because every method give me the same error, i end when i eject from expo to react native bare with react-native-fbsdk-next, after config all the environment with Android studio, i fall at the same error point D:
Please if someone know, if i missing some configurations, i follow all the steps in expo, react-native-fbsdk-next, expo-auth-session and expo-facebook D:
Error Logging into this app with facebook is not available at this time
UPDATE: i created a new React Native project again from scratch, follow react-native-fbsdk-next and Facebook Android start guide for login, still getting the same error. I reach that the error occour when i need to type my account and password in the facebook app, if i was already loggued in and did not ask for new permissions, i can login sucessfully, but if i log out from facebook app or ask for 1 new permission, it force me to log in and the bug occurs again, also i reach this report at facebook page, if someone is getting the same error, please help comment:
error logging facebook is not available at this time

Expo push notification service

Im trying to send push notification using expo notification service, can anyone give the code for it, how to get the tokens and all the other standard stuff, I have been trying to read the documentation but it is really confusing. The app is already on test flight, Also I don't want to eject.
I don't mind using Firebase, but the app doesn't have a user login pages. I don't mind any other method too.
Thanks for the help

React Native Push Notifications doesn't receive notification

I have a React Native app (testing on iOS) and am trying to incorporate Push notifications. I am using the following module:https://www.npmjs.com/package/react-native-firebase-push-notifications.
I tried running example app code and am able to obtain
a (1) message token and (2) successfully obtain permissions from my device.
I am trying to send a test notification from Firebase and am using my device's token. However, nothing happens upon triggering a test notification. Any tips? I believe I followed the key upload instructions correctly (https://firebase.google.com/docs/cloud-messaging/ios/certs)
I hope you have uploaded pem/p8 file on firebase console at "Cloud Messaging" in Project settings. Check this image
I figured it out! Although I thought I had done this in the past, I did not have Remote notification enabled in background modes, nor did I have Push notifications checked in the Signing & Capabilities section of project setting on Xcode. Thank you!

Facebook iOS SDK. Native Auth after user taps "Don't Allow"

When using Native Auth, how can the app ask for auth permission again if the user has already pressed "Don't Allow"?
I made a simple app that connects to Facebook using the Native auth dialog box.
When testing, I pressed "Don't Allow". Now, everytime I press the Login button I created, it throws an error, saying that auth was cancelled. In Settings.app, my app is turned off under Facebook.
Reinstalling the app doens't help. How can I make the app ask for auth permission again, when the user taps "Login"?
Thanks in advance.
Unfortunately, you can't. This is IMO a bad design by Apple. Feel free to file a radar about it. In the meantime you'll have to tell your users how to go to the settings app and turn on your app. Each app has a toggle to turn off or on access to that Facebook account.

Push notifications not asking permission when user loads app

Hi I have just released my app update with push notifications added into it. I was worried that it would not work properly so I did a bunch of testing. First with just a development certificate and then a production certificate using adhoc. Both ended up working and I was pleased when the adhoc worked.
Anyways the update has been live for about 8 hours now and for some reason push isn't working. I checked with my friend and have realized that the user is not being asked whether he wants to accept push notifications from my app. Which means when the token gets sent to my server, its appearing as (null). I have no idea why this is happening. When he goes into device settings --> notifications ---> my app does not appear on any of the lists (receiving push notifications or not receiving).
This is the code in my delegate that should trigger the request:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
If anyone knows why this is happening, input would be much appreciated. Thanks!
We thought we were having this same issue but found out that the app was actually working correctly. The user is only prompted once even if they uninstall and reinstall the app.
We were testing it by uninstalling the app and then reinstalling. iOS would remember how we had responded previously on that device and would not prompt again leading us to think there was a problem.
We found the best way to test is with the simulator and doing a "Reset Content and Settings".
After configuring your app for push notifications and generating your SSL certificates you must also generate new provisioning profiles.
The developer portal displays this message on the App ID configuration page:
After you have generated your Client SSL certificate, create a new provisioning profile containing the App ID you wish to use for notifications.
If you did not update your App Store provisioning profile after setting up push the OS will not provide you with a push token.
If this is your problem you just need to generate a new App Store distribution profile and submit a recompiled version signed with that profile.