-
카테고리
-
세부 분야
모바일 앱 개발
-
해결 여부
미해결
react-native-contacts 6버전에서 바꿔줘야합니다.
21.01.24 23:11 작성 조회수 384
0
최신버전에서는 아래와 같이 바꿔줘야합니다.
//contacts 6버전대
Contacts.getAll()
.then((contacts) => {
// work with contacts
})
.catch((e) => { //handle error
})
답변을 작성해보세요.
0
somee2147
2021.02.01
참고해주세요
const getContacts = () => {
requestContactPermission().then((didGetPermission) => {
if (didGetPermission) {
Contacts.getAll()
.then((contacts) => {
// console.warn(contacts);
setMyContacts(contacts);
})
.catch((err) => {
console.error(err);
throw err;
});
} else {
alert('no permission');
}
});
};
0
답변 2