使用React Native,如何获取当前手机的号码?

同样地,我能得到用户的名字吗?

推荐答案

你不能.这不能通过iOS公共API实现,因此不能通过React Native实现.

React-native相关问答推荐

REACT-Native-Render-html中所有文本的默认字体大小

expo 日历应用因权限问题而崩溃

什么是 expoClientId?

如何在 navigation.js 文件中的 react-navigation 中当前路由名称?

不能总是在 Chrome 中设置 React Native 断点

从 React 原生 Js 代码调用 Android Native UI 组件方法

No component found for view with name "ARTShape"

create-react-native-app myproject和react-native init myproject之间的真正区别是什么

react-native android中出现此问题Cannot convert argument of type class org.json.JSONArray的原因是什么?

React Native:自定义字体在 Android 和 iOS 上呈现不同

React Native:ScrollView 中的 TouchableOpacity onPress 问题

如何删除不需要的expo 模块

如何在 ubuntu 上安装 facebook watchman?

React native expection java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/{package}/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit

带有 xcode 模拟器的 react-native 有非常慢的alert

react-native fetch() cookie 持久化

如何使用 Expo 在真实的 iOS 设备上运行应用程序?

如何在 Text 中围绕 Text 包裹 TouchableOpacity?

按钮的标题属性必须是字符串

Mapping children of a parent component