npm i ncmb-expo-push
const ncmbPush = new NCMBPushNotification('YOUR_APPLICATION_KEY', 'YOUR_CLIENT_KEY');
try {
await ncmbPush.setDeviceToken();
} catch (e) {
console.log(e);
}
この処理で、プッシュ通知許可用のダイアログ表示、デバイストークンの取得、デバイストークンのNCMBへの保存処理を行います。
const installation = await ncmbPush.getInstallation();
取得したinstallationオブジェクトに新しいメタデータを紐付けられます。
MIT License