デバイスが登録されていないため、権限の問題が疑われます。
Android搭載の場合は、インストール時にプッシュ通知を有効にする必要があります。彼らは有効にされましたか?
IOSを使用している場合は、プッシュ通知を使用するための権限をユーザーに求める必要があります。あなたは正しいアクセス許可を得ましたか?
あなたはそれが許可をユーザーに尋ねていない場合は、権限が付与されているかどうかを確認することができ博覧会の権限を持つ
import { Permissions } from 'expo';
を使用して博覧会との権限をインポートすることができます。
const { status: existingStatus } = await Permissions.getAsync(
Permissions.NOTIFICATIONS
);
let finalStatus = existingStatus;
// only ask if permissions have not already been determined, because
// iOS won't necessarily prompt the user a second time.
if (existingStatus !== 'granted') {
// Android remote notification permissions are granted during the app
// install, so this will only ask on iOS
const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS);
finalStatus = status;
}
これはExpo docsから取得したものです。 https://docs.expo.io/versions/latest/guides/push-notifications.html
標準のシミュレータにプッシュ通知を送信することはできません。博覧会の下で、
Note: iOS and Android simulators cannot receive push notifications, to test them out you will need to use a real-life device. Additionally, when calling Permissions.askAsync on the simulator, it will resolve immediately with “undetermined” as the status, regardless of whether you choose to allow or not.