react-native-ios

How to go to specific native view controller from react-native code?

点点圈 提交于 2019-12-22 08:28:33
问题 I'm a newbie in react-native. I'm adding one feature in react-native to an existing swift application. I presented the RCTRootview from my native view controller. From there when user clicks on back button I have to go to Homepage which is written in swift. How do I communicate from react-native to native application code. Can someone please help me with this scenerio. I stuck at this point from last 2 days. Thanks in advance. 回答1: Yes. I found out the answer for this. It is all possible with

How to eject expo project to native code

核能气质少年 提交于 2019-12-22 04:50:53
问题 I eject project from expo with command npm run eject . It generates 2 folders ios and android . I tried to run the project by xcode but it still display this error. Maybe I'm not clear how to run project after eject, can you help me run it. I run some statements to install pod , but cannot work https://github.com/CocoaPods/CocoaPods/issues/2303 回答1: So with ejecting, you should have been presented with two options: ? How would you like to eject from create-react-native-app? (Use arrow keys) ❯

Expo XDE “timeout of 60000 ms exceeded”?

感情迁移 提交于 2019-12-22 04:27:13
问题 I am using Expo XDE to create a new project for my first react native application. But whenever I click on "create new project", it starts downloading some stuff and errors out. Don't know where to increase this timeout value, I checked the documentation of expo but could not find anything related to this. Any leads here is really appreciated. Please note that I installed expo xde-2.22.0.dmg on mac OS High Sierra version 10.13 (17A405) 回答1: Looks like someone reported this issue to expo after

react-native error RCTJSONStringify() encountered the following error: Invalid type in JSON write (NSURL)

久未见 提交于 2019-12-21 07:47:07
问题 I am trying to use react-native-fbsdk in my react-native app. It was working fine untill yesterday. But, today it gives a weird error stating RCTJSONStringify() encountered the following error: Invalid type in JSON write (NSURL). RN v0.42.0 Here is my code: _fbAuth(error, result) { if (error) { console.log("error"); alert("login has error: " + result.error); } else if (result.isCancelled) { console.log("login cancelled"); alert("login is cancelled."); } else { AccessToken

react-native ios Podfile issue with “use_native_modules!”

∥☆過路亽.° 提交于 2019-12-21 07:02:51
问题 In my react-native project (react-native@0.60) in the ios/ dir I run pod install and get this error: [!] Invalid `Podfile` file: no implicit conversion of nil into String. # from /Users/coryrobinson/projects/hhs2/ios/Podfile:37 # ------------------------------------------- # > use_native_modules! # end # ------------------------------------------- I haven't added or changed anything in this Podfile - it's all react-native generated. (I'm not experienced in iOS dev so this might be a simple

react-native ios Podfile issue with “use_native_modules!”

寵の児 提交于 2019-12-21 07:02:29
问题 In my react-native project (react-native@0.60) in the ios/ dir I run pod install and get this error: [!] Invalid `Podfile` file: no implicit conversion of nil into String. # from /Users/coryrobinson/projects/hhs2/ios/Podfile:37 # ------------------------------------------- # > use_native_modules! # end # ------------------------------------------- I haven't added or changed anything in this Podfile - it's all react-native generated. (I'm not experienced in iOS dev so this might be a simple

React Native FlatList - Variable columns

我只是一个虾纸丫 提交于 2019-12-21 06:08:07
问题 I am developing a infinitely scrolling list of products which contain different types of products. A product can be featured or not featured. When a product is featured, we have a product card design that takes up the full width of the phone, otherwise the design calls for a 2 column row The data looks something like this: [ { "type": "featured-product", "name": "Product", "description: "yadda yadda" }, { "type": "product", "name": "Another Product", "description: "yadda yadda" }, { "type":

React Native FlatList - Variable columns

浪尽此生 提交于 2019-12-21 06:07:00
问题 I am developing a infinitely scrolling list of products which contain different types of products. A product can be featured or not featured. When a product is featured, we have a product card design that takes up the full width of the phone, otherwise the design calls for a 2 column row The data looks something like this: [ { "type": "featured-product", "name": "Product", "description: "yadda yadda" }, { "type": "product", "name": "Another Product", "description: "yadda yadda" }, { "type":

React Native endless stream of Socket SO_ERROR

社会主义新天地 提交于 2019-12-21 05:06:12
问题 I'm working on an existing React Native project and in XCode log output I get an endless stream of the following errors 2019-01-09 12:15:49.005630+0000 App [13746:3543026] [] nw_socket_handle_socket_event [C10.1:1] Socket SO_ERROR [61: Connection refused] 2019-01-09 12:15:49.016640+0000 App [13746:3543026] [] nw_socket_handle_socket_event [C10.2:1] Socket SO_ERROR [61: Connection refused] 2019-01-09 12:15:49.017800+0000 App [13746:3543010] [] nw_connection_get_connected_socket [C10] Client

Xcode 11 Upgrade | Could not find iPhone X simulator | XRPackageModel 9.0.omo

你说的曾经没有我的故事 提交于 2019-12-21 01:27:13
问题 Anyone else getting this since upgrading from Xcode 10.3 to Xcode 11 when running react-native run-ios and any idea to get back up and running? CoreData: annotation: Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo' error Could not find iPhone X simulator 回答1: I remember this happening before and amending: node_modules⁩ ▸ ⁨