Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 尝试使用React Native广播iBeacon_Ios_Node.js_React Native_Ibeacon - Fatal编程技术网

Ios 尝试使用React Native广播iBeacon

Ios 尝试使用React Native广播iBeacon,ios,node.js,react-native,ibeacon,Ios,Node.js,React Native,Ibeacon,我正在尝试使用React Native创建一个简单的应用程序,它可以广播iBeacon。我发现了一个可能的第三方模块,名为,但即使是一个简单的测试也失败了。我知道这已经有一段时间没有更新了,但是我找不到更好的解决方案 我将index.ios.js文件保存为iBeacon.js import React,{Component}来自“React” 从“react native”导入{Text,View} 从“/ibeacon”导入ibeacon 导出默认类应用程序扩展组件{ 组件willmount(

我正在尝试使用React Native创建一个简单的应用程序,它可以广播iBeacon。我发现了一个可能的第三方模块,名为,但即使是一个简单的测试也失败了。我知道这已经有一段时间没有更新了,但是我找不到更好的解决方案

我将
index.ios.js
文件保存为iBeacon.js

import React,{Component}来自“React”
从“react native”导入{Text,View}
从“/ibeacon”导入ibeacon
导出默认类应用程序扩展组件{
组件willmount(){
常数uuid='04bc1d42-98be-4031-a4a9-50c76cb3e1b9'
常量标识符='com.myapp'
ibeacon.StartAvertisingBeaconWithString(uuid,标识符,0,0)
}
render(){
返回(iBeacon)
}
}
但是,我在终端(以及运行iOS13的已连接iPhone 6S的屏幕)中发现以下错误:

Warning: %s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI., RootErrorBoundary
- node_modules/expo/build/environment/muteWarnings.fx.js:27:24 in error
- ... 28 more stack frames from framework internals

TypeError: null is not an object (evaluating 'NativeBeaconBroadcast.startSharedAdvertisingBeaconWithString')
* ibeacon.js:19:26 in startAdvertisingBeaconWithString
* App.js:12:43 in componentWillMount
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:7430:4 in callComponentWillMount
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:7576:27 in mountClassInstance
- ... 19 more stack frames from framework internals

我试过调试,但不明白为什么会发生这种情况……

这可能对你没有帮助,但如果你查看软件包的已知可用设备列表,iOS根本就没有列出。我认为软件包支持大量我从未听说过的设备,但无法支持超级流行的苹果产品,这让人非常恼火

手机和平板电脑

  • 谷歌像素[XL],像素C,Nexus6p,6,5X,9,补丁Nexus5
  • 阿尔卡特一键式Idol 3[双SIM卡],凶猛XL码
  • 华硕Zenfone 2[激光器],Zenpad 8
  • 黑莓私人
  • HTC 10,一台M9,Desire(530/626s/820)
  • 华为扬升Y550,荣誉5倍,联盟
  • 联想K3音符、Vibe P1m、Vibe K4音符
  • LG:G5、G4[触笔]、G3、G Flex2、G Vista 2、V10、K10、L Bello、Lancet、Leon、Magna、Optimus Zone 3、Spirit、贡品5
  • Moto X Play,X风格,X2,G2,G3,G4,Z Droid,Droid Turbo 2
  • 下一个罗宾
  • 一加二,三
  • OPPO A33f
  • 三星Galaxy:S7[Edge]-最多8个并发运行的标签,S6[Active/Edge/Edge Plus],S5[Active/Neo],注释5,注释Edge,注释4,选项卡S2(8.0/9.7),选项卡S(8.4/10.5),注释Pro,选项卡A 9.7,选项卡E,A5 2016[Duos],J5,J3 Duos,Alpha,Core Prime,Grand Prime,On7
  • 索尼Xperia E5,X,Z5[紧凑型/高级],C5 Ultra,C3,M4 Aqua[双]
  • 小米红色小米3,注2,注3,小米4,小米4i,小米5,小米Max
  • 中兴Maven、ZMAX 2、ZMAX Pro、Warp Elite
安卓电视

  • 索尼Bravia 2015

我也有同样的问题……运气好吗?