-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feat/notification permission #1268
Conversation
Preview available at https://expo.dev/accounts/nearform/projects/optic-expo/updates/50643cac-328b-467c-8bc4-65d34a496fe9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I understood correctly, @williamlines couldn't really test this PR. wouldn't have it been wiser to wait for a review from somebody who can test it?
closes #1265
Changes made :
Setup Instructions for testing
For Expo Go:
On your phone
If we already have the app installed we need to clear data and reinstall the expo go app, to get rid of the permissions token.
In the expo app Sign in with an account that is in the nearform org ( ask @simone if you are not already in the org)
Scan the QR code from the repo, whould be the first comment on this PR. This should work for both iPhone and android if you scan the correct codes.
Native:
For native we should clone the repo and refer to the setup guide here:
https://github.com/nearform/optic-expo
Andriod
For android, we need to make sure that a real Android device is plugged in. (note USB debugging should be enabled on your device, this is usually in settings > developer options), also if you are on Samsung you should disable/ uninstall secure folder before trying to build on your phone, I was only able to get this to work after I did that.
We need to make sure we have Andriod Studio installed on your computer(macOS) and configured as the guide says here:
https://docs.expo.dev/workflow/android-studio-emulator/
We need to also have OpenJDK 11 installed which can be found here: https://formulae.brew.sh/formula/openjdk@11
After the installation, the output should give instructions on the relevant PATH variables and what to do with them.
Once this is done we simply run
yarn android
in the terminal of the project with an Android device connected to your computer via USB.iOS
expo run:ios --device
Testing instructions
Once we open the app, if there is no previous data, we should get a popup asking to enable push notification permissions.
We need to confirm the respective native popup appears for both Android & Ios. This will only appear once, If the notifications are declined on the first go, clicking enable should navigate us to the app settings page so we can manually enable notifications.