0
votes

Below is the source code I have used in my project, functionality works as expected while in debug mode on android but once it is released nothing happens.

Source Code

    var startDateNew = Moment.utc(getFormattedDate(`${this.props.start_date_timestamp}
    ${this.props.start_time.split(" ")[0]}`, "YYYY-MM-DDTHH:mm:ss.SSS[Z]"));
    const eventConfig = {
    title: this.props.title,
    startDate: startDateNew
    // and other options
    };


    Analytics.trackEvent("Start Date As per YYYY-MM-DDTHH:mm:ss.SSS[Z] " + startDateNew)

    AddCalendarEvent.presentEventCreatingDialog(eventConfig)
        .then((eventInfo: { calendarItemIdentifier: string, eventIdentifier: string }) => {
            Analytics.trackEvent("Calender Success" + JSON.stringify(eventInfo))
        })
        .catch((error: string) => {
            Analytics.trackEvent("Calender Error" + JSON.stringify(error))
        });

Error Logged on appcenter

{"line":343,"column":12139,"sourceURL":"index.android.bundle"}

Android Studio Logcat Error is as below

I/ReactNativeJS: { [TypeError: [object Object],[object Object] is not iterable!] line: 87479, column: 89, sourceURL: 'http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false' }

NPM packages installed as below

"react-native-add-calendar-event": "2.1.0", "react-native": "0.57.7",

1
Have you linked the package with react-native link {package_name}Syed
yes, the package is linkedVishal Jadhav
what you values are you getting when you print this.props.start_date_timestamp and this.props.start_timesachin mathew
those values are as expected, I tried removing stardate the result is the sameVishal Jadhav

1 Answers

0
votes

The problem is resolved, by upgrading the react-native version from 57.3 to 59.9