Git Product home page Git Product logo

phonegap-parse-plugin's Introduction

Phonegap Parse.com Plugin

Phonegap 3.0.0 plugin for Parse.com push service

Using Parse.com's REST API for push requires the installation id, which isn't available in JS

This plugin exposes the four native Android API push services to JS:

Installation

Pick one of these two commands:

phonegap local plugin add https://github.com/benjie/phonegap-parse-plugin --variable APP_ID=PARSE_APP_ID --variable CLIENT_KEY=PARSE_CLIENT_KEY
cordova plugin add https://github.com/benjie/phonegap-parse-plugin --variable APP_ID=PARSE_APP_ID --variable CLIENT_KEY=PARSE_CLIENT_KEY

Initial Setup

Once the device is ready, call parsePlugin.initialize(). This will register the device with Parse, you should see this reflected in your Parse control panel. After this runs you probably want to save the installationID somewhere, and perhaps subscribe the user to a few channels. Here is a contrived example.

(Note: When using Windows Phone, clientKey must be your .NET client key from Parse. So you will need to set this based on platform i.e. if( window.device.platform == "Win32NT"))

parsePlugin.initialize(appId, clientKey, function() {

	parsePlugin.subscribe('SampleChannel', function() {
		
		parsePlugin.getInstallationId(function(id) {
		
			/**
			 * Now you can construct an object and save it to your own services, or Parse, and corrilate users to parse installations
			 * 
			 var install_data = {
			  	installation_id: id,
			  	channels: ['SampleChannel']
			 }
			 *
			 */

		}, function(e) {
			alert('error');
		});

	}, function(e) {
		alert('error');
	});
	
}, function(e) {
	alert('error');
});

Usage

<script type="text/javascript">
	parsePlugin.initialize(appId, clientKey, function() {
		alert('success');
	}, function(e) {
		alert('error');
	});
  
	parsePlugin.getInstallationId(function(id) {
		alert(id);
	}, function(e) {
		alert('error');
	});
	
	parsePlugin.getSubscriptions(function(subscriptions) {
		alert(subscriptions);
	}, function(e) {
		alert('error');
	});
	
	parsePlugin.subscribe('SampleChannel', function() {
		alert('OK');
	}, function(e) {
		alert('error');
	});
	
	parsePlugin.unsubscribe('SampleChannel', function(msg) {
		alert('OK');
	}, function(e) {
		alert('error');
	});
</script>

Quirks

Android

Parse needs to be initialized once in the onCreate method of your application class using the initializeParseWithApplication method.

If you don’t have an application class (which is most likely the case for a Cordova app), you can create one using this template:

package my.package.namespace;

import android.app.Application;
import org.apache.cordova.core.ParsePlugin;

public class App extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        ParsePlugin.initializeParseWithApplication(this);
    }

}

And add your application name to AndroidManifest.xml:

<application android:name="my.package.namespace.App" ... >...</application>

Compatibility

Phonegap > 3.0.0

phonegap-parse-plugin's People

Contributors

amsul avatar avivais avatar benjie avatar codeblockscreative avatar jarseneault avatar mayroncachina avatar rjmunro avatar sydlawrence avatar tasmasm avatar xydudu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phonegap-parse-plugin's Issues

Subscriptions not being created

I can connect to the parse plugin and get the installation id but the subscriptions never get saved.

The code below outputs:
Successfully connected to parse plugin
Installation id: 123456
subscriptions: []
subscribed to own channel: userJ123
subscriptions: []

    window.parsePlugin.initialize('abcdef', '123456',
      function(success) {
        console.log('Successfully connected to parse plugin');
        // alert('success');
        window.parsePlugin.getInstallationId(function(id) {
          installationId = id;
          console.log('Installation Id' + installationId);
          window.parsePlugin.getSubscriptions(function(subs) {
            subscriptions = subs;
            console.log('subscriptions: ' + subs);

            // subscribe user to itself
            var userChannel = 'user' + Parse.User.current().id;
            if (subscriptions.indexOf(userChannel) === -1) {
              window.parsePlugin.subscribe(userChannel, function() {
                console.log('subscribed to own channel: ' + userChannel);

                // Test that subscribe is working
                window.parsePlugin.getSubscriptions(function(subs) {
                  console.log('subscriptions: ' + subs);
                });
              }, function (e) {
                console.log('error subscribing to own channel' + e);
              });
            }
            console.log('subscriptions:', subs);
          }, function (e) {
            console.log('error' + e);
          });
        }, function(e) {
          console.log('Error Getting ID: ' + e.code + ' : ' + e.message);
        });

      }, function(e) {
        // alert('error');
        console.log('error connecting to push with code: ' + e);
      });

Am I supposed to pass the installation id to the subscribe method?

Thanks in advance.

Phonegap Build plugin

Hi, please submit this plugin to PG. There is one but it is old, it doesn't work with iOS.
Thanks

Expected content type error

Hello,
I am getting below error in the console. Does anyone know how to address this?
Did anyone seen this before?
Thanks a lot.

Error: Error Domain=com.parse.networking.error Code=-1016 "Expected content type {(
    "text/json",
    "application/json",
    "text/javascript"
https://api.parse.com/2/create, NSLocalizedDescription=Expected content type {(
    "text/json",
    "application/json",
    "text/javascript"
)}, got text/html} (Code: 100, Version: 1.2.16)

Notification in App?

Apologies, this is more of a question than an issue, but I haven't been able to figure this out for a while.

So using this plugin with parse, I am able to get messages that pop up as system notifications in iOS and Android. When I click on the notification, my app is opened. My question is, is there any way for the app to know that it's been opened in response to a notification? Is there any way for the app to recieve the notification message directly or indirectly?

On Notification Event?

I was able to easily get push notifications on my device with this plugin, but is there a way to get the message from the push notification in the app? In other words, is there an event that is triggered when a notification is received or when the app is opened from a notification?

For example: if I send the notification that says "Hello", it will show up in the notification drawer and it will say "Hello", but when I open it, the app does nothing. I would like to show a popup alert with the message "Hello" when the app is opened via the notification.

Help to configure for Windows Phone 8

Hello,
I have install plugin using CLI with app id and .NET Key.
And use following code in my html file

function init() {
document.addEventListener("deviceready", initPushwoosh, true);
//rest of the code
}
function initPushwoosh()
{
alert("om");
parsePlugin.initialize();
}
parsePlugin.initialize(appId, clientKey, function () {
alert('success'+appId+"----"+clientKey);
}, function (e) {
alert('error');
});

                        parsePlugin.getInstallationId(function (id) {
                            alert(id);
                        }, function (e) {
                            alert('error');
                        });

                        parsePlugin.getSubscriptions(function (subscriptions) {
                            alert(subscriptions);
                        }, function (e) {
                            alert('error');
                        });

                        parsePlugin.subscribe('SampleChannel', function () {
                            alert('OK');
                        }, function (e) {
                            alert('error');
                        });

                        parsePlugin.unsubscribe('SampleChannel', function (msg) {
                            alert('OK');
                        }, function (e) {
                            alert('error');
                        });
                    </script>
</head>

But its not going in parsePlugin.initialize function.
Please help me.
Thanks in Advance.

ParseSDK 1.7 compatibality

i want receive parse intent

<receiver android:exported="false" android:name="com.my.app.Receiver"> <intent-filter> <action android:name="com.parse.push.intent.RECEIVE" /> <action android:name="com.parse.push.intent.OPEN" /> <action android:name="com.parse.push.intent.DELETE" /> </intent-filter> </receiver>

Receiver.java use com.parse.ParsePushBroadcastReceiver.

I found the import in Parse SDK 1.7.
After i update parse sdk in the plugin.
The app force close upon launching.

Anybody succeed develop cordova (4.X) app with Parse SDK 1.7?

`broadcast intent callback: result=CANCELLED` error

I have spent the last few days trying to get notifications working, reading up on all sorts of plugins and I've come to the end of my rope. I've been able to successfully receive notifications with Parse's test apps on Android and iOS, but whenever I try to add to my own app I see an error in adb logcat

cordova version: 3.5.0-0.2.4

These are the steps I perform:

cordova create pushTest
cordova platform add android
cordova plugin add https://github.com/benjie/phonegap-parse-plugin

then inside of www/js/index.js I alter the onDeviceReady function to look like this (with my actual appID and clientKey substituted)

    onDeviceReady: function() {
        app.receivedEvent('deviceready');

        parsePlugin.initialize(appId, clientKey, function() {
            parsePlugin.subscribe('', function() {
                alert('OK');
            }, function(e) {
                alert('error');
            });
        }, function(e) {
            alert('error');
        });        
    }

Then I clear out my Installation class in Parse to make sure the app registers successfully. I also make sure any previous app I've installed to my android device has been deleted. Then...

cordova build
adb install platforms/android/ant-build/HelloCordova-debug.apk

I get an alert popup that says 'OK' and I have a new record in the Installation class in Parse. I make sure the app is not running in the foreground on my android device. I then send a push notification from Parse, and I don't see anything while running adb logcat
From some other debugging I had tried, I tried replacing the version of the Parse SDK from 1.3.8 to 1.5.1 by just removing the old file from the platforms/android/libs dir and putting the new one there. Once I do that, I see the below error in adb logcat

( 2795): GCM message io.cordova.hellocordova 0:1402793727153630%0#39597f64f9fd7ecd
W/GCM-DMM ( 2795): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=io.cordova.hellocordova (has extras) }

That error is what I've been stuck at, and would love guidance with.

Parse/Parse.h file not found - Xcode 6 again

I am sorry to re-open this issue. The solution given in the previous one does not apply to me :(

After doing:
$ cordova plugin add https://github.com/avivais/phonegap-parse-plugin
$ ionic platform rm ios
$ ionic platform add ios

XCode complains about the Parse.h file not found. It is in fact there. All I need to do is:

  • open the project in XCode,
  • go to General > Linked Frameworks and libraries
  • remove, then add the Parse.framework from the same directory,

and it works again! Mind blown. There is no /Versions subfolder in Parse.framework.

I don't want my teammates to go through this process. Does anybody else have this issue, or hints?

getInstallationObjectId - Asynchronicity issue - Help & Idea

Hey,
I was trying to get my Installation Object Id using the method getInstallationObjectId but I am having some problems. If I run it as soon as the app runs it returns null, but what is strange is that the method getInstallationId returns the expected value just right after the app opens without problems. I need the object id in order to make an update in the object and a few more attributes to the installation, like for example the user.

Can someone please help me find the solution?

PD: It would be really cool to have a method call "addAtributeToInstallation" (or something similar) and that given the name of the attribute and the attribute values, it stores it without having to make any HTTP request outside the plugin.

Something like this:
window.parsePlugin.addAtributeToInstallation("color, "blue");

Thanks you all very much!
Hope someone can help me :)

No registered devices

The readme says
Once the device is ready, call parsePlugin.initialize(). This will register the device with Parse, you should see this reflected in your Parse control panel.

Where on the Parse control panel should I see it?
I received an installation id, but I don't see any data in the data browser. The list stays empty.

I am trying on emulators (both android and ios). I did not do anything else that the readme file to get started. I'm thinking maybe I am missing some prerequisite steps, but at the same time why would I received a installation id if something failed along the way??

      parsePlugin.initialize(PARSE_APP_ID, PARSE_KEY, function() {

        parsePlugin.subscribe('all', function() {

          parsePlugin.getInstallationId(function(id) {

            alert(id);

          }, function(e) {
            alert('error');
          });

        }, function(e) {
          alert('error');
        });

      }, function(e) {
        alert('error');
      });

Even if I didn't do a subscribe, I should see the installation entry anyways no?

Test push but device was not registered.

Hi,

I used the plugin, even uploaded the apk. build --release with cordova to my device. When trying to test push from parse control panel. It says device not registered

FacebookSDK / -ObjC flag issues

Looks like these can be resolved if building natively but not when running this plugin. Can you take a look please?

Undefined symbols for architecture i386:
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
"OBJC_CLASS$_FBAppCall", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"OBJC_CLASS$_FBRequest", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"OBJC_CLASS$_FBSession", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"OBJC_CLASS$_FBSessionTokenCachingStrategy", referenced from:
OBJC_CLASS$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
"OBJC_METACLASS$_FBSessionTokenCachingStrategy", referenced from:
OBJC_METACLASS$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)

Unable to subscribe to a channel

I have it installed and registering ok in android / cordova 3 / angular 1.3.6 / parse js sdk 1.4.1.

Once registered, i have a toggle that allows the user to subscribe/unsubscribe to a channel.
I am unable to subscribe to a channel, there is no error returned.

This is my subscribe code :

                parsePlugin.subscribe('user_123', function() {
                    console.log('PN complete'); // i can see this in the console, yet channels in parse.com is empty
                }, function(e) {
                    console.log('PN1 ERROR',e);
                });

As i can register, i assume the plugin is installed ok and connecting to parse.com with the app id and client key. Can you think of a reason why it wont subscribe?

Note that I did not implement the "Android Quirk" as it threw an error on cordova build, but i can see in a pull request that this is no longer needed.

notification is not received

HI
I already installed the plugin and everything gonna fine, unless that the notification will not be received unless the application on background.
note that the notification will be received when the application launched.
Thanks.

tips on How to store user pointer to Installation Object..

I guess many folks using this plugin will face this issue. Because saving user obj to the installation is needed for targeted push notification. I finally made it work at 4:15am -:) for my ClassMade app (www.iClassMade.com), an app for college students to find girl/boy friends.

Here is how I made it work.
I modified the getInstallationId function to let it take one parameter userid

and then in the CDVParsePlugin.m the getInstallationId function
add the following code

//we just need to pass the userid from JS code to this function, and we can save it to the Installation @"rKGIJNHipB"
NSString *userid = [command.arguments objectAtIndex:0];
PFInstallation *installation = [PFInstallation currentInstallation];

installation[@"user"] = [PFObject objectWithoutDataWithClassName:@"_User" objectId:userid];
[installation saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error)
{
if (error != nil)
{
NSLog(@"ParsePushUserAssign save error.");
}
}];

then in my html js code, after user login
just call

parsePlugin.getInstallationId(user.id,function(id) {
console.log(id +" id");

                                  }, function(e) {
                                  console.log('error');
                                  });

cheers!

Not able to make it work

Hi

I am using this plug in.
I am not able to make it work .

When i use the below code, it always going to the error function saying the

"Class not found"

parsePlugin.initialize(PARSEAPPID, PARSECLIENTKEY, function() {
alert('success');
}, function(e) {
alert('error' + e);
});

Can you please help to get it sorted it out.

Thanks
Raj

Build failed with cordova biuld ios

Hi. Any help will be appreciate

I installed the plugin, but it can be build for ios, this is the error message:

$ cordova build ios


ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
Ld build/emulator/UAL.app/UAL normal i386
(1 failure)
Error: /Users/superedmundo/Documents/Projects/UAL/platforms/ios/cordova/build: Command failed with exit code 65
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)

how to add to phonegap config.xml

hi, im trying to use your plugin for my first phonegap app, ive added with phonegap local plugin add https://github.com/benjie/phonegap-parse-plugin

but cant seem to be defined when trying to use it in my code, ive added this to the config.xml in phonegap:

 <plugins>
        <plugin name="parsePlugin" value="org.apache.cordova.core.parseplugin"/>
        <gap:plugin name="phonegap-parse-plugin" />
    </plugins>

and trying to use it like this

  window.parsePlugin.initialize(PARSE_APP, PARSE_REST, function() {
        alert('success');
    }, function(e) {
        alert('error');
    });      

but still doesnt work, can you help me please?

Android app crash on incoming notifications - com.parse.GcmBroadcastReceiver not found

Hi there,

After installing the plugin incoming android notifications are captured but the app immediately crashes with the following error:

E/AndroidRuntime( 3709): java.lang.RuntimeException: Unable to instantiate receiver com.parse.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class "com.parse.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/co.yougoigo.app-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/AndroidRuntime( 3709):    at android.app.ActivityThread.handleReceiver(ActivityThread.java:2560)
E/AndroidRuntime( 3709):    at android.app.ActivityThread.access$1700(ActivityThread.java:144)
E/AndroidRuntime( 3709):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1355)
E/AndroidRuntime( 3709):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 3709):    at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 3709):    at android.app.ActivityThread.main(ActivityThread.java:5221)
E/AndroidRuntime( 3709):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3709):    at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 3709):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/AndroidRuntime( 3709):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
E/AndroidRuntime( 3709): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.parse.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/co.yougoigo.app-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/AndroidRuntime( 3709):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime( 3709):    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime( 3709):    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
E/AndroidRuntime( 3709):    at android.app.ActivityThread.handleReceiver(ActivityThread.java:2555)
E/AndroidRuntime( 3709):    ... 9 more
E/AndroidRuntime( 3709):    Suppressed: java.lang.ClassNotFoundException: com.parse.GcmBroadcastReceiver
E/AndroidRuntime( 3709):        at java.lang.Class.classForName(Native Method)
E/AndroidRuntime( 3709):        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
E/AndroidRuntime( 3709):        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
E/AndroidRuntime( 3709):        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
E/AndroidRuntime( 3709):        ... 11 more
E/AndroidRuntime( 3709):    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

Anyone came across this error loading the receiver?

MainApplication cannot be resolved

I installed the Parse SDK and the plugin provided, but parsePlugin.java keeps getting an error:
MainApplication cannot be resolved

on:
getSubscriptions
subscribe
unsubscribe

and i don't know what i'm doing wrong

Terminating app due to uncaught exception 'NSInternalInconsistencyException'

Thanks for making this!

  1. Quick note, after adding this I then had to install the Facebook IOS SDK as I was getting a linker issue much like the trace here: https://www.parse.com/questions/linker-flag-objc-causes-build-to-fail
  2. Once I got it to compile... I started getting the Runtime exception below. Note: I haven't even added any of the pushPlugin javascript to my project yet

I shouldn't need to modify any native code correct?

The error message says I need to setApplicationId... But, I suspect that is more of a generic error message and not sure where one would set that.

2014-04-08 00:46:41.661 Alertus Mobile[1392:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'You have to call setApplicationId:clientKey: on Parse to configure Parse.'
*** First throw call stack:
(0x306f1e83 0x3aa526c7 0x306f1dc5 0x128a8b 0x126005 0x108757 0x15265b 0x10498d 0x3318ca77 0x3318d5e1 0x33efeb37 0x306bc777 0x306bc713 0x306baedf 0x30625471 0x30625253 0x353592eb 0x32eda845 0xf7857 0xf7818)
libc++abi.dylib: terminating with uncaught exception of type NSException

cordova can't build the project

cordova can't build the project with this plugin.
when i open the project in eclipse , eclipse shows error in ParsePlugin.java
error

Usage Example missing Quote

The Usage Example states:

< script type="text/javascript>

but should be:

< script type="text/javascript">

Fix Readme

People is getting confused when installing the plugin, they are installing it (cordova add) from benjie's repository because you Readme points to benjie's URLs.

Thanks so much for keeping the plugin updated,
Cheers!

Events on notification received

Hi guys,
I see there isn't a way to listen on notification's received events.

With this we can apply some custom action like open a specific page when a user tap on notification.

Something like this:

pushPlugin.on('received', function(notification)
{
     // ...
});

Thoughts?
I think this is a very important feature.

Android : App crash when try to subscribe to multiple channels

When i add multiple channles as

var channels = new Array();
channels.push('sibelga');
channels.push('myb');
channels.push('catlovers');

parsePlugin.subscribe(channels, function() {
alert('OK');
}, function(e) {
alert('error');
});

app quit unexpectedly on android.

Missing Installations record in Parse

I have encountered a case where a user didn't allow push notification when the app starts for the first time. Ever since then, no matter what I do this device cannot register successfully.

I have tried to remove the Installations record, and it won't add back the record.

Any idea, any have the some issues?

Upgrade to latest Parse sdk

What would we need to do to upgrade to the latest Parse?
I tried replacing the JAR but it just doesn't build

symbol(s) not found for architecture armv7

When attempting to build I am getting this error. Is there something else I need to install to get it working? I am pretty sure I have used previous versions of this plugin not too long ago and did not have any issues

IOS support

I don't have problems with this plugin in Android, even i can initialize the plugin in the android emulator i'm able to get the installation id, but with IOS i'm having problems, in the IOS emulator the function parsePlugin.initialize don't work. I opened the project in Xcode and trying to run the app in my iPhone to see if works, but it didn't.

I need some help!

Installations are showing without without a deviceToken in Parse

I'm getting the installation show up in the Parse data browser, the right app name, version number and I'm subscribing to a channel based on the users session ID, all that shows up in the right columns but the deviceToken column is empty, and when I try and send a push from Parse, it shows the correct number of recipients but the PN never arrives.

This is a Cordova 3.5.0 app, this is the code I'm using in the deviceready function:

// init parse
window.parsePlugin.initialize(
    "app_id", 
    "client_key",
    function() {
        console.log( 'PARSE INIT OK' );
        window.parsePlugin.getInstallationId(function(id) {
            installationID = id;        

        }, function(e) {
            console.log("Error Getting ID: " + e.code + " : " + e.message);
        })
    }, 
    function( e ) {
        console.log( 'PARSE FAILED' );
    }
);

I see the "PARSE INIT OK" message in logCat in Eclipse

No branches or tags

Can I please request that you branch or tag for major releases? This makes it a lot easier for us to install a deterministic version of the plugin.

Remove Message Box

Is there a way to remove the default messagebox when push is received? I also would like to intercept the notification and change some behaviors or open other views.

Thanks.

I have an error when running ios

Hi, i try to use this plugin to ios, follow step on readme.md
but when i'm running on simulator there is an error:

Undefined symbols for architecture i386:
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
"OBJC_CLASS$_FBAppCall", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"OBJC_CLASS$_FBRequest", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"OBJC_CLASS$_FBSession", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"OBJC_CLASS$_FBSessionTokenCachingStrategy", referenced from:
OBJC_CLASS$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
"OBJC_METACLASS$_FBSessionTokenCachingStrategy", referenced from:
OBJC_METACLASS$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Could anyone help me to solve it?
Thank you

parsePlugin.initialize is never run on ios

I have the parsePlugin working on Android, but on iOS it arrives at:

return parsePlugin.initialize('asd', 'qwe', (function() {
...
}

It goes to:

    initialize: function(appId, clientKey, successCallback, errorCallback) {
        cordova.exec(
            successCallback,
            errorCallback,
            'ParsePlugin',
            'initialize',
            [appId, clientKey]
        );
    },

But the original code inside initialize is never run,

duplicate symbol _OBJC_IVAR_$_BFAppLinkTarget._URL

I have an Ionic project and I am receiving this message when I try to compile my project on xCode. This project used to work fine with the parse plugin, but I have installed the facebookconnect plugin and now it seems the bolts are duplicate.

duplicate symbol OBJC_IVAR$_BFAppLinkTarget._URL in:
MyTest/Plugins/com.parse.cordova.core.pushplugin/Bolts.framework/Bolts(BFAppLinkTarget.o)
MyTest/Plugins/com.phonegap.plugins.facebookconnect/FacebookSDK.framework/FacebookSDK(BFAppLinkTarget.o)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.