Apple Push Notification service 用の Key を生成する方法

JWT トークン認証方式を使って Apple Push Notification service (APNs) に Push Notification(プッシュ通知)を送信するには、Apple Push Notification service 用の Key が必要になります。

ここでは、Apple Developer Program のアカウントで Apple Push Notification service 用の Key を生成する方法をご説明します。

Apple Push Notification service 用のを生成するには、有料の Apple Developer Program に登録する必要があります。詳しくは「Apple Developer Program について」をご覧ください。

Apple Push Notification service 用の Key を生成する

Apple Push Notification service 用の Key を生成します。

Apple Developer のサイトにログインし、[Certificates, IDs & Profiles]Keys をクリックします。

Apple Push Notification service 用の Key を生成する方法 1


Certificates, Identifiers & Profiles のページが表示されるので、Keys の右側にある、+ ボタンをクリックします。

Apple Push Notification service 用の Key を生成する方法 2


Register a New Key のページが表示されるので、Key の名前を入力し、Apple Push Notifications service (APNs) を選択し、その横にある [Configure] ボタンをクリックします。

Apple Push Notification service 用の Key を生成する方法 3


Configure Key のページが表示されるので、Environment と Key Restriction を選択して、[Save] ボタンをクリックします。 今回はテストのみ使うので Sandbox を選びました。本番環境用や TestFlight で使う場合は Production が入ったものを選択してください。

Apple Push Notification service 用の Key を生成する方法 4


ひとつ前の画面に戻るので、[Continue] ボタンをクリックします。

Apple Push Notification service 用の Key を生成する方法 5


確認してよければ [Register] ボタンをクリックします。

Apple Push Notification service 用の Key を生成する方法 6


これで Apple Push Notification service 用の Key が生成されたので、[Download] ボタンをクリックして .p8 ファイルをダウンロードします。 一度ダウンロードしたら、再度ダウンロードできないので、ダウンロードしたファイルは無くさないように気をつけてください。

Apple Push Notification service 用の Key を生成する方法 7

Apple Push Notification service 用の Key を生成する方法 8


Apple Push Notification service 用の Key が生成できました。

Apple Push Notification service 用の Key を生成する方法 9


以上、iOS の Apple Push Notification service 用の Key を生成する方法をご説明しました。

© 2025 iOS 開発入門