Skip to content

Adoobdoob71/react-native-add-calendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

react-native-add-calendar

Allows you to add events to the native device calendar

npm version npm downloads bundle size License: MIT Nitro Modules

Installation

npm install react-native-add-calendar react-native-nitro-modules

> `react-native-nitro-modules` is required as this library relies on Nitro Modules

Usage

import { addEvent } from 'react-native-add-calendar';

// ...

addEvent({
  title: 'Hello world',
  description: 'Somewhere over the rainbow',
  startDate: 1773759222723, // in milliseconds
  endDate: 1773999600000, // in milliseconds
  location: 'Idk maybe over there',
  url: 'https://github.com/Adoobdoob71',
});

Demo

iOS demo
iOS
Android demo
Android

iOS setup

To access the Calendar, add the following keys to your app’s Info.plist (the one in your app, not the library):

<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
<string>Used to add events to the calendar.</string>
<key>NSCalendarsUsageDescription</key>
<string>Used to access calendar information.</string>

⚠️ Note: Without these keys, the app may crash or be rejected by App Store review when calendar access is requested.

and that's it 🥳

Android setup

Android is ready to go after downloading library 🥳

Contributing

License

MIT


Made with create-react-native-library

About

React Native library for adding events to native-device calendars

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors