baker icon indicating copy to clipboard operation
baker copied to clipboard

Parse + Baker

Open damenvaz31 opened this issue 13 years ago • 10 comments

Hi. I´m trying to implement Push Notifications with Parse (https://www.parse.com/products/push) so far I can communicate with Parse servers but my Push Notifications doesn´t display on my App. Have any one some experience with Parse + Baker?

damenvaz31 avatar Aug 02 '13 16:08 damenvaz31

From my experience, you need to comment some part of the Baker Code to make it work.

tekdope avatar Aug 02 '13 20:08 tekdope

@tekdope Can you expand it?

aspek avatar Aug 03 '13 17:08 aspek

So far. My push notifications works on my Baker app .... But only with a new App ID that I create for testing. For the original one of my app the push doesn't work.

Enviado desde mi iPad

El 03/08/2013, a las 12:03, aspek [email protected] escribió:

@tekdope Can you expand it?

— Reply to this email directly or view it on GitHub.

damenvaz31 avatar Aug 03 '13 22:08 damenvaz31

Don't know if this helps but...

In my AppDelegates.m file:

In the didFinishLaunchingWithOptions function I have:

if ([PARSE_PUSH_APPLICATION_ID length] > 0)
    {
        [Parse setApplicationId:PARSE_PUSH_APPLICATION_ID
                      clientKey:PARSE_PUSH_CLIENT_KEY];
    }

I've simply added two constants in the constants.h to check if Parse is enabled in the Xcode project. So I define my ID and KEY in the constants.h file.

In my didRegisterForRemoteNotificationsWithDeviceToken function I have at the end:

if ([PARSE_PUSH_APPLICATION_ID length] > 0)
{
    // Store the deviceToken in the current installation and save it to Parse.
    PFInstallation *currentInstallation = [PFInstallation currentInstallation];
    [currentInstallation setDeviceTokenFromData:deviceToken];
    [currentInstallation saveInBackground];
}

And finally in my didReceiveRemoteNotification function I have added the following in the beginning:

if ([PARSE_PUSH_APPLICATION_ID length] > 0)
{
    [PFPush handlePush:userInfo];
}

Parse push notifications work for me when the app is in foreground and background. I don't know if background downloading still works with my edits, as I haven't had the chance to test that yet.

nicholasmartin avatar Aug 04 '13 13:08 nicholasmartin

Thanks a lot. My Push notifictations are working now!!!

damenvaz31 avatar Aug 05 '13 15:08 damenvaz31

Excellent! I'm closing this then. :)

folletto avatar Aug 05 '13 18:08 folletto

Hi, i setup parse how @lifestylenetworker commented, but me app no sound on push, only show globe. Help please!

carlosajh avatar Aug 27 '13 20:08 carlosajh

Hello
I try to use push notification send with json from Parse's website. This is my json tag { "aps": { "alert": "Hello world", "content-available": 1 }, "badge": "Increment" } My iPad not receive only alert message but otherwise is normal.

And I try to send only alert message with json tag { "aps": { "alert": "Hello world"}} Baker can get it.I don't know why or something wrong?

aspek avatar Aug 29 '13 05:08 aspek

@lifestylenetworker : Hi, nic. To implement parse with baker, did i have to add the library from parse? And did i have to delete code from appdelegate.m like :

#ifdef BAKER_NEWSSTAND NSLog(@"====== Baker Newsstand Mode enabled ======"); ..... #endif

with : if ([@"Oj9Eu6W1VKlt51tW2Wfp8AqQOMh8YwW445EIWAY2" length] > 0) { [Parse setApplicationId:@"..." clientKey:@"..."]; }

?

kukusumaa avatar May 07 '14 04:05 kukusumaa

Hello @pinkycode,

This issue tracker is closed, and it's kept available only for historical reasons. Please post on the new issue tracker here: https://github.com/BakerFramework/baker/issues

folletto avatar May 07 '14 13:05 folletto