private void ChatServerConnect() { SendBirdClient.Connect(Settings.ChatID, (User user, SendBirdException e) => { if (e != null) { return; } SendBirdClient.UpdateCurrentUserInfo(Name, ProfileIcon, (SendBirdException e1) => { if (e1 != null) { return; } }); SendBirdClient.RegisterAPNSPushTokenForCurrentUser(SendBirdClient.GetPendingPushToken(), (SendBirdClient.PushTokenRegistrationStatus status, SendBirdException e1) => { if (e1 != null) { // Error. return; } if (status == SendBirdClient.PushTokenRegistrationStatus.PENDING) { // Try registration after connection is established. } }); }); Settings.IsLogin = true; }