Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ReScript bindings for @react-native-community/react-native-push-notification-ios

License

NotificationsYou must be signed in to change notification settings

rescript-react-native/push-notification-ios

Build StatusVersionReScript Forum

ReScript bindings for@react-native-community/react-native-push-notification-ios.

Exposed asReactNativePushNotificationIOS module.

@rescript-react-native/push-notification-ios X.y.* means it's compatible with@react-native-community/react-native-push-notification-ios X.y.*

Installation

When@react-native-community/react-native-push-notification-iosis properly installed & configured by following their installation instructions,you can install the bindings:

npm install @rescript-react-native/push-notification-ios#oryarn add @rescript-react-native/push-notification-ios

@rescript-react-native/push-notification-ios should be added tobs-dependencies in yourbsconfig.json:

{  //...  "bs-dependencies": [    "@rescript/react",    "rescript-react-native",    // ...+    "@rescript-react-native/push-notification-ios"  ],  //...}

Usage

Types

ReactNativePushNotificationIOS.Notification.t

typet;// abstract type

ReactNativePushNotificationIOS.localNotification

typelocalNotification;[@bs.obj]externallocalNotification:  (    ~alertBody:string=?,    ~alertTitle:string=?,    ~alertAction:string=?,    ~soundName:string=?,    ~isSilent:bool=?,    ~category:string=?,    ~userInfo:Js.Json.t=?,    ~applicationIconBadgeNumber:int=?,    ~fireDate:Js.Date.t=?,    ~repeatInterval: [@bs.string] [                       |`minute                       | `hour                       |`day                       | `week                       |`month                       | `year                     ]=?,unit  )=>localNotification="";

ReactNativePushNotificationIOS.deliveredNotification

typedeliveredNotification= {identifier:stringdate:option(string)title:option(string)body:option(string)category:option(string)threadId:option(string)userInfo:option(Js.Json.t),};

ReactNativePushNotificationIOS.formattedLocalNotification

typeformattedLocalNotification= {fireDate:option(string),alertAction:option(string),alertTitle:option(string),alertBody:option(string),applicationIconBadgeNumber:option(int),category:option(string),repeatInterval:option(string),soundName:option(string),userInfo:option(Js.Json.t),};

ReactNativePushNotificationIOS.registrationError

typeregistrationError('a)= {message:string,code:int,details:Js.t('a),};

ReactNativePushNotificationIOS.permissions

typepermissions= {alert:bool,badge:bool,sound:bool,lockScreen:bool,notificationCenter:bool,};

ReactNativePushNotificationIOS.requestPermissionsOptions

typerequestPermissionsOptions;[@bs.obj]externalrequestPermissionsOptions:  (~alert:bool=?, ~badge:bool=?, ~sound:bool=?,unit)=>requestPermissionsOptions="";

ReactNativePushNotificationIOS.fetchResult

typefetchResult;[@bs.obj]externalfetchResult:  (~_NewData:string=?, ~_NoData:string=?, ~_ResultFailed:string=?,unit)=>fetchResult="";

Methods

ReactNativePushNotificationIOS.Notification.getAlert

Notification.t=>option(Js.Json.t)

ReactNativePushNotificationIOS.Notification.getTitle

Notification.t=>option(string)

ReactNativePushNotificationIOS.Notification.getMessage

Notification.t=>option(Js.Json.t)

ReactNativePushNotificationIOS.Notification.getSound

Notification.t=>option(string)

ReactNativePushNotificationIOS.Notification.getCategory

Notification.t=>option(string)

ReactNativePushNotificationIOS.Notification.getContentAvailable

Notification.t=>bool

ReactNativePushNotificationIOS.Notification.getBadgeCount

Notification.t=>option(int)

ReactNativePushNotificationIOS.Notification.getData

Notification.t=>option(Js.Json.t)

ReactNativePushNotificationIOS.Notification.getThreadID

Notification.t=>option(string)

ReactNativePushNotificationIOS.presentLocalNotification

localNotification=>unit

ReactNativePushNotificationIOS.scheduleLocalNotification

localNotification=>unit

ReactNativePushNotificationIOS.cancelAllLocalNotifications

unit=>unit

ReactNativePushNotificationIOS.removeAllDeliveredNotifications

unit=>unit

ReactNativePushNotificationIOS.getDeliveredNotifications

(array(deliveredNotification)=>unit)

ReactNativePushNotificationIOS.removeDeliveredNotifications

(~identifiers:array(string))=>unit

ReactNativePushNotificationIOS.setApplicationIconBadgeNumber

int=>unit

ReactNativePushNotificationIOS.getApplicationIconBadgeNumber

(int=>unit)=>unit

ReactNativePushNotificationIOS.cancelLocalNotifications

unit=>unit

ReactNativePushNotificationIOS.cancelLocalNotificationsWithUserInfo

Js.Json.t=>unit

ReactNativePushNotificationIOS.getScheduledLocalNotifications

(array(formattedLocalNotification)=>unit)=>unit

ReactNativePushNotificationIOS.addEventListener

  (  [@bs.string]  [    |`notification(Notification.t => unit)    | `localNotification(Notification.t=>unit)    |`register((~deviceToken: string) => unit)    | `registrationError(registrationError('a)=>unit)  ]  )=>unit

ReactNativePushNotificationIOS.removeEventListener

(  [@bs.string]  [    |`notification(Notification.t => unit)    | `localNotification(Notification.t=>unit)    |`register((~deviceToken: string) => unit)    | `registrationError(registrationError('a)=>unit)  ]  )=>unit

ReactNativePushNotificationIOS.requestPermissions

unit=>Js.Promise.t(permissions)

ReactNativePushNotificationIOS.requestPermissionsWithOptions

requestPermissionsOptions=>Js.Promise.t(permissions)

ReactNativePushNotificationIOS.abandonPermissions

unit=>unit

ReactNativePushNotificationIOS.checkPermissions

(unit=>permissions)=>unit

ReactNativePushNotificationIOS.finish

fetchResult=>unit

ReactNativePushNotificationIOS.getInitialNotification

unit=>Js.Promise.t(Js.Nullable.t(Notification.t))

Changelog

Check thechangelog for more informations about recentreleases.


Contribute

Read thecontribution guidelinesbefore contributing.

Code of Conduct

We want this community to be friendly and respectful to each other. Please readour full code of conductso that you can understand what actions will and will not be tolerated.

About

ReScript bindings for @react-native-community/react-native-push-notification-ios

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp