# IMPOSSIBLE! push notifications in real iOS never work! only dev\_push -\> true

**URL:** <https://forum.ionicframework.com/t/impossible-push-notifications-in-real-ios-never-work-only-dev-push-true/76524>\
**Category:** ionic-v1\
**Created:** [January 17, 2017, 8:28pm UTC](https://forum.ionicframework.com/t/impossible-push-notifications-in-real-ios-never-work-only-dev-push-true/76524 "2017-01-17T20:28:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kriptoney](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@kriptoney](https://forum.ionicframework.com/u/kriptoney)\
**Post date:** [January 17, 2017, 8:28pm UTC](https://forum.ionicframework.com/t/impossible-push-notifications-in-real-ios-never-work-only-dev-push-true/76524/1 "2017-01-17T20:28:06Z")

</div>

Hello guys,  
Someone has made it work push ionic in a ionic 1 project? I’m going crazy, I’ve been trying for months. I have this working but when I want to try production they dont get token:

```
           var push = new Ionic.Push({
               "debug": true,
               "onNotification": function(notification) {
                  var payload = notification.payload;
                  console.log('notificacion data ---> '+notification, payload);
                },
                "onRegister": function(data) {
                  console.log('token notificacion data ---> '+data.token);
                }
           });
           push.register(function (token) {
               console.log("My Device token:", token.token);
               push.saveToken(token); // persist the token in the Ionic Platform
                var localStorage = window.localStorage;
                localStorage.setItem('tokenDevice', token.token);
           });

```

only works in dev\_push true, when I set dev\_push false NEVER WORKS  
anyone can help me? I’m going crazy…

---

<div class="post-metadata">

**Author:** ![HappyHappyJoyJoy](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@HappyHappyJoyJoy](https://forum.ionicframework.com/u/HappyHappyJoyJoy)\
**Post date:** [January 18, 2017, 7:57am UTC](https://forum.ionicframework.com/t/impossible-push-notifications-in-real-ios-never-work-only-dev-push-true/76524/2 "2017-01-18T07:57:29Z")

</div>

If you deploy the release version of your app, you’ll have to use the distribution/production provisioning profiles on Xcode. If Xcode don’t accept existing ones it’ll generate it’s own.

On [https://developer.apple.com/account/](https://developer.apple.com/account/) you can set them up.

Use the downloadable distribution security certificates on your Php script (or whatever server script) when requesting APNS and not the developer certificates.

This tutors helped me out as I had the same problem like you:

> **[Push Notifications Tutorial: Getting Started](https://www.raywenderlich.com/156966/push-notifications-tutorial-getting-started)**
>
> In this push notifications tutorial you'll learn how to notify your users and perform small tasks even when they aren’t actively using your app!
