【发布时间】:2021-02-15 16:38:31
【问题描述】:
我一直在使用需要读取手机联系人的 ionic 应用程序。在 iOS 升级到版本 14 之前,一切正常,但现在每次我想读取联系人时,应用程序都会崩溃并收到以下错误消息:ABPeoplePickerNavigationController does not support subclassing in iOS 7.0 and later. In the future, a nil instance will be returned.
我已经在 info.plist 文件中声明了NSContactsUsageDescription。
这是我在 ionic 中读取联系人的代码
searchContact() {
this.contactService.pickSingleContact().then((response: Contact) => {
console.log(response);
this.name = response.name.givenName + " " + response.name.familyName;
this.phone = response.phoneNumbers[0].value.toString();
});
this.inputDisabled = true;
}
pickSingleContact() {
return this.contacts.pickContact();
}
希望你能帮到我
【问题讨论】:
-
您找到 Ionic 3 的解决方案了吗?
标签: javascript ios xcode ionic-framework mobile