2013-10-31 8 views
0

DEV SSL 인증서를 사용하고 있지만 이상하게도 "gateway.sandbox.push.apple.com"대신 "gateway.push.apple.com"에 알림 서버가 연결됩니다.iOS 알림 서버가 DEV SSL 인증서를 사용하고 있지만 gateway.push.apple.com에 연결 중입니까?

키 체인 접근에서 인증서는 "Apple Development IOS Push Services : ..."라고하며, 개발을위한 확신입니다. 내 .p12 파일을 만들어 알림 서버에 배포했습니다.

이전에는 실제로 정상적으로 작동했습니다. 그러나 내 인증서가 만료되어 프로비저닝 센터를 통해 새 인증서를 만들어야했습니다. 그때 나는이 이상한 문제에 부딪쳤다.

내 알림 서버는 javapns API를 사용하여 Java로 작성되었습니다. .p12를 다시 만들고 알림 서버를 다시 시작했지만 행운을 보지 못했습니다.

이전에이 문제를 본 사람이 있습니까? 미리 감사드립니다.

+0

연결 중입니다 만 작동합니까? – Kevin

답변

0

JavaPN에는 Sandbox 또는 Production push env에 연결을 시도할지 여부를 결정하는 플래그 (메소드 중 하나에 있음)가 있습니다. 인증서를 제공하는 것과 아무런 관련이 없습니다.

예를 들어 다음과 같은 방법으로 생산에 연결하려면 true을, 샌드 박스에 연결하려면 false을 제공해야합니다.

/** 
* Push a preformatted payload to a list of devices. 
* 
* @param payload a simple or complex payload to push. 
* @param keystore a keystore containing your private key and the certificate signed by Apple ({@link java.io.File}, {@link java.io.InputStream}, byte[], {@link java.security.KeyStore} or {@link java.lang.String} for a file path) 
* @param password the keystore's password. 
* @param production true to use Apple's production servers, false to use the sandbox servers. 
* @param devices a list or an array of tokens or devices: {@link java.lang.String String[]}, {@link java.util.List}<{@link java.lang.String}>, {@link javapns.devices.Device Device[]}, {@link java.util.List}<{@link javapns.devices.Device}>, {@link java.lang.String} or {@link javapns.devices.Device} 
* @return a list of pushed notifications, each with details on transmission results and error (if any) 
* @throws KeystoreException thrown if an error occurs when loading the keystore 
* @throws CommunicationException thrown if an unrecoverable error occurs while trying to communicate with Apple servers 
*/ 
public static PushedNotifications payload(Payload payload, Object keystore, String password, boolean production, Object devices) throws CommunicationException, KeystoreException { 
    return sendPayload(payload, keystore, password, production, devices); 
} 
+0

빙고! 어떻게 내가 이것을 간과 했느냐? 고맙습니다. !!!! – user2942085