You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the saveCalendar() method is for creating calendars. If you want to create a new event in one of the user's calendars, you need to first find the calendar you want to create the event on (using findCalendars()) and then call saveEvent() with a new event object, specifying the ID of the calendar you want to save the event to. You can find details on how to do this here:
I know how to save an event with an existing calendar, what i want to do is to create a new calendar, hence why i posted the saveCalendar() function and the error it throws
The RNCalendarEvents.saveCalendar({}} Function does not work, please help, I don't know if i am doing it wrongly or something
Environment
MAC OS Big Sur
React Native Version: "0.64.2"
System:
OS: macOS 11.5.2
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 212.17 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.6 - /usr/local/opt/node@14/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 6.14.15 - /usr/local/opt/node@14/bin/npm
Watchman: 2021.08.02.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK:
API Levels: 28, 29, 30, 31
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0
System Images: android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7583922
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_292 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: ^0.64.2 => 0.64.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to Reproduce
run react-native-calendar-events
RNCalendarEvents.requestPermissions()
await RNCalendarEvents.saveCalendar({
title: "Calendar Title",
accessLevel: "owner",
color: "#ff0000",
name: "Calendar Name",
entityType: "reminder",
ownerAccount: "email@gmail.com",
source: "Other",
});
Expected Behavior
Expect the package to create a new Event in the users calendar
Actual Behavior
Function Fails with Error:
Error: Calendar Calendar Title could not be saved
Error: Calendar Calendar Title could not be saved
at promiseMethodWrapper (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:2648:45)
at saveCalendar (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:352260:43)
at _callee3$ (http://192.168.161.76:8081/src/screens/settings/Calendars.bundle?platform=ios&modulesOnly=true&app=com.saf.conscious-baboon.app&dev=true&minify=false&runModule=true&shallow=true:154:106)
at call (native)
at tryCatch (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26605:23)
at invoke (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26778:32)
at anonymous (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26648:30)
at call (native)
at tryCatch (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26605:23)
at invoke (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26678:30)
at anonymous (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26708:19)
at tryCallTwo (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:31458:9)
at doResolve (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:31622:25)
at Promise (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:31481:14)
at callInvokeWithMethodAndArg (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26707:33)
at enqueue (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26712:157)
at anonymous (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26648:30)
at anonymous (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:26729:69)
at _callee3 (http://192.168.161.76:8081/src/screens/settings/Calendars.bundle?platform=ios&modulesOnly=true&app=com.saf.conscious-baboon.app&dev=true&minify=false&runModule=true&shallow=true:139:50)
at tryCallOne (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:31449:16)
at anonymous (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:31550:27)
at apply (native)
at anonymous (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:31990:26)
at _callTimer (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:31878:17)
at _callImmediatesPass (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:31917:17)
at callImmediates (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:32134:33)
at __callImmediates (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:3134:35)
at anonymous (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:2913:34)
at __guard (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:3117:15)
at flushedQueue (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:2912:21)
at invokeCallbackAndReturnFlushedQueue (http://192.168.161.76:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.saf.conscious-baboon.app:2905:33)
The text was updated successfully, but these errors were encountered: