iOS Push Notifications with Swift and Parse

Not a while ago I created a video course on Swift Programming with Parse: Practical Examples, which covers features like: User Sign up, Sign in, Sign out, Email verification, Password reset and many other useful features. Thanks to all who have enrolled into this course and thank you for all of your messages and kind word. You are awesome! I am truly happy to see how my video lessons help you build your first apps and I am truly happy to be a part of it.  

I am striving to make my course even more valuable for my students and I continue to add more video lessons to it. And now I have added an entirely new section on Sending and Receiving Push Notifications. If you are a current student of this course, check out the new section “Sending and Receiving Push Notifications”.

If you did not have a chance to enrol into this course yet, then today is your lucky day. Just because you are a reader of my blog I am inviting you to enrol into this course for a special price of $9 only: Check it out! It absolutely worth it! 

Below are 3 videos which are part of this video course. I hope these videos are useful to you.

Generate Apple Push Services Certificate 

Create Development and adHoc Provisioning Profiles 

Enable Push Notifications in Parse



  • Hi Sergey,
    I am trying some tutorial for my need related to my client app… the issue is this:
    – the app has to connect to a mysql database that stores huge amount of data.
    – these data has to give when the app is close a push notification alert.
    – in android you can arrange this by giving push notification having device ID…

    Does your course give some tip especially how to send push notification by having a mysql database?

    thanks a lot

    • So sorry, I did not notice your message. I do not have a course on Push notifications with PHP but I have done it many times and can advice if you are in the middle of something… Although if you use Parse for push notifications you can also have a reference to users device id, so you can use that to send push message with Parse.

      • Thnaks a lot for the answer…I bought your course on udemy my email account is If I need some tips can I ask you? Can you explain briefly how to reference to users device id or can you suggest some online tutorials that explain this? Thanks in advance…

        • Thank you very much for your message. Yes, of course. I can help you with this. Can you let me know in a little more details what are you trying to implement? Are you working on Push notifications with Parse or PHP and MySQL? Are you trying to get user device id from your Swift code when application is starting up or later on when working with user details for some other purposes?

        • Thank you for your message! For you to be able to get Device Token when registered for remote notifications you will need to set up everything properly. 1. Create Development provisioning profiles. 2. Enable Remote Notifications in your Xcode project under Targets->Capabilities->Background modes

          Then in your AppDelegate application didFinishLaunchingWithOptions register for remote notifications by doing so:

          let settings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil)


          Then in your AppDelegate add this function:

          func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {

          print(“Here is my Device Token (deviceToken)”)

          • Krishan Sharma

            when i add this code to AppDelegate application didFinishLaunchingWithOptions method i get the following error :-

            ‘AnyObject.Protocol’ does not have a member named ‘Alert’

          • Krishan, try this code:

            let userNotificationTypes = (UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound);

            let settings = UIUserNotificationSettings(forTypes: userNotificationTypes, categories: nil)


  • dancingbush

    I have a app in distribution that I want to create a new version of to allow me to add Notification functionality.

    I have changed all the code signing certs from Distribution back to Dev in Xcode.

    But I am confused about which certificates I need to re-use or create.
    Can I use the Distribution and Dev certificates I used before first release?
    Or do I need to create a new cert to use for the adHoc configuration?

    Also, is there more videos on how to confuse the App for push notifications?


    • Appstore certificate is used only when use submit app to the app store. If you plan to test push notifications with your device connected to Xcode then push notifications will work with Development Certificate. If you plan to distribute the app and test push notifications with Testers via HockeyApp or TestFlight then you need to create an adHoc certificate. And there is no need to re-generate certificates unless they expire or you app bundle name changed. Otherwise you can use same certificates.

  • ALi

    I want to add parse push in my ios swift 2 app. The code provided by parse is in C-Objective. I want swift 2 code. I am new in ios. Can you help me.?