Skip to content

joshbuchea/react-native-reminders

 
 

Repository files navigation

React Native Reminders

NPM version License

React Native Reminders is a modern, well-supported, and cross-platform Reminders for React Native

Installation

yarn add @wiicamp/react-native-reminders

Or

npm install @wiicamp/react-native-reminders

Using React Native >= 0.60

Linking the package manually is not required anymore with Autolinking.

  • iOS Platform:

    $ npx pod-install # CocoaPods on iOS needs this extra step

Using React Native < 0.60

You then need to link the native parts of the library for the platforms you are using. The easiest way to link the library is using the CLI tool by running this command from the root of your project:

react-native link @wiicamp/react-native-reminders

Permissions

iOS

The user's permission is required in order to access the Reminders on devices running iOS 10 or later. Add the NSRemindersUsageDescription key in your Info.plist with a string that describes how your app will use this data. This key will appear as Privacy - Photo Library Usage Description in Xcode. If you try to access Reminders without this permission, your app will exit.

Android

Permission is required to read and write to the Calendar.

<manifest>
...
<uses-permission android:name="android.permission.READ_CALENDAR"/>
<uses-permission android:name="android.permission.WRITE_CALENDAR"/>
...
<application>

Then you have to explicitly ask for the permission

Usage

import Reminders from "@wiicamp/react-native-reminders";

// Request permission
Reminders.requestPermission();

// Get reminders
Reminders.getReminders();

// Add reminder
Reminders.addReminder({
  title: 'Wake-up reminder',
  note: 'Wake-up and have breakfast!',
  timestamp: Date.now() * 60000 * 5, // next five minutes from current time (milliseconds)
});

// Remove reminder
Reminders.removeReminder('the-reminder-id');

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 21.6%
  • Java 21.0%
  • Ruby 13.8%
  • TypeScript 13.4%
  • Objective-C 13.0%
  • Swift 11.7%
  • Other 5.5%