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

OneSignal Integration #344

Merged
merged 4 commits into from
Jun 24, 2024
Merged

OneSignal Integration #344

merged 4 commits into from
Jun 24, 2024

Conversation

mdmohsin7
Copy link
Collaborator

@mdmohsin7 mdmohsin7 commented Jun 24, 2024

This PR integrates OneSignal for both Android and iOS.
Fixes #331
Note: For iOS, the OneSignal Notification Service Extension is only set up for the bundle ID com.friend-app-with-wearable.ios12. This means it won't work with the bundle ID com.friend-app-with-wearable.ios12.dev because this bundle ID isn't included in the Development Team.

Steps to integrate OneSignal on iOS with xcode 15 or higher:
OneSignal/OneSignal-Flutter-SDK#551 (comment)

Android iOS
Android iOS

@@ -22,6 +23,15 @@ void main() async {
await SharedPreferencesUtil.init();
await MixpanelManager.init();
await ObjectBoxUtil.init();
if (Env.oneSignalAppId != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's login independently of permissions, and let's not ask for permissions when the app opens, currently notification permissions are being asked at home/page.dart

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just now actually made this change and after pushing it, realised that the PR has been merged

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened a new PR for this change #347

@josancamon19
Copy link
Contributor

App runs seamlessly, but I have not been able to test because of the onesignal account, merging for now as it is, looking forward for the remaining changes :)

@josancamon19 josancamon19 merged commit 454342e into BasedHardware:main Jun 24, 2024
@mdmohsin7
Copy link
Collaborator Author

App runs seamlessly, but I have not been able to test because of the onesignal account, merging for now as it is, looking forward for the remaining changes :)

I'm adding your email as an admin in my personal OneSignal account. And also should I send the p8 file through mail or you'll be generating a new on through Apple Developer Console?

josancamon19 added a commit that referenced this pull request Jun 26, 2024
This PR implements the changes suggest by @josancamon19 in the #344 PR
(which has been merged, hence a separate PR). It removes the permission
request call at the very beginning of the application and also it
removes the if condition to check whether the user has given permission
for notifications or not.
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

Successfully merging this pull request may close these issues.

Integrate One Signal ($100)
2 participants