Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Updating the BraveRewards framework

Kyle Hickinson edited this page Jun 9, 2019 · 7 revisions

Making Changes to BraveRewards.framework

When you have changes that need to be fixed in the BraveRewards.framework (such as ledger or ads API), this needs to happen in brave-core.

  1. Create an issue with your problem and required changes and add the brave-core label to that issue
  2. Clone brave-browser if you haven't already
  3. Make sure its up to date:
    cd brave-browser
    git checkout -- "*" && git pull
    npm run init -- --target_os=ios
  4. Create your branch on brave-core:
    cd src/brave
    git checkout -b my-feature-branch
  5. Make your changes to the BraveRewards.framework files located in src/brave/vendor/brave-ios
    • Any files added or removed must be reflected in BUILD.gn (sources)
    • Any directories added or removed must be reflected in BUILD.gn (include_dirs)
  6. Build your changes:
    # This has to be run at brave-browser root dir
    cd ../..
    # Creates debug build
    npm run build -- target_os=ios
    # Creates release build
    npm run build -- Release target_os=ios
    # Creates arm64 build
    npm run build -- target_os=ios target_arch=arm64
  7. Copy a FAT framework to brave-rewards-ios by running scripts/build_in_core.sh --skip-update ~/path/to/brave-browser.
    • Note: You must include --skip-update or your local changes will be removed
    • If your PR is likely to take some time and your branch is on the brave-core remote you can edit package.json in brave-browser to point brave-core to your branch. This means any npm run init will set brave-core to your branch and not master.
  8. When things are working correctly, open a PR in brave-core and add all recommended reviewers.
    • Add auto-closing words to your PR description that references your original issue created in step 1 (i.e. resolves https://github.com/brave/brave-rewards-ios/issues/9000)
    • If your changeset does not affect the desktop build (i.e. no changes were made to non-ios files), make sure to add the appropriate CI labels to your PR on creation: CI/skip-windows, CI/skip-linux, CI/skip-macos, and CI/skip-android. This will cut the time waiting for CI to complete and save CI resources. If you forget to add these you can login to Jenkins and abort the build, add the labels, then restart the build.
  9. Upon your PR being merged by you or another member and assuming your brave-rewards-ios changeset requires the updated brave-core code, update your library using scripts/build_in_core.sh ~/path/to/brave-browser again (this time ommiting skip-upgrade) and submit a PR on brave-rewards-ios with the changes related to your brave-core changes.
Clone this wiki locally