title: RNCalendarEvents.saveEvent() issues Error: No calendar has been set
body: <p>My <code>react-native-calendar-events</code> code is throwing an error, the error is saying <code>No calendar has been set</code>, but I don't know why this is happening. The same code on the legacy version of my app works on the same devices.</p>
  
  <pre><code>export async function createCalendarEvent(event) {
    const status = await RNCalendarEvents.authorizationStatus();
    console.log(status);
    if (status === "authorized" || status === "undetermined") {
      addToCalendar(event);
    } else {
      RNCalendarEvents.authorizeEventStore()
        .then(auth =&gt; {
          // handle status
          if (auth === "authorized" || auth === "undetermined") {
            addToCalendar(event);
          }
        })
        .catch(() =&gt; {
          alert("This app needs calendar access");
        });
    }
  }
  
  async function addToCalendar(event) {
    try {
      const startDate =
        Platform.OS === "ios"
          ? format(parse(event.StartDateLocal))
          : parse(event.StartDateLocal);
      const endDate =
        Platform.OS === "ios"
          ? format(parse(event.EndDateLocal))
          : parse(event.EndDateLocal);
      const allEvents = await RNCalendarEvents.fetchAllEvents(startDate, endDate);
  
      const calendarEvent = allEvents.find(e =&gt; e.title === event.Title);
      if (calendarEvent) {
        alert("You have already added this event to your calendar.");
      } else {
        const title = event.Title;
  
        const {
          Location: {
            AddressLine1: address,
            City: city,
            StateAbbreviation: state,
            PostalCode: zip
          }
        } = event;
  
        const location = `${address}, ${city}, ${state}, ${zip}`;
  
        const settings = {
          location,
          startDate,
          endDate
        };
        RNCalendarEvents.saveEvent(title, settings)
          .then(() =&gt; {
            alert("Event Saved");
          })
          .catch(rejectionReason =&gt; {
            console.log(rejectionReason);
            alert("Oops! Something has gone wrong.");
          });
      }
    } catch (e) {
      alert("Oops! Something has gone wrong with this request.");
    }
  }
  </code></pre>
  
  <p>I recently added the Or in <code>status === "authorized" || status === "undetermined"</code>, that somehow has kept the iOS side from crashing completely when it errors out.</p>
  
  <p>I thought it might be a version issue, but I went back to the version we had and I still have this issue. So the Promise is erroring out, but why?</p>
  
  <p>I put together a minimally viable product like so:</p>
  
  <pre><code>import React from "react";
  import { Text, StyleSheet, View, TouchableOpacity } from "react-native";
  import RNCalendarEvents from "react-native-calendar-events";
  import parse from "date-fns/parse";
  import format from "date-fns/format";
  
  const ComponentsScreen = () =&gt; {
    async function addToCalendar(event) {
      console.log(RNCalendarEvents);
      try {
        RNCalendarEvents.saveEvent("Title of event", {
          startDate: "2016-08-19T19:26:00.000Z",
          endDate: "2017-08-19T19:26:00.000Z"
        })
          .then(() =&gt; {
            alert("Event Saved");
          })
          .catch(rejectionReason =&gt; {
            console.log(rejectionReason);
            alert("Oops! Something has gone wrong.");
          });
      } catch (e) {
        alert(e.message);
      }
  </code></pre>
  
  <p>And the <code>RNCalendarEvents</code> method of <code>saveEvent()</code> returns undefined even though the <code>RNCalendarEvents</code> I console log, returns all the methods available to this API. I thought this would suggest a linking issue, but it should be autolinking and at any rate I tried <code>react-native link</code> and still getting undefined on its methods.</p>
  
  <p>I just noticed through my debugging process that <code>react-native-calendar-events</code> is still using <code>index.ios.js</code>. Could that be why I am getting back the methods for the <code>RNCalendarEvents</code> API, but when I try to implement them I get back <code>undefined</code>.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I added the following inside of <code>MainActivity.java</code>:</p>
  
  <pre><code>package com.nfibengage;
  import android.os.Bundle;
  import com.facebook.react.ReactActivity;
  import com.facebook.react.ReactActivityDelegate;
  import org.devio.rn.splashscreen.SplashScreen;
  import android.view.MotionEvent;
  import com.facebook.react.ReactRootView;
  import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
  
  public class MainActivity extends ReactActivity {
  
      /**
       * Returns the name of the main component registered from JavaScript.
       * This is used to schedule rendering of the component.
       */
      @Override
      protected String getMainComponentName() {
          return "NFIBEngage";
      }
  
      /*
       * this is for https://github.com/crazycodeboy/react-native-splash-screen
       */
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          SplashScreen.show(this);
          super.onCreate(savedInstanceState);
      }
  
      @Override
      public boolean dispatchTouchEvent(MotionEvent ev) {
          return super.dispatchTouchEvent(ev);
      }
  
      @Override
      public void onRequestPermissionResult(int RequestCode, String[] permissions, int[] grantResults) {
        super.onRequestPermissionResult(RequestCode, permissions, grantResults);
        CalendarEventsPackage.onRequestPermissionResult(RequestCode, permissions, grantResults);
      }
  </code></pre>
  
  <p>And I am still getting the same error message of <code>No calendar has been set</code>.</p>
  
  <p>So I thought perhahs I needed to add the import: <code>import com.calendarevents.CalendarEventsPackage;</code>. After I added it to <code>MainActivity.java</code> and ran Android emulator again, on build I got the following errors:</p>
  
  <blockquote>
    <p>error: method does not override or implement a method from a supertype
    error: cannot find symbol method
    onRequestPermissionResult(int,String[],int[]) error: cannot find
    symbol method onRequestPermissionResult(int,String[],int[])</p>
  </blockquote>
  
  <p>I was able to resolve the first error: <code>error: method does not override or implement a method from a supertype</code> by simply removing <code>@Override</code> from:</p>
  
  <pre><code>@Override
      public void onRequestPermissionResult(int RequestCode, String[] permissions, int[] grantResults) {
        super.onRequestPermissionResult(RequestCode, permissions, grantResults);
        CalendarEventsPackage.onRequestPermissionResult(RequestCode, permissions, grantResults);
      }
  </code></pre>