Code Monkey home page Code Monkey logo

apns2client's Introduction

Apn2Client

A simple APNs client built based on nghttp2 with Visual Studio 2015 for Windows platform.

https://github.com/JiekeZhu/Apn2Client

APNs Overview 官方文档

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html#//apple_ref/doc/uid/TP40008194-CH8-SW1

Configure push notifications 创建证书、工程属性

http://help.apple.com/xcode/mac/8.3/#/dev11b059073

https://github.com/Redth/PushSharp/wiki/How-to-Configure-&-Send-Apple-Push-Notifications-using-PushSharp

教程

http://blog.csdn.net/daydreamingboy/article/details/7977098

https://github.com/Redth/PushSharp/wiki/How-to-Configure-&-Send-Apple-Push-Notifications-using-PushSharp

https://developer.apple.com/library/prerelease/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1 通信过程和架构

客户端App

1. 开启Notification授权

https://developer.apple.com/library/prerelease/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SupportingNotificationsinYourApp.html#//apple_ref/doc/uid/TP40008194-CH4-SW1

2. 注册远程Notification推送

https://developer.apple.com/library/prerelease/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1

APNs Provider 苹果消息推送提供者

C#版 HTTP/2 实现

https://github.com/Redth/HttpTwo

C#版 APNs Provider源码

https://github.com/redth/pushsharp

关键1

var config = new ApnsConfiguration (ApnsConfiguration.ApnsServerEnvironment.Sandbox, "push-cert.p12", "push-cert-pwd"); 关键2

apns-topic = Bundle Id

Dependencies

1. apns2.c is the original example. https://github.com/wardenlym/apns2-test

2. nghttp2 is the HTTP/2 C library. https://github.com/nghttp2/nghttp2

3. OpenSSL used comes from Poco C++ library. https://github.com/pocoproject/poco/tree/develop/openssl

Please check the project settings for include folders settings and library link settings.

Source code

Apns2Client.h/.cpp contains all the code.

1. Open nghttp2.sln with Visual Studio 2015.

2. Set Example as the startup project.

3. Please check the TODO labels and replace the needed parts with your own values.

4. Run.

apns2client's People

Contributors

jiekezhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

df05 ideazw lynnbao

apns2client's Issues

你好,遇到一些问题,想请教一下。

因为一些原因,我单独将nghttp2下载下来后进行编译的,随后在我的工程中,引入了Apns2Client.cpp与Apns2Client.h两个文件,设置了我的pem后,在OnNghttp2SendCallback该函数中,SSL_get_error的返回值为5,随后返回了
不好意思,断点查了一下,
SSL_connect 返回-1,链接地址我未更改过,这个有问题吗?
在HandlerSSLError中,SSL_get_error的错误码为5(SSL_ERROR_SYSCALL)
/* look at error stack/return * value/errno */

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.