MobilePush の機能を利用してアプリへプッシュ通知を送信するためには、FCM (Firebase Cloud Messaging) および Appleプッシュ通知サービス (APNs) といった外部サービス側での適切な設定が不可欠です。
設定の不整合により正常に通知が送信できないケースは頻繁に発生します。本記事では、送信トラブルの原因として特に多い「プロビジョニング設定の誤り」について、確認すべき項目と解決策をまとめました。
弊社SDKを組み込んだアプリで通知を送信する際に、プロビジョニング設定に不備があると以下のような事象が発生します。
プッシュ通知の送信結果が Fail となり、トークン情報の不整合を示唆するエラー(例: Requested entity was not found, NotRegistered, mismatch など)が記録される。
(iOSのみ) アプリ側で通知を許可しているにもかかわらず、Marketing Cloud上で Not Opted In (オプトアウト) となり、オプトイン状態に変わらない。
System Token (デバイストークン) がブランク(空)のまま取得できない。
上記の事象が発生した場合、アプリと通知サービス間の認証情報に不一致がある可能性が高いです。以下の観点から設定をご確認ください。
Xcodeの設定:
当該アプリの Xcode プロジェクトで、「Push Notifications」の Capability が有効になっていること。
Apple Developer Portalの設定:
プッシュ通知用の認証キー (APNs Auth Key / .p8形式) が有効であること。
※従来の証明書 (.p12) も利用可能ですが、更新不要な .p8 形式を推奨します。
Marketing Cloud 側の登録情報:
登録した「キーID (Key ID)」「チームID (Team ID)」「バンドルID (Bundle ID)」が、Apple Developer Portal の情報と完全に一致していること。
【重要】ビルド環境とAPNsモードの一致:
Marketing Cloud のMobilePush管理画面で行うアプリ設定画面にて APNs のエンドポイントを示すプルダウン (Sandbox / Production) が、アプリのビルド種別と正しく一致しているか確認してください。
開発用 (Sandbox): Xcode から直接インストールしたデバッグビルドなど。
本番用 (Production): App Store 経由、または TestFlight などのリリースビルド。
※ .p8 認証キー自体は開発・本番共通で使用できますが、Marketing Cloud 側で「どの環境に向けて送信するか」の設定を誤ると通知は届きません。
構成ファイルの配置:
当該プロジェクトの /app ディレクトリ直下に、正しい google-services.json が配置されていること。
プロジェクトの整合性:
アプリに組み込んだ google-services.json の内容が、対象のアプリおよび Firebase プロジェクトと一致していること。
Marketing Cloud 側の登録情報:
MobilePush 管理画面に登録した「サービスアカウントキー (JSON)」が、アプリに組み込んだ google-services.json と同一の Firebase プロジェクトから発行されたものであること。
アプリ上での FCM / Push通知関連の設定
これらのプロビジョニング作業は、主にお客様の開発環境 (Android Studio, Xcode) や、Firebase / Apple の開発者コンソール上で行われるものです。
これらの設定は外部サービス (Apple/Google) に依存する特性上、弊社側からお客様のプロビジョニング設定状況(正しいファイルが配置されているか等)を直接確認・判断することはできません。 お問い合わせいただいた場合でも、本記事のような設定確認のご案内や切り分け方法の提案となることをご了承ください。
推奨される切り分け手順:
本記事の設定項目を開発担当者と再確認する。
「Learning App (弊社提供のサンプルアプリ)」を利用し、最小構成で通知が届くか確認する(設定の誤りか、アプリ実装の誤りかを切り分けるため)。
上記を見直した上で、SDKからトークンが取得できない、あるいは Marketing Cloud 起因のエラーが疑われる場合は、詳細なログやエラー内容を添えてサポートへお問い合わせください。
参考情報) アプリのプロビジョニングについて
・Marketing Cloud 上でのプロビジョニング
https://help.salesforce.com/s/articleView?id=mktg.mc_mp_provisioning_info.htm&type=5
・クイックスタートガイド
https://developer.salesforce.com/docs/marketing/mobile-messaging-sdks/guide/prerequisites.html
・Xcode 上での通知の有効化 - Enable Push Notifications
・証明書、証明キーの作成 - Provision Your App for Push with Apple
・Firebase プロジェクト上での設定 - Provision Your App for Push with Google Firebase
・Learning App : 比較のため Learning App を用いた切り分けも有効です。このアプリは Push 通知の最低限の機能を備えており、弊社製品側の問題がないか切り分ける際に有効です
https://developer.salesforce.com/docs/marketing/mobilepush/guide/additional-developer-resources.html
004397548

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.