Skip to content

[iOS] Unable to delete contact #87

@fpaaske

Description

@fpaaske

I do this:

const response = await NativeScriptContacts.getAllContacts(['name']);
console.log('response.response', response.response);
console.log('response.data', response.data.length);
let first = response.data[0];
console.log('first contact', first);
first.delete();

And I get this error:

ERROR Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'foundContacts.count')

Full output:

CONSOLE LOG file: src/app/contacts/contacts.component.ts:65:20: response.response fetch
CONSOLE LOG file: src/app/contacts/contacts.component.ts:66:20: response.data 1361
CONSOLE LOG file: src/app/contacts/contacts.component.ts:68:20: first contact {
"id": "50A1444F-B134-41E1-98AE-DECF64D3B1B2",
"name": {
"given": "Some guy",
"middle": "",
"family": "",
"prefix": "",
"suffix": "",
"displayname": "",
"phonetic": {
"given": "",
"middle": "",
"family": ""
}
},
"organization": {
"name": "",
"jobTitle": "",
"department": ""
},
"nickname": "",
"notes": "",
"photo": null,
"urls": [],
"phoneNumbers": [],
"emailAddresses": [],
"postalAddresses": []
}
CONSOLE ERROR file: node_modules/@angular/core/fesm5/core.js:4002:0: ERROR Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'foundContacts.count')
tns info
✔ Getting NativeScript components versions information...
✔ Component nativescript has 6.7.8 version and is up to date.
✔ Component tns-core-modules has 6.5.12 version and is up to date.
✔ Component tns-android has 6.5.3 version and is up to date.
✔ Component tns-ios has 6.5.2 version and is up to date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions