Apple notification push
SummaryExample of notificationArchitecture APNIPHONE AuthorizationYourcode in XcodeMyprovider RegisterCertificateSend a notificationReturn disableddevicesReceive a notification push
Example of notificationExist 2 notification versions :  Local Notification Push
 Remote Notification PushWe work with second type of notification
Architecture APNFeedBack server send notificationIn JSON. It indicate you, device who uninstall application or device  dysfunctional Gateway server receive notificationIn JSON. After reception, it sends  notification to selected device
IPHONE AuthorizationTo receive notification in IPHONE, users must accept  to notification reception. Once to accept, you must register  identifier of  IPHONE to send it to corporate server (your provider)
In yourAppDelegateAlways use application:didFinishLaunchingWithOptions: method for launching your application when it have optionsThis method, we ask iphone ID user to receive notification or not …
Your code in XcodeThis code sends device identifier to your provider to register them.This code must be always in AppDelegate ApplicationDelegate of UIApplication must be useNext slide presents my code Application:didRegisterForRemoteNotificationsWithDeviceToken must be called;The register always must be made.
My codeFunction which recover Device ID and remove space blank. After call a function in backgroundFunction which send info to your provider. Baseurlregister is my url address of my serveur
My providerMy script make in PHP and may be use in other programming languageYour server must be accessible (choose a web server much easier)
My PHP code register IDIPHONE
Message FormatTo transfer a message, you use JSONFormat includes alert message, badge, and soundYou can use a personalize sound to put in you application 
ExampleThis code send a alert message, use a default sound of IPHONE and notify app to 1 Don’t worry to write json, PHP have a function which allow to convert a table to json
certificateDon’t  think to send notification without minimum security levelYou must create a security certificate and send it to iphone provisionning portal  and recover the new one in iphone provisionning portal  of your application. Procedure explained on developer portal, don’t forgot enable notification push service
Create a certificate
certificateAfter to inform apple of your certificate, we transform it to regroup all information with openssl (download it if you didn’t have it)
Certificate .PEMOpen your terminal and tapezTest yourconnection, if failreverifyyour certificat, it’sbad
Send a notification on gatewayTo communicate with gateway sandbox, we go to create a secured network by using ssl protocol.My script is in php, my certificate recently created must put in folder protected by htacessWarning if you do not protect your certificate, an hacker  can send a lot of notification in your place.
Script sendNotif.php
Return disableddevices on feedback.sandbox
Receive a notification pushWhenyoureceive a notification, more often you must specify the good view to show
You have 2 options
when application enter in background

Apple notification push

  • 1.
  • 2.
    SummaryExample of notificationArchitectureAPNIPHONE AuthorizationYourcode in XcodeMyprovider RegisterCertificateSend a notificationReturn disableddevicesReceive a notification push
  • 3.
    Example of notificationExist2 notification versions : Local Notification Push
  • 4.
    Remote NotificationPushWe work with second type of notification
  • 5.
    Architecture APNFeedBack serversend notificationIn JSON. It indicate you, device who uninstall application or device dysfunctional Gateway server receive notificationIn JSON. After reception, it sends notification to selected device
  • 6.
    IPHONE AuthorizationTo receivenotification in IPHONE, users must accept to notification reception. Once to accept, you must register identifier of IPHONE to send it to corporate server (your provider)
  • 7.
    In yourAppDelegateAlways useapplication:didFinishLaunchingWithOptions: method for launching your application when it have optionsThis method, we ask iphone ID user to receive notification or not …
  • 8.
    Your code inXcodeThis code sends device identifier to your provider to register them.This code must be always in AppDelegate ApplicationDelegate of UIApplication must be useNext slide presents my code Application:didRegisterForRemoteNotificationsWithDeviceToken must be called;The register always must be made.
  • 9.
    My codeFunction whichrecover Device ID and remove space blank. After call a function in backgroundFunction which send info to your provider. Baseurlregister is my url address of my serveur
  • 10.
    My providerMy scriptmake in PHP and may be use in other programming languageYour server must be accessible (choose a web server much easier)
  • 11.
    My PHP coderegister IDIPHONE
  • 12.
    Message FormatTo transfera message, you use JSONFormat includes alert message, badge, and soundYou can use a personalize sound to put in you application 
  • 13.
    ExampleThis code senda alert message, use a default sound of IPHONE and notify app to 1 Don’t worry to write json, PHP have a function which allow to convert a table to json
  • 14.
    certificateDon’t thinkto send notification without minimum security levelYou must create a security certificate and send it to iphone provisionning portal and recover the new one in iphone provisionning portal of your application. Procedure explained on developer portal, don’t forgot enable notification push service
  • 15.
  • 16.
    certificateAfter to informapple of your certificate, we transform it to regroup all information with openssl (download it if you didn’t have it)
  • 17.
    Certificate .PEMOpen yourterminal and tapezTest yourconnection, if failreverifyyour certificat, it’sbad
  • 18.
    Send a notificationon gatewayTo communicate with gateway sandbox, we go to create a secured network by using ssl protocol.My script is in php, my certificate recently created must put in folder protected by htacessWarning if you do not protect your certificate, an hacker can send a lot of notification in your place.
  • 19.
  • 20.
  • 21.
    Receive a notificationpushWhenyoureceive a notification, more often you must specify the good view to show
  • 22.
    You have 2options
  • 23.