React Native Tutorial: Building iOS and Android Apps with JavaScript

I tried out some of the options. So far no good, will keep you posted…

This was what came out of the CLI

The following build commands failed:
ProcessInfoPlistFile build/Build/Products/Debug-iphonesimulator/PropertyFinder.app/Info.plist PropertyFinder/Info.plist
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/PropertyFinder.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application’s Info.plist contains a value for CFBundleIdentifier.
Print: Entry, “:CFBundleIdentifier”, Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/PropertyFinder.app/Info.plist
Print: Entry, “:CFBundleIdentifier”, Does Not Exist

I found this issue that seems to imply a corruption in a cached directory. Try the solution from hramos from August 3rd.

Just gave it a shot… not much luck…

Anthonys-MacBook-Pro:propertyfinder anthonykong$ rm ~/.rncache
rm: /Users/anthonykong/.rncache: is a directory

that was the output from terminal

I reinstalled the info.plist and was able to get the build to compile. However I am back at square one…

I found this in the console, when running thru Xcode

Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?

Try:

rm -rf ~/.rncache

This forces the directory to be removed.

Tried that and ran react-native run-ios. Still failed.

I’m quite stumped with this one. Are you able to run the completed app that’s listed at the end of the tutorial?

Me too… I am not sure what options I have. Being unable to get past that part, the tutorial cant proceed past that step which is step 3 i think

I tried two solutions that both worked.

  1. This solution uses the latest version of react native

rm -rf ~/.rncache
rm -rf node_modules
yarn install
react-native run-ios

  1. I used an earlier version of react
    react-native init [ProjectName] --version 0.44.0

Hi,
I can’t the project to run in Xcode because I have a secuirty software running on port 8081. I have searched the project replaced every occurrence of 8081 by 8082.
The files I changed are RTCBridgeDelegate.h, RTCBundleURLProvider.m, RTCInspectorDevServerHelper.mm, RCTPackagerConnectionBridgeConfig.h and RCTWebSocketExecutor.h. Cleaned the Xcode project rebuilt it. Changed the package.json
“scripts”: {
“start”: “node node_modules/react-native/local-cli/cli.js start --port 8082”,
“test”: “jest”
},
and still when I launch the project it starts on port 8081! Any ideas? Thanks!

I made the first edit according to your tutorial now I can’t get past this. Any ideas what to do?

After creating the app using command react-native init, I cannot see any index.ios.js or index.android.js in the project. I can see only index.js

What shall I do?

The September release version of react-native has combined what was previously index.ios.js and index.android.js into one file, index.js. For the purposes of going through the current tutorial, you can work with App.js instead. In the meantime, I’ll need to update the tutorial.

1 Like

Did you see my previous reply to you?

My bad. I wrote the question twice. Thank you for responding. I will continue with the tutorial for now with app.js file and will be actively waiting for update in the tutorial.

Hi,

Thanks for great tutorial. I am grateful to you for this tutorial.
I am newbie in react native world. I have a question:

Same as above detailed project: List view has image and text object which are rendered on the list. Now let it has one button on the right side. Now I want to know how to add onPress observer on this button. When click on this button we show the another screen or when press anywhere on the list except right button open detail screen.

Please provide help for this. Its appreciate me.

Thanks & Regards,
Hemant Solanki

This tutorial looks interesting and I am working through it. Kind of landed here as an aside while I was working on a Cayenne IOT project… Basically their boiler plate app did not work.

Anyway, I noticed that you mentioned index.ios.js is created by react-native init but that doesn’t seem to be the case. There is an index.js though. Could this be a typo or a change to how the init works?

Here is what my init created:
├── App.js
├── __tests__
├── android
├── app.json
├── index.js
├── ios
├── node_modules
├── package.json
└── yarn.lock

I noticed a few people have mentioned this, I should have read the comments more thoroughly. Great example of pretty much everything you need to know to get going. I am usually more of a video tutorial type but I thogutht this was nicely put together.

There were a few show stoppers in the instructions such as the one above. And the initial renaming the class was not quite clear what was going on. Although they did make me dig in to the code a bit more and give me a better understanding. I have done a little bit of REACT so it did help to have ‘some’ knowledge.

Next I am up for the challenge… Then I actually have something to build so I will look forward to exploring this a bit more.