Giter Club home page Giter Club logo

Comments (7)

wmcmahan avatar wmcmahan commented on June 9, 2024

Hi @harshvb7, what is the expected result after saving? Or is it not saving the reminder? Also, be aware that saving a reminder is async, so using calling dispatch after saveReminder like this is not guaranteed to work. This library uses events for callbacks, but I plan to update it with promises soon.

from react-native-calendar-reminders.

harshvb7 avatar harshvb7 commented on June 9, 2024

The 'dispatch' is only to trigger the add reminder form page to pop out and go back to the list.

After saving on debug:
Because of the remindersChanged listener added, the list gets a new item added.

After saving on Release:
Nothing happens. The reminder is not created. But if I go in the iOS Reminders app and create a new reminder manually and come back to the app, it adds shows new reminder in the list.
Everything works on the release module, including editing , deleting, etc. It just doesn't work for saving.

Is there anything to set in Xcode. My app deployment target is iOS 8.0.

Thanks

from react-native-calendar-reminders.

wmcmahan avatar wmcmahan commented on June 9, 2024

I'm not sure what is causing the release version to not save these reminders. If reading the reminders from the store works, it doesn't sound like a permissions problem. You could try to optimize the debug build similar to the release build, and check if any errors surface.

from react-native-calendar-reminders.

harshvb7 avatar harshvb7 commented on June 9, 2024

Ok,
I ran the release version on the device by editing the scheme from debug -> release.
Now while saving, if recurrence is passed the reminder is saved with 'Invalid Date'.
Without recurrence the app just crashes.

Another weird thing is that.
On debug:
Saving works if remote JS debugging is ON
else it gives this error:
JSON value '2016-10-07' 7:30:25 pm +0000' of type NSDate cannot be converted to a date

from react-native-calendar-reminders.

wmcmahan avatar wmcmahan commented on June 9, 2024

Looks like React Native might be having a hard time converting your start and due dates to an NSDate. Try using a Date instance as the value for the date properties.

from react-native-calendar-reminders.

wmcmahan avatar wmcmahan commented on June 9, 2024

Ok, my fault. Looks like there was a bug around the authorization. Should be fixed now if you want to give it another try.

from react-native-calendar-reminders.

harshvb7 avatar harshvb7 commented on June 9, 2024

I fixed it by using date string instead of date object.
I was passing the javascript date object. I changed it to string of format '2016-10-01T09:45:00.000UTC' using moment js and it worked.

from react-native-calendar-reminders.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.