https://github.com/fdzsergio/bazelsample
Example of iOS app built with Bazel
https://github.com/fdzsergio/bazelsample
bazel swift tulsi xcode
Last synced: 9 months ago
JSON representation
Example of iOS app built with Bazel
- Host: GitHub
- URL: https://github.com/fdzsergio/bazelsample
- Owner: fdzsergio
- License: apache-2.0
- Created: 2019-11-06T07:57:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-24T15:33:01.000Z (about 6 years ago)
- Last Synced: 2025-04-09T12:21:54.075Z (10 months ago)
- Topics: bazel, swift, tulsi, xcode
- Language: Python
- Size: 189 KB
- Stars: 61
- Watchers: 2
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BazelSample
This is a small example of how to build an iOS application with *Bazel*. If you want to know how it works and how to develop an example from scratch, check the [article](https://medium.com/@fdzsergio/building-faster-in-ios-with-bazel-448a3074e73).
## Requirements
To build and test the project you need the following dependencies:
- Xcode 11.2.0
- Bazel 1.1.0
- Carthage 0.34.0
If you want to generate the Xcode project, you will need to install [Tulsi](https://github.com/bazelbuild/tulsi). You will need to setup the environment with carthage before build any target. I've built a script to automatizate this:
> $ make setup
## Usage
To build the iOS app and generate an IPA file you will run:
> $ make build
If you want to test all targets on project run the following:
> $ make test
To run the app on simulator from terminal you could exec:
> $ make run
### Xcode project generation
To generate the xcode project from terminal you need to run:
> $ make project
This command generate a project on `Develop` environment, if you want to change it, you could run:
> $ scripts/tulsigen config/BazelSample.tulsiproj Production
## Advanced usage
If you want to build a release version with `Production` envinronment you need pass the following options:
> $ tools/bazelw build //App:Sample --config release --define envinronment=production
Maybe you need to config the `ios_signing_cert_name` on `.bazelrc`, and specify the `provisioning_profile` to handle the signing of the IPA file.
## References
* https://github.com/lyft/envoy-mobile
* https://github.com/airbnb/BuckSample
* https://github.com/acecilia/BazelVSBuckSample