Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling 'viewExistingContact' on iOS causes the app to crash #767

Open
kesherai opened this issue Dec 27, 2024 · 0 comments
Open

Calling 'viewExistingContact' on iOS causes the app to crash #767

kesherai opened this issue Dec 27, 2024 · 0 comments

Comments

@kesherai
Copy link

Calling Contacts.viewExistingContact(contact); causes the iOS app to crash. However, Contacts.openExistingContact(contact); works well and opens the contact for editing.

There is also this warning in the code:

Conflicting parameter types in implementation of 'viewExistingContact:resolve:reject:': 'JS::NativeContacts::SpecViewExistingContactContact &' vs 'NSDictionary *__strong'

which I believe is due to the fact that the Obj-C implementation expects to get (NSDictionary *) as a parameter, but the auto-generated header from the JS code is creating this signature:
- (void)viewExistingContact:(JS::NativeContacts::SpecViewExistingContactContact &)contact resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject;
because in the JS code the signature is:
async function viewExistingContact(contact: { recordID: string; }): Promise<Contact | void>

instead of

async function viewExistingContact(contact: Contact): Promise<Contact | void>

Screenshot 2024-12-27 at 2 11 45 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant