Push Up Notifications

Discussion in 'How Can I...?' started by Arsmen Studio, Dec 13, 2016.

Tags:
  1. Arsmen Studio

    Arsmen Studio Avid Boxer

    Joined:
    Dec 6, 2015
    Messages:
    454
    Likes Received:
    170
    Hello guys, I have seen some tutorials here but they aren't clean at all... we need a clean and step by step tutorial on how to ad push up notifications. IOS / ANDROID.
    i already tested this “ http://buildbox.com/forum/index.php?threads/push-notifications.6161/#post-32546
    but it is not very clear as it lost some steps.
    - Example where to add this:

    #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;
    }




    I played a Tasty pill game and i saw push up notification i am very curious how they done it. @Aaron F
     
  2. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,808
    Likes Received:
    2,310
    This are the exact same places where you have to put the Heyzap code. Haven't tested it but I guess this should work if others said it does. Check the Heyzap tutorial for reference.
     
    playsgames6666 likes this.
  3. dusan20002

    dusan20002 Avid Boxer

    Joined:
    Dec 7, 2015
    Messages:
    136
    Likes Received:
    55
    Hi @Arsmen Studio

    In AppContoller.mm

    It should look like this:

    #import <UIKit/UIKit.h>
    #import <OneSignal/OneSignal.h> Add this line for OneSignal on top of AppCntroller.mm
    #import "AppController.h"
    #import "cocos2d.h"
    #import "EAGLView.h"
    #import "PTPAppDelegate.h"


    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

    //Add this line. Replace '5eb5a37e-b458-11e3-ac11-000c2940e62c' with your OneSignal App ID.
    [OneSignalinitWithLaunchOptions:launchOptions appId:mad:"5eb5a37e-b458-11e3-ac11-000c2940e62c"]; add this lines and you are good to go if you are setup OneSignal and Push Notification correctly.
     
    JoeWilson and Arsmen Studio like this.
  4. Arsmen Studio

    Arsmen Studio Avid Boxer

    Joined:
    Dec 6, 2015
    Messages:
    454
    Likes Received:
    170
    thanks MAN! Thisis why we got some errors. yeah we already config onesignal correctly.
     
  5. Arsmen Studio

    Arsmen Studio Avid Boxer

    Joined:
    Dec 6, 2015
    Messages:
    454
    Likes Received:
    170
    I got this error ( use of undeclared identifier "mad" ) :(
     
  6. Fer Zheng

    Fer Zheng Boxer

    Joined:
    Oct 10, 2015
    Messages:
    29
    Likes Received:
    16
    Hi, were you able to implement it?
    I have been trying it for hours but without luck, the same error appears when I try to implement the code:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

    //Add this line. Replace '5eb5a37e-b458-11e3-ac11-000c2940e62c' with your OneSignal App ID.
    [OneSignalinitWithLaunchOptions:launchOptions appId:mad:"5eb5a37e-b458-11e3-ac11-000c2940e62c"];

    I attach an image of the error, would you know what I am doing wrong?
     

    Attached Files:

  7. Arsmen Studio

    Arsmen Studio Avid Boxer

    Joined:
    Dec 6, 2015
    Messages:
    454
    Likes Received:
    170
    No I got errors..
     
  8. Fer Zheng

    Fer Zheng Boxer

    Joined:
    Oct 10, 2015
    Messages:
    29
    Likes Received:
    16
    Hello @Nasser,
    Sorry to bother you, would you be able to give us a little help as regards this error? Would really appreaciate it!
     
  9. Fer Zheng

    Fer Zheng Boxer

    Joined:
    Oct 10, 2015
    Messages:
    29
    Likes Received:
    16
    Hey I had the same error and found out that the original code was with "@". Take a look at the image Screen Shot 2016-12-29 at 11.40.18.png
    What happens is that in this text editor there are tons of emojis, and maybe it converted it into the little red face, which in turn converted the code into "mad". I have changed it into the correct one and im having no issues running it on my iPhone.
    The only problem i have now is that Push notifications do not show up, not even OneSignal recognizes the SDK being integrated.
     
  10. eyal

    eyal Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    642
    Likes Received:
    121
    Thank you for that - amazing and simple
     
  11. Arsmen Studio

    Arsmen Studio Avid Boxer

    Joined:
    Dec 6, 2015
    Messages:
    454
    Likes Received:
    170
    Have configured it correctly?
     
  12. eyal

    eyal Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    642
    Likes Received:
    121
    yes
     
  13. Arsmen Studio

    Arsmen Studio Avid Boxer

    Joined:
    Dec 6, 2015
    Messages:
    454
    Likes Received:
    170
    Can you explain step by step? Make a tutorial? It would be great! :D
     

Share This Page