如果您使用的是react-native-contacts,他们的 API 中似乎没有“searchContacts”函数。我建议使用“getContactsMatchingString”(字符串,回调) - 其中字符串是匹配名称(名字,中间,家庭)的任何字符串
{
recordID: '6b2237ee0df85980',
company: "",
emailAddresses: [{
label: "work",
email: "carl-jung@example.com",
}],
familyName: "Jung",
givenName: "Carl",
jobTitle: "",
note: 'some text',
urlAddresses: [{
label: "home",
url: "www.jung.com",
}],
middleName: "",
phoneNumbers: [{
label: "mobile",
number: "(555) 555-5555",
}],
hasThumbnail: true,
thumbnailPath: 'content://com.android.contacts/display_photo/3',
postalAddresses: [
{
street: '123 Fake Street',
city: 'Sample City',
state: 'CA',
region: 'CA',
postCode: '90210',
country: 'USA',
label: 'home'
}
],
birthday: {"year": 1988, "month": 0, "day": 1 }
}