1

I have complete my first little application with React Native.

Now I want to change some styles or the splash screen on their native platform, where is the generated code for these platforms? I checked the ios and android folder, but I just can't find the place of code.

For example, in xCode, I think most of code is stay in main.jsbundle file. but I don't know how to open it. Moreover, is it possible to continue with Swift language?

Haven
  • 7,808
  • 5
  • 25
  • 37

2 Answers2

5

where is the generated code for these platforms?

This is the point, React Native will not compile to ObjectiveC or Java. ReactNative is a set of Native Components which are controlled by JS over the NativeBridge.

Your whole application Logic lives in JS and talks to the native UI layer via the bridge.

Some links on this
https://facebook.github.io/react-native/docs/communication-ios.html

How to write your own native components and use control them with js
https://facebook.github.io/react-native/docs/native-modules-ios.html

webdeb
  • 12,993
  • 5
  • 28
  • 44
1

You have to look for the LaunchScreen.xib in your ios folder. You can then edit it from XCode.

You could also create a new StoryBoard file and make it your default splash screen by going to YourApp > General > App Icons and Launch Images > Launch Screen File and by selecting your new Storyboard.

Finally, maybe this could help you if you want to add some Swift to your React Native project.

Thanh-Quy Nguyen
  • 2,995
  • 7
  • 30
  • 46
  • Hi, thanks, I have found the launch screen, but where are the other pages and containers? – Haven Jun 18 '16 at 10:15
  • As far as I know, you won't be able to access them from XCode. Maybe this will help you understand how React Native actually works: https://www.raywenderlich.com/126063/react-native-tutorial (at the beginning, just before the "Hello World JSX" section) – Thanh-Quy Nguyen Jun 18 '16 at 10:41