Closed terminaltor closed 1 month ago
Whats the code?
Found the problem at below code local-notification.js
:
exports._exec = function (action, args, callback, scope) {
var fn = this._createCallbackFn(callback, scope),
params = [];
if (Array.isArray(args)) {
params = args;
} else if (args) {
params.push(args);
}
exec(fn, null, 'LocalNotification', action, params);
};
getAll
will send args 0
, not array, and evaluated as false, hence params is empty
I have the same problem.
All methods returns same error, iOS only: 2018-08-06 10:14:57.086475+0300 Terminating app due to uncaught exception 'NSRangeException', reason: ' -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'
Ionic, iOS - android is fine!
cordova -v
): 8.0.0cordova platform ls
): android 7.0.0, ios 4.5.4Expected Behavior
The getAll & schedule methods should work :)
Actual Behavior
Getting this error: 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array
Steps to Reproduce
Context
Schedule multiple local notifications for my users
Debug logs
2018-08-06 10:14:57.086475+0300 HebCal [14732:1838811] Terminating app due to uncaught exception 'NSRangeException', reason: ' -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'