Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update iOS contributing guide #323

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ CocoaPods does not directly integrate with `bazel`, when core targets are update
./tools/build_ios_bundles.sh
```
This will query `bazel` for dependent targets, copy their output and regenerate the `.xcworkspace`.

`bazel` does not process resources the same way CocoaPods does, so in order to share the same [mocks](https://github.com/player-ui/player/tree/main/plugins/reference-assets/mocks) as the other platforms, there is a [precompile script](https://github.com/player-ui/player/blob/main/PlayerUI.podspec#L84-L91) that generates a `.swift` file with the mocks. In order for this to work, `node` must be accessible in your environment. To verify this, run:
```sh
env node
```

### Player
For speed and consistency, this repo leverages `bazel` as it's main build tool. Check out the [bazel](https://bazel.build/) docs for more info.

Expand Down
6 changes: 6 additions & 0 deletions tools/build_ios_bundles.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash
git_root=$(git rev-parse --show-toplevel)

# Build all bundle targets that we rely on
"bazel" build `bazel query 'attr(name, "^.*_Bundles$", //...)' --output label 2>/dev/null`
# explicitly build make-flow
"bazel" build //core/make-flow/...
# run yarn so make-flow is importable in node runtime
yarn
# Run pod install to generate xcworkspace
cd "$git_root/xcode" && bundle exec pod install