プッシュ通知を有効にする EMS サーバーの構成
EMS プッシュ通知 への移動
EMS 環境を構成した直後には、EMS サーバーはデフォルト パラメータで構成されています。
EMSServer.ini ファイルを編集すると、その EMS サーバー構成を変更することができます。
EMS サーバーが登録済みデバイスに EMS プッシュ通知メッセージを送信できるようにするには、EMS サーバーのデフォルト構成を変更する必要があります。
- メモ: EMS サーバーが動作するシステムに OpenSSL ライブラリをインストールする必要があります。詳細は、「EMS サーバーの要件」を参照してください。
Google クラウド メッセージング(GCM)の設定
EMS サーバーから Google クラウド メッセージング サービスに通知メッセージをプッシュできるように、Google クラウド メッセージング セクションのデフォルト設定を変更する必要があります。EMSServer.ini ファイルで、[Server.Push.GCM] セクションに移動します。
- ApiKey: Google クラウド メッセージング(GCM)の API キーの値です。
[Server.Push.GCM] ;# This section is for Google Cloud Messaging (GCM) settings. ;# These settings are needed to send push notifications to an Android device ApiKey=AIzaSy8ErRetMFL3gMm-c4McopUXyU51e6p51i0s
Apple プッシュ通知(APN)の設定
EMS サーバーから Apple プッシュ通知サービスにプッシュ通知メッセージを送信できるように、Apple プッシュ通知セクションのデフォルト設定を変更する必要があります。EMSServer.ini ファイルで、[Server.Push.APNS] セクションに移動します。
- CertificateFileName: システムにダウンロードした .p12 証明書のパスです。
- CertificateFilePassword: .p12 証明書のパスワードです。パスワードが必要ない場合には空にしておきます。
- ProductionEnvironment: 運用向けに .p12 証明書を作成した場合に対応する値は 1 です。開発向けに作成した場合には、値を 0 に設定します。
[Server.Push.APNS] ;# This section is for Apple Push Notification Service (APNS). ;# These settings are needed to send push notifications to an IOS device CertificateFileName=C:\Users\Public\Documents\Embarcadero\EMS\PushNotificationTest.p12 ;# Name of .p12 or .pem file CertificateFilePassword= ;# Password of certificate file. Leave blank if file does not have a password. ProductionEnvironment=0 ;# Set ProductionEnvironment=1 when the certificate has been created for production. ;# Set ProductionEnvironment=0 when the certificate has been created for development. ;# Default value is 0 (development).