PushSharp is used to push messages for IOS app publishing, and pushsharpios
In progress. NET uses the PushSharp open-source class library to push messages to apps on IOS devices. In the development process, it uses a test version of the App, the p12 certificate is tested using ApnsConfiguration. apnsServerEnvironment. in Sandbox mode, after the project is released, the certificate of the released version is used for pushing, finally, we found that ApnsConfiguration is required for pushing projects after PushSharp is used. apnsServerEnvironment. production mode. To make the push successful.
The Production parameter should be used when instantiating the ApnsConfiguration object, instead of the Sandbox mode.
The Code is as follows:
ApnsConfiguration apnsConfig = new ApnsConfiguration (ApnsConfiguration. ApnsServerEnvironment. Production, "certificate. p12", "certificate password"); // Sandbox
After modifying the parameters, you must use the certificate and password of the published version to complete the push task.