Skip to content

NCMBMania/react-native-push-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expo用React Native向けプッシュ通知プラグイン

インストール

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published