Tag: 反应原生

React Native 0.40.0:RCTBundleURLProvider.h“文件未find – AppDelegate.m

我遇到以下错误反应本机版本0.40.0版本React / RCTBundleURLProvider.h文件未find。 我尝试删除节点模块,使用npm安装并清除watchman.multiple次。 但仍然无法得到它的工作。

打印:条目“:CFBundleIdentifier”不存在

当我运行react-native run-ios的构build成功,但我得到下面的错误。 我已经检查了所有的地方,但似乎没有工作。 在命令前面使用sudo也无济于事。 我使用Xcode 7.3,react-native-cli:0.2.0,react-native:0.24.1,节点v5.11.0。 === BUILD TARGET mobileTests OF PROJECT mobile WITH CONFIGURATION Release === Check dependencies ** BUILD SUCCEEDED ** Installing build/Build/Products/Debug-iphonesimulator/mobile.app An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path. Provide a valid path to […]

React-Native提取,networking请求失败。 不使用本地主机

我有一个应用程序,即时通讯使用获取authentication用户。 它直到前几天都在工作,我什么都没有改变。 刚刚从反应0.27升级到0.28,不抓取不工作。 我已经search了近2天,我已经阅读了几乎所有的问题在stackoverflow。 大多数用户试图从本地主机获取某些东西,当他们将其更改为实际的IP地址时,他们就可以正常工作。 但即时通讯不从本地提取任何东西,也是我的代码曾经工作。 这里是我的代码: fetch('http://somesite.com/app/connect', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'language':'en-US', 'Authorization': 'Bearer ' + access_token, }, body: JSON.stringify({ uid: uid, refresh_token: refresh_token, token: access_token, device: device_id, device_name: device_name, }) }) .then((response) => response.json()) .then((responseData) => { console.log(JSON.stringify(responseData.body)) }) .catch((err)=> { console.log('Some errors occured'); console.log(err); }) .done(); 我试图做一些新的项目,简单的,只是使用了一个简单的获取示例来教程,它给了同样的错误。 […]

如何构buildReact Native iOS应用程序,获取.app文件并将其部署到设备?

我要通过以下信息: https : //facebook.github.io/react-native/docs/running-on-device-ios.html#content 我做了react-native bundle命令,更改了AppDelegate.m ,并且可以成功构build。 虽然我不确定它在最后的构build。 它在哪里放.app文件,当我想要复制该.app文件到我的手机,我应该通过iTunes同步它,还是有一个更快的方法? 基本上我只是试图创build和部署一个独立的应用程序,不需要React包装服务器。

在React Native中获取ScrollView的当前滚动位置

是否有可能获得当前的滚动位置,或React Native中<ScrollView>组件的当前页面? 所以像这样: <ScrollView horizontal={true} pagingEnabled={true} onScrollAnimationEnd={() => { // get this scrollview's current page or x/y scroll position }}> this.state.data.map(function(e, i) { <ImageCt key={i}></ImageCt> }) </ScrollView>