-
-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
Milestone
Description
Hi Eddy,
In iOS, is there a good reason why the support for arrays was removed post 1.0.2
Version 1.0.2
let dict_1 = null;
if (opts.body) {
var cont_1 = opts.body;
** removed code
if (Array.isArray(cont_1)) {
dict_1 = NSMutableArray.new();
cont_1.forEach(function (item, idx) {
dict_1.addObject(item);
});
}
** eof removed code
else if (types_1.isObject(cont_1)) {
dict_1 = NSMutableDictionary.new();
Object.keys(cont_1).forEach(function (key) {
dict_1.setValueForKey(cont_1[key], key);
});
}
}
Version 1.2.1
let dict: NSMutableDictionary<string, any> = null;
if (opts.body) {
let cont = opts.body;
if (isObject(cont)) {
dict = NSMutableDictionary.new<string, any>();
Object.keys(cont).forEach(key => dict.setValueForKey(cont[key] as any, key));
}
}
Please let me know as this is holding back things here.