One Signal is the world leader n push notifications and they offer their service for free.
Push notifications are one of the biggest advantages that mobile apps have over mobile websites, since they can send messages to users without the app being open.
However, annoying notifications---those that are irrelevant and too frequent---can be dismissed or blocked easily. We highly recommend sending notifications only when the content is relevant to the user. Examples include an e-commerce app letting the end user know about a sale, or a game app letting the user know about a new level or feature.
Push Notifications are a
component. While all Thunkers can add Push Notifications to their app projects and live test them in their apps (Android only), only Thunkers with PRO, Business or Enterprise accounts can download and publish apps with Push Notifications. See our pricing page for more details.
Adding a Push Notifications component to your app
To add or edit a Push Notifications component to your app :
Go to your Blocks tab
Click the ⚙ icon next to the Push Notifications drawer
You will see a dialog with options to enter an Android app ID or an iOS app ID for your Push Notifications component. You can learn how to get these IDs in the rest of this document.
Android App ID
App ID from One Signal for Android devices
iOS App ID
App ID from One Signal for iOS devices
Toggle whether to show your end users a request to share their location with OneSignal
OneSignal allows you to push messages to users in certain locations. You will need permission from your end users to register their location to use this feature.
You can toggle whether you request geolocation permissions from your end users in the Push Notifications settings panel.
Sign up with One Signal
One Signal is a free service that supports unlimited devices and notifications. You can learn more about their features on the OneSignal pricing page
Get started by creating a new app. You need to do this even if your Thunkable project is intended for both iOS and Android.
Enter a name and choose Apple iOS as your platform.
Click Next: Configure Your Platform
2. Configure Platform
OneSignal have provided extensive documentation on how to find your Production Certificate .p12 file as well as your Production Private Key Password. The most important steps are outlined below.
To begin, open the OneSignal Provisionator webpage. This tool will generate a .p12 file and the accompanying password for you.
Follow the on screen instructions. Enter your Apple Developer ID and password. This portal works with 2FA enabled as well. If prompted, enter your 2FA code. Choose your team and the relevant Bundle ID and click generate. You must be a Team Administrator to generate the files.
You can now download the .p12, .cer and .pem files that are generated for you.
Don't forget to save your password somewhere safe!
Click on Apple iOS
With that completed you can upload your .p12 file and enter the password in OneSignal. Click Save to proceed to the next step.
Click Save & Continue
3. Select SDK
Click on Native iOS to choose the SDK you wish to target. Then click Next to generate your App ID.
4. Install SDK
Copy the alpha-numeric code labeled Your App ID and head back to Thunkable.
On Thunkable, open the Push Notifications dialog and paste this ID into the iOS App ID field.
You are now almost done. In order to now publish your app your will have to create a .mobileprovision profile. You can find details of how to do this on the "Publish to App Store" page.
When you are ready to send your first push notification, select the "MESSAGES" option and then select "NEW PUSH". You will now be able to create push notifications and send them to your app users.
This block returns the unique user ID of the device