wmcmahan / react-native-calendar-reminders Goto Github PK
View Code? Open in Web Editor NEWReact Native Module for IOS Calendar Reminders
License: MIT License
React Native Module for IOS Calendar Reminders
License: MIT License
I have to set reminder in device's calender. I used this reference. I got the error "undefined is not a function (near '..._reactNativeCalendarReminders.default.saveReminder...')" . when I used
RNCalendarReminders.saveReminder('title', {
location: 'location',
notes: 'notes',
startDate: '2019-10-01T09:45:00.000UTC',
alarms: [{
date: -1 // or absolute date
}]
});
Hi there! I'm trying to create alarm for reminder but unsuccessful.
I've linked EventKit.framework & RNCalendarReminders in Build Phases, tried to set different data etc, but all my Reminders with alarm arr I create whatever I try to change appears in Reminder section, without any info regarding alarm. Do you have any Ideas what it could be?
P.S. NativeAppEmmiter imported, I've used events for creating Reminder with alarm you wrote in Readme.
P.S.S. I've downloaded app 'thehoick-habit-app' created by Adam (guy who wrote #9 ) but unfortunately, I didn't succeed also to rcv any alarm after setting new notification.
Do you have any ideas what it could be?
Thanks
A few issues I had during installation:
react-native link
.RNCalendarReminders
project but it failed because that project couldn't find React Native header files. I gave up on that approach and just manually added RNCalendarReminders.h and RNCalendarReminders.m to my Xcode project.RNCalendarReminders.h
. The fix was to change #import "RCTBridgeModule.h"
to #import <React/RCTBridgeModule.h>
. It's possible because of the version of React Native I'm using. I'm on 0.41.2 via ExponentRNCalendarReminders.m
. I fixed by changing #import "RCTConvert.h"
to #import <React/RCTConvert.h>
.Hi,
As we know, on the native iOS reminders app we can mark items done, once the task has been completed. Is there any way in which we can read that value in react native through this component, so that we know whether the particular reminder/task was completed or not?
I am sorry if this exists, I tried looking around but couldn't find this feature. Would be glad if this could be included!
Hi @wmcmahan,
I was trying to update the reminder's isCompleted value from my application. Just to mark a reminder as completed, I don't want to use saveReminder and send all the details viz title, alarms, recurrence, notes, etc. Can we have an update method where if I say something like
RNCalendarReminders.updateReminder(reminder.id, {
id: reminder.id,
isCompleted: reminder.isCompleted,
});
it should keep the remaining values as it is, rather than resetting everything?
Hello!
I am also seeing the same exception as addressed in PR 9:
Module RCTNativeAppEventEmitter is not a registered callable module.
in response to calling RNCalendarReminders.saveReminder()
using RN 0.19. The PR fixes the issue for me.
I was able to reproduce this in a new react-native 0.19 app that includes nothing but react-native-calendar-reminders
. Let me know if I can provide any other info.
I just tried this out on the iOS Simulator and on iPhone 4s but I keep getting No calendar has been set
when I tried to saveReminder
.
I tried restarting the phone, turn iCloud calendar and reminder on and off, set default calendar and default reminder. But didn't make any difference.
Help?
It works on debug mode on simulator and even on device connected to the laptop but not on release.
Here's the code.
export const addScheduleItem = (data) => {
return function(dispatch){
dispatch({type: 'SCHEDULE_PROCESSING'});
reminderData = {
location: data.location,
notes: data.notes,
startDate: data.startDate,
dueDate: data.startDate,
alarms: [{
date: data.startDate,
}],
recurrence: data.recurrence
}
RNCalendarReminders.saveReminder(data.title, reminderData);
dispatch({type: 'SCHEDULE_ADDED', payload: reminderData});
}
}
Is reminder's library compatible with react-native-calendars library ? What I meant is, would it possible to bind reminders from here to agenda in theirs?
thanks and regards,
Nauman.
I really like this component, thanks for creating it. I would really like to implement a reminder with an alert 30 minutes prior. Can you support this?
Thanks
Really looking to add this to my react-native app. Just curious to see if you plan on maintaining this?
Or is there any clue for doing this?
Property | Value | Description |
---|---|---|
recurrence | String | The simple recurrence frequency of the reminder ['daily', 'weekly', 'monthly', 'yearly']. |
We have an app that requires 3 month, 6 month, 9 month recurrences. The current setup doesn't allow for that. Was wondering if this feature will come someday.
I want to add custom id to reminder but I'm getting this error but it works fine without setting id.
[fatal][tid:com.facebook.react.RNCalendarRemindersQueue] Exception '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]' was thrown while invoking saveReminder on target RNCalendarReminders with params (
"\U062a\U0648\U062c\U0647",
{
alarms = (
{
date = "2016-05-24T15:15:00.000Z";
}
);
id = 1c1b4ab9df774316a84ca989070d5ce8;
notes = Transaction;
startDate = "2016-05-24T15:15:00.000Z";
}
)
To replicate:
RNCalendarReminders.saveReminder('title', {
notes: 'notes',
startDate: '2016-10-01T09:45:00.000UTC',
alarms: [{
date: '2016-10-01T09:45:00.000UTC'
}],
recurrence: 'daily'
});
When you click on info in reminders the alarm date is being changed and a due date has been added (which wasn't there when the reminder was added for the first time and is different from the alarm date).
I downloaded the zip and open in xcode .
I can't simulator cause "RCTBridgeModule.h not found"
Thank you
I cannot even imagine where to begin debugging this, but for some unknown reason, and it quite frankly may actually have nothing to do with your module itself, but with this module installed, the android release build crashes, instantly on startup, like 5 screens away from where the module is even being used within the application.
Dev mode is fine, zero errors are raised anywhere for anything. I would expect that when building the android build steps would ignore everything to do with this, and as the module requiring this is only used when the device is IOS it should not even be looking for it even when it is on the relevant screen.
Any suggestions perhaps, I am hoping to avoid having to maintain 2 separate projects because of a button.
I am getting error 'undefined is not an object:
import RNCalendarReminders from 'react-native-calendar-reminders';
const {NativeAppEventEmitter} = React;
RNCalendarReminders.fetchAllReminders(reminders => {...})
I'm pretty new to react-native/ios programming, is any any example code to start with get authorized access to event store and fetch reminders?
follow up: I just figured out on 'add EventKit.framework to project libraries', but can't adding the RNCalendarReminders into project libraries, and I'm not sure if I'm doing the right thing to fix the issue
follow up: I finally figured out how to adding the RNCalendarReminders into the project libraries. But still need full example guide on how to manipulate the event store.
Hello. Is There a way of manually linking the library? I need it.
I Tried to run RNCalendarReminders.authorizedEventStore() and i got the error below
I remember having the same error with react-native-calendar-events built by you. Thanks, you did a great job for that one.
and it was caused by unlinked project. I will be waiting for your response. thanks in advance.
If it's saved you can do the linking easily with rmpn link
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.