Eric5020946
Posts: 0
Joined: Tue Sep 18, 2012 4:31 pm

Push Notifications with Parse,com

Since I don;t know XCode and project structure very well I could use some help. I exported xcodeproj form tiggzi and imported into XCCode 4.5.x

Below instructions from parse,com on code implementation, 2 simple snippets to add.

1) ==from parse==
Open up your AppDelegate.m file and add the following import to the top of the file:
#import
Then paste the following inside the application:didFinishLaunchingWithOptions: function:
[Parse setApplicationId:@"personalkeyidapp"
clientKey:@"personalclientkeyhere"];
=============

QUESTION: does it go into phonegaptemplate.m file?

2) ==from parse - testing procedure==
Add the following code to your main app delegate class and inspect the error given:

  • (void)application:(UIApplication *)application
    didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
    {
    if ([error code] == 3010) {
    NSLog(@"Push notifications don't work in the simulator!");
    } else {
    NSLog(@"didFailToRegisterForRemoteNotificationsWithError: %@", error);
    }
    }

    QUESTION: I can't locate this method, where do I find it?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Push Notifications with Parse,com

I'm guessing it's better if you ask Parse as it's their tutorial.

Eric5020946
Posts: 0
Joined: Tue Sep 18, 2012 4:31 pm

Push Notifications with Parse,com

I did but looks like epxorted by tiggzi xcode is very specific structure-wise due to included cordova project and naming convention

Agon Bina
Posts: 0
Joined: Thu Oct 04, 2012 5:01 am

Push Notifications with Parse,com

Max, a tutorial showing us how to use the push notifications from Parse in our Tiggzi app would be very helpful, when you get a chance to make it :)

egonzalez
Posts: 0
Joined: Fri Sep 14, 2012 9:34 pm

Push Notifications with Parse,com

That would be incredibly helpful. It's a feature I will definitely need to use as well. An extremely basic implementation of it would suffice!

Eric5020946
Posts: 0
Joined: Tue Sep 18, 2012 4:31 pm

Push Notifications with Parse,com

Max, just so you know parse.com has very clear instructions but it gets tricky when code should be added to specific function or file - names they use are different than in tiggzi xcode

BTW the moment when you have your push notification service running I'll be the first one to switch back to tiggzi :)

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Push Notifications with Parse,com

We are already working on Push.. it will be out soon. We are also planning builder-push integration so it's going to be awesome and super easy!

As for Parse -- just need to find time :)

egonzalez
Posts: 0
Joined: Fri Sep 14, 2012 9:34 pm

Push Notifications with Parse,com

Thanks Max! I'll also be happy to start using Tiggzi DB

Eric5020946
Posts: 0
Joined: Tue Sep 18, 2012 4:31 pm

Push Notifications with Parse,com

UPDATE:

I managed to enable push notifications via parse.com, here are some tips:

  • add code from this docs first https://parse.com/docs/ios_guide#push

  • add code from you Quick Start docs when logged in to your account

  • comment #import "PushNotification.h" in phonegaptemplateappdelegate.m - this comes from phonegap and overwrites parse implementation, looks like tiggzi doesn't support push notification plugin but it's atatched to the project anyway

  • comment any push notification code that shows up as error when building

  • follow Quick Start steps and compile

  • run with developer profile on your iphone or with distribution profile via adhoc

    if run into missing libCordova.a file when compiling in XCode 4.5.1, open cordova project seperatly, change build to 4.3, remove armv6 architecture form both project and target and build, go back to phonegaptemplateapp and build, it should fix missing file

Return to “Issues”