PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • The different steps
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Push notification: iOS configuration
Overview
To use the Push notifications in iOS, you must own a Google account and you must perform a specific configuration.
This help page presents the different operations to perform.
The different steps
The different steps are as follows:
1. Enabling the push notifications
To enable the Push notifications, connect to the "provisioning portal" of iOS and retrieve the certificates associated with the push.
To do so, connect to the portal and click "+" at the top right :
The portal proposes to create a certificate:
Two certificates must be created:
  • a certificate for the test notifications ("SandBox").
  • a certificate for the notifications in release.
You can now retrieve the two generated ".cer" files.
2. Installing the certificates
These certificates must be installed on the Mac used to generate the iOS application. This computer will also receive the push notifications.
To install the certificates:
  • Double-click the file name. The certificate is automatically added into the keychain access:
  • Export the certificates: Select "Export" from the popup menu (right mouse click) of certificates. A window is displayed:
Notes:
  • It is important to export in "p12" format in order for the private key to be found inside the certificate.
  • A password can be specified to protect the exported certificate.
3. Programming the application
Once the certificate is exported, it must be loaded so that it can be used by NotifPushSend. To do so, use CertificateLoad:
t is array of Buffers
arrMyCertif is array of Certificates
arrMyCertif = CertificateLoad("C:\My Certificates\aps_production.p12","pwd")
MyNotif is Notification
MyNotif..Message = "Test notification"

ResponseList is WDPushServer.ListIdentifiersAPNResponse

ResponseList = WDPushServer.ListIdentifiersAPN()

FOR i = 1 _TO_ ResponseList.ListIdentifiersAPNResult..Occurrence
bufTest is Buffer = ResponseList.ListIdentifiersAPNResult[i]
Add(t, bufTest)
Trace(bufTest)
END

NotifPushSend(MyNotif, t, arrMyCertif[1], typeServiceIOSTest)
Minimum required version
  • Version 19
Comments
Click [Add] to post a comment