react-native-background-task icon indicating copy to clipboard operation
react-native-background-task copied to clipboard

Cannot read property 'schedule' of undefined

Open prasanthyejje opened this issue 7 years ago • 1 comments

i followed Your README documentation but i am getting this error. colud you help me to solve this.

Version Dependency Version : "react-native-background-task": "^0.2.1" version of RN is: 0.50.3 react-native-cli: 2.0.1 My Device : windows-7, 64-bit , 8GB RAM

prasanthyejje avatar Aug 05 '18 06:08 prasanthyejje

In my case I accidentally assigned BackgroundTask.define(...) to a variable and attempted to invoke task.schedule(). Since there can only be one task then BackgroundTask.define() does not return some sort of instance. Fixed it by being sure to link it correctly and invoking BackgroundTask.schedule().

jojjesv avatar Nov 06 '18 07:11 jojjesv