2015-10-18 36 views
1

我正在使用SinMessageClient发送消息。我需要支持推送通知在我的代码,我已经设置了推用下面的代码:由于使用即时消息推送通知

NSString* userId = [options valueForKey:APP_USER_USERID_CONSTANT]; 
      id<SINClient> sinchClient = [Sinch 
             clientWithApplicationKey:SINCH_APPLICATION_KEY 
              applicationSecret:SINCH_APPLICATION_SECRET 
               environmentHost:@"sandbox.sinch.com" 
                   userId:userId]; 
      [sinchClient setSupportMessaging:YES]; 
      [sinchClient enableManagedPushNotifications]; 
      sinchClient.delegate = delegate; 
      self.push = [Sinch managedPushWithAPSEnvironment:SINAPSEnvironmentAutomatic]; 
      self.push.delegate = delegate; 
      [self.push setDesiredPushTypeAutomatically]; 
      [self.push registerUserNotificationSettings]; 
      // Start the Sinch Client 
      [sinchClient start]; 
      // Start listening for incoming events (calls and messages). 
      [sinchClient startListeningOnActiveConnection]; 

我也实现了所有在这里https://www.sinch.com/tutorials/ios-managed-push/

要求提它不工作,我有以下查询。 如果我的应用程序在后台,推送消息将如何发送? 我可以在不支持sinch call client的情况下支持推送通知吗? 我只在sinch仪表板上传APN推送证书而不是voip推送证书。它可以用于即时通讯应用程序吗?

+0

我被困在一个类似的问题 – Jani

回答

0

定期推送作品,不需要客户端。你还有这个问题吗?

+0

我也没有得到任何推动。你能帮忙吗? http://stackoverflow.com/questions/37577566/instant-message-push-notification-using-sinch-not-coming-on-ios –