This post is meant to be read in the context of its parent post "Lessons Learned on a React-Native Project". If you've stumbled on this particular page randomly, I'd recommend jumping over to that post and starting from there.

This lesson is closely linked to the previous section, but I felt it was worth calling out separately. In trying to (at a high level at least) abstract away the build process for each of the platforms, React-Native is attempting to plug a huge gap in your experience, for things to "just work". In practice, I found this rarely worked out in my favour.

Let me put it this way: If Gradle and XCode have entire sites dedicated to their usage, it gives you an idea of how deep you can potentially go. Or, how deep you may need to go if things go pear-shaped. As they most likely will.

This was one area where I found Xamarin is miles ahead of React-Native. Xamarin (to my knowledge) doesn't require any dealing with Gradle and XCode projects, it actually completely abstracts away the build process with a decent degree of success (tooling issues aside, which is a post for another day). React-Native however, is still using raw Gradle files, and hooking directly into the XCode xcproj or xcworkspace files and invoking the build processes directly. So while you're closer to the "metal" in terms of compilation for the platforms, it also means you need to delve deeper into those respective platforms when you're diagnosing issues with your build process.

Another thing I'd call out is be very careful when you're tinkering in those native Gradle or XCode projects. I found out the hard way what happens when you mess with things you don't fully understand... Our iOS project got into such a state where I had to rebuild the entire project from the ground up because something in our iOS dependencies was so fundamentally broken nothing built. And not just regular "it doesnt build", but if we tried to push it up to the remote build server (in trying to exclude the issue being our local environment) we got different failures.

So if you find yourself needing to tinker with header search paths, build phases, or modifying schemes in XCode I'd seriously question what you're actually trying to accomplish.

And make sure you're using source control, because when you eventually get things into such a state you cant tell up from down, it is wonderful to be able to do git reset --hard, and git clean -xfd and start from a clean (ha) slate.

There's a bit more on this later, when we talk about underlying dependencies.

Next Section -> "Your debugging experience is extremely important"