Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Push IOS #172

Closed
deluxeuo opened this issue Sep 27, 2015 · 13 comments
Closed

Push IOS #172

deluxeuo opened this issue Sep 27, 2015 · 13 comments

Comments

@deluxeuo
Copy link

friends..
  I'm using push for android and is working correctly.

with the same code tried to use in IOS, after setting up my certificates

for IOS I can also use the same SenderID google ??

For IOS configuration is different?

var push = PushNotification.init({
    "android": {
        "senderID": "xxx"
    },
    "ios": {"alert": "true", "badge": "true", "sound": "true"}, 
    "windows": {} 
});

I tried to use the same code and have the error in the console xocde

  Push Plugin failed register

@xavianaxw
Copy link

@deluxeuo from my knowledge, you do not need to use Google's Sender ID for iOS.

Instead, you need to set up your app id, certificates and provisioning profile accordingly. Try checking out this tutorial to do so.

http://code.tutsplus.com/tutorials/setting-up-push-notifications-on-ios--cms-21925

Cheers

@deluxeuo
Copy link
Author

I already set up the certificates to push, and he is ok to push.
Now I do not know how to use pushplugin for IOS, in your example does not use pushplugin / right phonegap?

@xavianaxw
Copy link

@deluxeuo I'm using phonegap-plugin-push for this one. It's a phonegap plugin but I'm building it with Ionic + Cordova

Are you able to receive your notification?

@deluxeuo
Copy link
Author

@xavianaxw

It must use this setting for ios?

would look like?

var push = PushNotification.init({
"android": {
"senderID": "741175631277"
},
"ios": {"alert": "true", "badge": "true", "sound": "true"},
"windows": {}
});

When you open the emulator, it request permission to push, but my console have it active
09/28/2015 08: 40: 15,338 AppTruck [719: 29060] Push Plugin failed register

My SenderID, this on google console
it works?

@xavianaxw
Copy link

@deluxeuo Yes my settings are similar to yours. Have a look below.

var push = PushNotification.init({ 
      "android": {
        "senderID": "xxxxxxxxxxxxxx"
      },
      "ios": {
        "alert": "true", 
        "badge": "true", 
        "sound": "true"
      } 
    });

Have you tried it on a LIVE device? Because I believe you are unable to register your device for push notification on an emulator. I may be wrong so someone correct me if this is the case.

@deluxeuo
Copy link
Author

That was it! on my phone I can have my Key

What is your push server?
I can not use the same gcm google?

@xavianaxw
Copy link

@deluxeuo GCM will only be for Google so for iOS you need to set up your certificates like the tutorial I shared with you.

I'm using AWS SNS as my push server.

@leonardopaiva
Copy link

@deluxeuo maybe this help #124

@deluxeuo
Copy link
Author

Leonardo.
É Brasileiro ?
Estou em dúvidas como fazer o ios funcionar com GCM

Ja configurei o projeto no xcode para provisionamento push, também no meu developer apple, ja configurei para push.

Entrei no google
https://developers.google.com/cloud-messaging/ios/client

e configurei o projeto, fiz upload do certificado (p12), e ele gerou um novo key.
Com esse key e o key do meu celular, ao enviar o post para gcm/sender.. ele da InvalidRegistration

Existe alguma configuração extra?

@leonardopaiva
Copy link

@deluxeuo não tenho experiência fazendo o push funcionar com GCM para IOS, infelizmente não tenho muito como te ajudar, além de passar esse link, caso tu ainda não tenha visto:
#115

pelo que entendi isso ainda vai ser suportado pelo plugin, tu pode perguntar lá se alguém já conseguiu fazer com gcm.

@fredgalvao
Copy link
Collaborator

Como o @leonardopaiva disse, esse plugin (e é o mesmo caso pro PushPlugin), não dá suporte ao GCM pra iOS ainda. Acredito que ninguém tenha feito funcionar até agora.

@macdonst
Copy link
Member

macdonst commented Oct 1, 2015

Okay, my Portuguese is beyond poor but I believe the issue has been resolved and @deluxeuo would like to push to iOS via GCM which this plugin does not yet support but is covered by #115.

@macdonst macdonst closed this as completed Oct 1, 2015
@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants