Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't register Push Notification service with iOS Devices - PhoneGap ParsePlugin #90

Open
Farukest opened this issue Dec 11, 2015 · 9 comments

Comments

@Farukest
Copy link

I'm using PhoneGap ParsePlugin. I can register to "parse.com Push Notification Service" with my Android devices. Everything clear with Android but not with Ios. Whatever i tried i couldn't register.

I followed these steps on my Apple Developer Account

  1. I created a "Certificate" with Ad Hoc on my developer.apple.com
    account.
  2. Created an "App IDs" with Push Notifications ( configured and
    enabled the "Distribution-Push Notifications" ) and then download
    the Certificate. Let's say it's name : "PushNotification"
    certificate.
  3. Created a two device with UUID's
  4. Created a Provisioning Profile (Distribution) with Ad Hoc ( added
    App ID and devices to this provision )

PhoneGap Build

  1. Added Certificate (Ad Hoc)
  2. Added Provisioning Profile (Ad Hoc)
  3. Activated the key.
  4. Rebuild and created an ipa succesfully (app).

Parse.com

  1. Created and ".p12" certificate from "PushNotification" certificate
    which downloaded after created and App ID.
  2. Added this certificate to "Apple Push Certificate" on
    parse.com.

Here is my code:

onDeviceReady: function() {
  try {
      parsePlugin.initialize("appID", "clientKey");
  }catch (err){
      alert(err.message);
  }
}

and register with :

var parsePlugin = {

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

Hope you can help me. Thanks in advance.

@Giabanga
Copy link

+1

@zinglax
Copy link

zinglax commented Jan 15, 2016

Do you get an error message from your try/catch block? I was having issues yesterday and when I was debugging with safari the parse.initialize() was not throwing and error, just basically skipped over it. From my experience when this was happening it was because my certs were not correct. I have gotten iOS to work with this plugin.

@MichaelKuhinica
Copy link

@zinglax did you change anything in your iOS build code to make it work?
I'm also having problems to make it work on IOS, it looks like it's skipping the initialization without errors.

@zinglax
Copy link

zinglax commented Jan 21, 2016

@MichaelKuhinica no not anything specific when it comes iOS vs Android. Make sure your App ID is the same for the project and for the .p12 file you upload to Parse. I also had issues when they were not the same. Ex. my app was com.xalginz.test and my .p12 was com.zinglax.test and my code would skip the initialize().

@Giabanga
Copy link

On iOS 8 and 9, I had to use production provisioning profile (ad hoc) and push certs to make it work

@MichaelKuhinica
Copy link

I managed to kind of make it work. I had to use the production provisioning profile, as @Giabanga suggested but I couldn't subscribe to the default channel, I will try the different approaches suggested on issue #65 and report back.

@zinglax
Copy link

zinglax commented Jan 26, 2016

I was able to get the development keys working. Not sure how or why though.

@MichaelKuhinica
Copy link

@zinglax on iOS > 8?
I got it working with distribution keys, but used this fork instead: https://github.com/denisbabineau/phonegap-parse-plugin

@zinglax
Copy link

zinglax commented Jan 31, 2016

@MichaelKuhinica yeah im actually using this one for the call backhttps://github.com/grrrian/phonegap-parse-plugin

bal200 pushed a commit to bal200/parse-push-plugin that referenced this issue Apr 14, 2019
With help of @nguyenphucthanh and @adjmb for Android solution.

Ios solution in commit 33d8e1f
bal200 pushed a commit to bal200/parse-push-plugin that referenced this issue Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants