Hello Team, I have came across push notification service and want to share it with you guys, you might want to use it in your game and the good thing it is free. The website: https://onesignal.com The documantation: https://documentation.onesignal.com/docs/getting-started Best of luck...
Hello @Christoph Part 1: 1) Follow the instruction by creating push certificate ( https://documentation.onesignal.com/docs/generating-an-ios-push-certificate ) and link it to the app id. 2) Download both certifications (Development & Production) Part 2: 1) Created account in onesignal ( www.onesignal.com ) 2) Add your app to their dashboard and upload (Push Certifications) 3) Continue with the steps and download "Onesingal SDK" ( Download SDK 2.0.1 - https://github.com/OneSignal/OneSignal-iOS-SDK/releases ). Part 3: 1) Export your BB game and open it in xcode. 2) Install "Onesignal SDK" framework under framework section (Same as installing heyzap framework). 3) Ensure -ObjC is there in "Build Settings" - "Other Linker Flags". 4) Add SystemConfiguration.framework to "Link Binary with Libraries" under "Build Phases". 5) Select the root project and Under Capabilities Enable "Push Notifications". 6) Next Enable "Background Modes" and check "Remote notifications". 7) Add following code to your AppDelegate. Code: #import "AppDelegate.h" //Add this line #import <OneSignal/OneSignal.h> @implementation AppDelegate - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { //Add this line. Replace '5eb5a37e-b458-11e3-ac11-000c2940e62c' with your OneSignal App ID. [OneSignal initWithLaunchOptions:launchOptions appId:mad:"5eb5a37e-b458-11e3-ac11-000c2940e62c"]; return YES; } NOTE: - The app onesignal ID is available in onesignal dashboard under APP SETTINGS -> Keys&IDs - Part 3 documentation is available in ( https://documentation.onesignal.com/docs/using-onesignal-in-your-ios-app ). WHERE TO UPLOAD THE PUSH CERTIFICATIONS: ADDING NEW APP WIZARD: ONESIGNAL APP ID (To add/replace it in xcode project)
i dont think xcode will accept emoji in the code section , Better to copy and pasted from the onesingal documentation.
Incredibly awesome. Thanks Nasser! When do the push notification appear? When opening the app? Or can this be chosen somehow?
@Christoph You most welcome bro... It appears in background / iphone screen (If the user accept the notification request at the first time he open the app), then whenever you send notification from onesignal backend. it should delivered to everyone accepted the notifications request. and you also can check every notification report from onesingal backend. But the thing; It is only notification that the user will receive but for the callback / deeplinking is something that the developer needs to configure and i'm still trying to figure this out (i.e when notification is opened the action will takes the user to game store or anything else). Enabling background notification (xcode): Notification delivery report (Onesingal):
Btw there is Google Firebase Cloud Messaging which is doing pretty much the same for Android and iOS: https://firebase.google.com/docs/cloud-messaging/
where do i put #import "AppDelegate.h" //Add this line #import <OneSignal/OneSignal.h> @implementation AppDelegate - (BOOL)applicationUIApplication*)application didFinishLaunchingWithOptionsNSDictionary*)launchOptions { //Add this line. Replace '5eb5a37e-b458-11e3-ac11-000c2940e62c' with your OneSignal App ID. [OneSignal initWithLaunchOptions:launchOptions appId"5eb5a37e-b458-11e3-ac11-000c2940e62c"]; return YES; } i don't know where is appdelegate... do you mean (app controller.mm) ? i dont know where do i have to paste these . i got a lot of errors after trying.@Christoph
REALLY interested in this as I'm also having issues as the last post... WHERE to actually put the code because there is no AppDelegate file? Could anyone please help?
Thank you for this detailed tutorial but I don't understand something - This part - " #import "AppDelegate.h" //Add this line #import <OneSignal/OneSignal.h> @implementation AppDelegate - (BOOL)applicationUIApplication*)application didFinishLaunchingWithOptionsNSDictionary*)launchOptions { //Add this line. Replace '5eb5a37e-b458-11e3-ac11-000c2940e62c' with your OneSignal App ID. [OneSignal initWithLaunchOptions:launchOptions appId"5eb5a37e-b458-11e3-ac11-000c2940e62c"]; return YES; } We don't use AppDelegate in BB and also there is no OneSignal.h file What to do ? Also when importing the SDK - where to and which file ? Thank you