• 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 decatilinae@gmail.com. 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)

          application.registerUserNotificationSettings(settings)
          application.registerForRemoteNotifications()

          Then in your AppDelegate add this function:

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

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

          • Krishan Sharma

            Hello,
            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)

            application.registerUserNotificationSettings(settings)
            application.registerForRemoteNotifications()

  • dancingbush

    Hi,
    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?

    Cheers

    • 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

    Hi,
    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.?