This repo contains a sample project integrating the OneSignal Flutter SDK into a starter Flutter targeting for Android and iOS.
There are quite a few moving pieces to get this sample to work due to the nature of Flutter and the platforms it targets.
- Setup a OneSignal account if you don't already have one.
- Use the OneSignal Dashboard to create a new app.
- Configure the platform you'd like to target...
I recommend starting with Android first.
- Create a new Firebase project
- Select your app in the OneSignal dashboard.
- Enter your Firebase info.
- Select Flutter as your SDK.
- Obtain an Apple push certficate
- Select your app in the OneSignal dashboard.
- Navigate to settings.
- Find and select iOS in the platform list.
- Upload your certificate (
*.p12
). - Enter the passphrase you encrypted your certificate with.
- Select Flutter as your SDK.
Open the project in Android Studio or VS Code.
- Find all occurrences of,
com.example.onesignal_and_flutter
- Replace all occurrences with the unique bunlde identifier you used in setting up iOS.
- If you're deploying to Android only, replace the
com.example
bit of the identifier with something unique to you.
- If you're deploying to Android only, replace the
- Install Flutter dependencies,
flutter pub get
- Install iOS dependendies. From
ios
directory,pod install
(required if targeting iOS) - Start the project. From project root,
flutter run
OneSignal has a growing community of excited developers and integrators. You can join us on Discord and follow us on Twitter.
The OneSignal Beta Program is a diverse group of users and companies who participate in our feature development process. Beta members help shape the future of OneSignal products by providing feedback, sharing ideas, and testing out new features before they're released.