2017-04-25 6 views

답변

1

당신은 또한 당신이 당신의 인증서가 생산성이 경우주의를 기울여야합니다, 이동/인증서가 생산
경우 ApplePushChannelSettings 방법에 첫 번째 인수가 = 사실이라고 따라 데브 거짓 = 인증서는 개발

broker = new PushBroker(); 
broker.OnNotificationSent += _broker_OnNotificationSentApple; 
broker.OnChannelException += _broker_OnChannelExceptionApple; 
broker.OnServiceException += _broker_OnServiceExceptionApple; 
broker.OnNotificationFailed += _broker_OnNotificationFailedApple; 
broker.OnDeviceSubscriptionExpired += _broker_OnDeviceSubscriptionExpiredApple; 
broker.OnDeviceSubscriptionChanged += _broker_OnDeviceSubscriptionChangedApple; 
broker.OnChannelCreated += _broker_OnChannelCreatedApple; 
broker.OnChannelDestroyed += _broker_OnChannelDestroyedApple; 


byte[] appleCert = File.ReadAllBytes(the path to the certificate); 
broker.RegisterAppleService(new PushSharp.Apple.ApplePushChannelSettings(false,appleCert, appCertPassword,false),null);/ 

broker.QueueNotification(new AppleNotification() 
         .ForDeviceToken(yourDeviceToken) 
         .WithAlert(message) 
         .WithBadge(0)); 
경우