0

I am using cordova-plugin-fsm to send push notifications. In Android, it works perfectly fine.

But in IOS I am getting issues while building the project. Opened the project in XCode 9. It is giving following errors

:enter image description here

Also, I have enabled notifications in capabilities.enter image description here

Arpit
  • 227
  • 5
  • 15

2 Answers2

2

See attached screenshot. In Xcode, check that you have enabled push notifications in the "Capabilities" tab. This needs to be done even though you have checked remote notifications in background modes.

enter image description here

EDIT

I just realised why you don't see push notifications under "Capabilities". Some capabilities (such as PNS), require extra setup in Developer Center (and you need to connect Xcode with your Apple Developer account as well, for it to be configured properly).

Quote from the docs: "Certain app services—such as Game Center and In-App Purchase—are available only to members of the Apple Developer Program who distribute their apps through the store. These services require additional configuration in your Xcode project, your developer account, and sometimes iTunes Connect. Push notifications require additional setup in your developer account".

You can read more about it here.

oyvindhauge
  • 3,496
  • 2
  • 29
  • 45
  • There is nothing like Push Notifications under Capabilities in XCode 9 – Arpit Nov 07 '17 at 13:53
  • There definitely should be. Could be some kind of configuration issue related to Ionic maybe. Hard to say, since I have never worked with this framework. What capabilities are you seeing in the list apart from "Background modes"? – oyvindhauge Nov 07 '17 at 14:00
  • @Arpit I found out why some capabilities are not showing up for you. See my updated answer. – oyvindhauge Nov 07 '17 at 14:06
  • Thanks for finding this out! Does "additional setup" mean a paid account? – Arpit Nov 07 '17 at 14:34
  • Yes, you will have to enroll to the Apple Developer Program and pay the license fee. Read more here: https://developer.apple.com/programs/ – oyvindhauge Nov 07 '17 at 14:44
-1

you should create enable push notification from apple developers account. You get more details from bellow link https://documentation.onesignal.com/docs/ionic-sdk-setup

faizi
  • 29
  • 1
  • 3
  • Hi Faizi, I cannot find "enable push notification " in my apple developers account. Should it be a paid account? And is onesignal free? – Arpit Nov 07 '17 at 13:16
  • yes. you should create provision certificate for push notification, go developer.apple.com and enable push notification service – faizi Nov 07 '17 at 13:23
  • @faizi yes, PNS certificates has to be created in Apple Developer Center in order to actually send push notifications, however, that has nothing to do with the errors he is getting in Xcode. See my answer. – oyvindhauge Nov 07 '17 at 13:27
  • @ØyvindHauge Which answer? Please share the link. – Arpit Nov 07 '17 at 13:38
  • @Arpit my answer to your question, on this page. – oyvindhauge Nov 07 '17 at 13:39