Comments (3)
This may be related to #77
from nativescript-contacts.
I'm hitting the same thing in a JavaScript project
tns info
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 6.8.0 and the latest available version is 7.2.0.
⚠ Update available for component tns-core-modules. Your current version is 6.5.24 and the latest available version is 6.5.25.
✔ Component tns-android has 6.5.3 version and is up to date.
✔ Component tns-ios has 6.5.4 version and is up to date.
from nativescript-contacts.
I did some debugging, and the code at issue is contact-model.ios.js line 251:
var foundContacts = store.unifiedContactsMatchingPredicateKeysToFetchError(searchPredicate, keysToFetch, null);
if (foundContacts.count > 0) {
contactRecord = foundContacts[0].mutableCopy();
}
foundContacts is null, and so foundContacts.count
raises an exception.
if (foundContacts && foundContacts.count > 0) {
It's not clear yet why store.unifiedContactsMatchingPredicateKeysToFetchError
is returning null.
[edit]
I've been investigating further, as I really need this to work. I tried replacing unifiedContactsMatchingPredicateKeysToFetchError
with unifiedContactWithIdentifierKeysToFetchError
but with no luck. Both functions take a third parameter which the doc simply describes as, "Error information, if an error occurred." but I haven't found anyway to catch the error data, even within a try/catch block.
If anyone knows how to catch the error data that would certainly help.
[edit 2]
This post looks pertinent. I'll investigate later today.
[edit 3]
Here's what's changed: com.apple.developer.contacts.notes
Apple has made access to the notes field more restricted. If I comment-out "note" from keysToFetch, the contact.delete() works as expected. Next I'll figure out how I want to proceed with this. I don't really need the notes field, and that may mean I'll locally modify my own copy of the plugin to remove it from keysToFetch.
[edit 4]
This issue is a dupe of #89, and fixed with pull request #90.
[edit 5]
Correction: while issue #89 does address a similar issue, pr #90 does not include changes to contact-model.ios.js, and thus does not fix this particular issue. To bypass the issue it is sufficient to comment out line 244 ("note",
) in keysToFetch.
from nativescript-contacts.
Related Issues (20)
- App breaks because Image Source is not properly pointed
- Package breaks because image-source is not properly pointed in contact-helper.android.js
- app breaks because image-source was not properly imported HOT 1
- Android build fails with Cannot get property 'dependencies' on null object HOT 2
- Webpack build issue on Angular project
- Possibly corrupting contacts? HOT 10
- Add support for ContactsUI to add new contact HOT 2
- ViewHierarchy error on iOS HOT 8
- Always triggering HMR / Webpack HOT 3
- TypeError: null is not an object (evaluating 'foundContacts.count')
- Unable to getAllContacts on iOS 13 HOT 5
- Slow perfornmance HOT 3
- Fatal crash in iOS HOT 19
- getAllContacts only returns contacts the first time HOT 2
- [iOS 13+] The plugin shouldn't include "note" for iOS by default HOT 2
- getContactByNumber?
- [Android] contact.delete() fails with exception "Error optaining group id" HOT 4
- Problem with nativescript 8 HOT 3
- Bug when clicking on cancel with version 1.6.3 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-contacts.