josuesasilva / ios-bazel

Demo iOS app with React Native using Bazel as build system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ios-bazel

Demo iOS app with React Native using Bazel as build system.

Motivation

I was working in an ios app facing a lot of issues related to the native build system, it was hard to add new modules and the build time was terrible. Then I realized that exists other build system options that could help me to solve these issues.

I did start with Buck but after setup all the project using it, at that time I was not able to compile React Native dependencies. It happens because using a new build system implies that you have to create build rules for all your dependencies. It is really hard to compile react-native dependencies one by one since these dependencies are not just Swift or Obj-C frameworks/libraries.

Finally the Buck docs and community are not so large then I ended up having to try a different option.

After Buck attempt I found Bazel. Some important things like community support, docs and a lot of extensions made me give it a chance. But setting up all my project again I had the same issue using Buck, build all React Native dependencies.

Thinking how can I overcome this problem without having to maintain build rules to all React Native dependencies, I ended up using pre-compiled static libraries built with Xcode.

Here is the demo app I built using pre-compiled React Native libraries linked to a Swift based app using Bazel build system.

Building

bazel build //app:BazelAppSwift

Running in iOS Simulator

bazel run //app:BazelAppSwift

About

Demo iOS app with React Native using Bazel as build system

License:MIT License


Languages

Language:Objective-C 57.2%Language:C++ 20.4%Language:Objective-C++ 15.6%Language:Python 5.2%Language:Assembly 0.7%Language:Starlark 0.3%Language:C 0.2%Language:Ruby 0.1%Language:Shell 0.1%Language:Swift 0.1%Language:MATLAB 0.0%