swift - Instant Message Push Notification Using Sinch not coming on iOS -


[![enter image description here][1]][1]i've mentioned fields still i'm not getting push notification. code:

firstly in didfinishlaunchingwithoptions call this:

        self.push = sinch.managedpushwithapsenvironment(.production)         self.push?.delegate = self         self.push?.setdesiredpushtypeautomatically()          client = sinch.clientwithapplicationkey("xxxxxx", applicationsecret: "xxxxxxx", environmenthost: "sandbox.sinch.com", userid: userid)         client?.delegate = self         client?.setsupportmessaging(true)         client?.setsupportpushnotifications(true)         client?.enablemanagedpushnotifications()         client?.start()         client?.startlisteningonactiveconnection()          self.push?.registerusernotificationsettings()  func managedpush(managedpush: sinmanagedpush!, didreceiveincomingpushwithpayload payload: [nsobject : anyobject]!, fortype pushtype: string!) {          self.client?.relayremotepushnotification(payload)     }   func application(application: uiapplication, didregisterforremotenotificationswithdevicetoken devicetoken: nsdata) {          let tokenchars = unsafepointer<cchar>(devicetoken.bytes)         var tokenstring = ""          in 0..<devicetoken.length {             tokenstring += string(format: "%02.2hhx", arguments: [tokenchars[i]])         }          self.push?.application(application, didregisterforremotenotificationswithdevicetoken: devicetoken)     }   func application(application: uiapplication, didreceiveremotenotification userinfo: [nsobject : anyobject]) {         self.push?.application(application, didreceiveremotenotification: userinfo)     } 

i've uploaded push certificate in sinch dashboard.

may know missing in code might reason i'm not getting push.

edited:

here image of uploaded push distribution certificate on sinch dashboard.

http://i.stack.imgur.com/d6pvb.png

you should not have client?.setsupportpushnotifications(true) thats when want handle push self


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo