Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.IOExcetion #21

Closed
hanxirui opened this issue May 27, 2017 · 1 comment
Closed

java.io.IOExcetion #21

hanxirui opened this issue May 27, 2017 · 1 comment
Assignees

Comments

@hanxirui
Copy link

Hi
I used the following code to invoke apns service:
FileInputStream cert = new FileInputStream("/home/test/DevPush.p12");

    final ApnsClient client = new ApnsClientBuilder()
            .withDevelopmentGateway()
            .inAsynchronousMode()
            .withCertificate(cert)
            .withPassword("pwd")
            .withDefaultTopic("com")
            .build();

    Notification n = new Notification.Builder("a05eefeebc42f07ee52bcf53f6d72d0cabc36268c6ef2c1a5199234d6a0b281c")
            .alertBody("Hello").build();

    client.push(n, new NotificationResponseListener() {
        @Override
        public void onSuccess(Notification notification) {
            System.out.println("success!");
        }
        @Override
        public void onFailure(Notification notification, NotificationResponse nr) {
            System.out.println("failure: " + nr);
        }
    });

Is anybody can help me,or if there have another library can send APNS2 success?

Thank you very much.

@judepereira
Copy link
Member

Could you post the entire stack trace?

@judepereira judepereira self-assigned this Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants