{"id":13749937,"url":"https://github.com/BranchMetrics/fastlane-plugin-branch","last_synced_at":"2025-05-09T13:31:39.014Z","repository":{"id":56845652,"uuid":"88314327","full_name":"BranchMetrics/fastlane-plugin-branch","owner":"BranchMetrics","description":"Fastlane plugin to support Branch SDK integration and iOS Universal Link validation","archived":true,"fork":false,"pushed_at":"2020-03-25T20:55:38.000Z","size":7086,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-08T20:48:24.121Z","etag":null,"topics":["analytics","android","app-links","branch","deep-linking","fastlane-plugin","ios","metrics","universal-link-validator","universal-links","xcodeproj"],"latest_commit_sha":null,"homepage":"https://branch.io","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BranchMetrics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-15T01:01:13.000Z","updated_at":"2025-01-26T03:02:38.000Z","dependencies_parsed_at":"2022-09-17T11:20:41.692Z","dependency_job_id":null,"html_url":"https://github.com/BranchMetrics/fastlane-plugin-branch","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BranchMetrics%2Ffastlane-plugin-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BranchMetrics%2Ffastlane-plugin-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BranchMetrics%2Ffastlane-plugin-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BranchMetrics%2Ffastlane-plugin-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BranchMetrics","download_url":"https://codeload.github.com/BranchMetrics/fastlane-plugin-branch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253258256,"owners_count":21879617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","android","app-links","branch","deep-linking","fastlane-plugin","ios","metrics","universal-link-validator","universal-links","xcodeproj"],"created_at":"2024-08-03T07:01:18.991Z","updated_at":"2025-05-09T13:31:38.540Z","avatar_url":"https://github.com/BranchMetrics.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Branch plugin\n\nUse this Fastlane plugin to set up your Xcode project configuration correctly to\nuse the Branch SDK. It can also validate the Universal Link configuration in any Xcode\nproject, for Branch domains as well as non-Branch domains. Unlike web-based Universal\nLink validators, the `validate_universal_links` action\noperates directly on your project. There is no need to look up your team identifier or\nany other information. The validator requires no input at all for simple projects. It\nsupports both signed and unsigned apple-app-site-association files.\n\nAlso see the [Branch CLI](https://github.com/BranchMetrics/branch_io_cli), which\nsupports the same operations without Fastlane.\n\n[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg?style=flat-square)](https://rubygems.org/gems/fastlane-plugin-branch)\n[![Gem](https://img.shields.io/gem/v/fastlane-plugin-branch.svg?style=flat)](https://rubygems.org/gems/fastlane-plugin-branch)\n[![Downloads](https://img.shields.io/gem/dt/fastlane-plugin-branch.svg?style=flat)](https://rubygems.org/gems/fastlane-plugin-branch)\n[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/jdee/settings-bundle/blob/master/LICENSE)\n[![CircleCI](https://img.shields.io/circleci/project/github/BranchMetrics/fastlane-plugin-branch.svg)](https://circleci.com/gh/BranchMetrics/fastlane-plugin-branch)\n\n## Preliminary release\n\nThis is a preliminary release of this plugin. Please report any problems by opening issues in this repo.\n\n## Getting Started\n\nThis project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-branch`, add it to your project by running:\n\n```bash\nfastlane add_plugin branch\n```\n\n\u003c!-- The following is generated. Do not edit by hand. Run fastlane readme to --\u003e\n\u003c!-- regenerate this section. --\u003e\n\u003c!-- BEGIN ACTION REFERENCE --\u003e\n### setup_branch action\n\n```Ruby\nsetup_branch\n```\n\nIntegrates the Branch SDK into a native app project. This currently supports iOS only.\nIt will infer the project location if there is exactly one .xcodeproj anywhere under\nthe current directory, excluding any in a Pods or Carthage folder. Otherwise, specify\nthe project location using the `xcodeproj` option, or the CLI will prompt you for the\nlocation.\n\nIf a Podfile or Cartfile is detected, the Branch SDK will be added to the relevant\nconfiguration file and the dependencies updated to include the Branch framework.\nThis behavior may be suppressed using `add_sdk: false`. If no Podfile or Cartfile\nis found, and Branch.framework is not already among the project's dependencies,\nyou will be prompted for a number of choices, including setting up CocoaPods or\nCarthage for the project or directly installing the Branch.framework.\n\nBy default, all supplied Universal Link domains are validated. If validation passes,\nthe setup continues. If validation fails, no further action is taken. Suppress\nvalidation using `validate: false` or force changes when validation fails using\n`force`.\n\nBy default, this command will look for the first app target in the project. Test\ntargets are not supported. To set up an extension target, supply the `target` option.\n\nAll relevant target settings are modified. The Branch keys are added to the Info.plist,\nalong with the `branch_universal_link_domains` key for custom domains (when `domains`\nis used). For app targets, all domains are added to the project's Associated Domains\nentitlement. An entitlements file is also added for app targets if none is found.\nOptionally, if `frameworks` is specified, this command can add a list of system\nframeworks to the target's dependencies (e.g., AdSupport, CoreSpotlight, SafariServices).\n\nA language-specific patch is applied to the AppDelegate (Swift or Objective-C).\nThis can be suppressed using `patch_source: false`.\n\n#### Prerequisites\n\nBefore using this command, make sure to set up your app in the Branch Dashboard\n(https://dashboard.branch.io). See https://docs.branch.io/pages/dashboard/integrate/\nfor details. To use the `setup` command, you need:\n\n- Branch key(s), either live, test or both\n- Domain name(s) used for Branch links\n- Location of your Xcode project (may be inferred in simple projects)\n\nIf using the `commit` option, `git` is required. If not using `add_sdk: false`,\nthe `pod` or `carthage` command may be required. If not found, the CLI will\noffer to install and set up these command-line tools for you. Alternately, you can arrange\nthat the relevant commands are available in your `PATH`.\n\nAll parameters are optional. A live key or test key, or both is required, as well\nas at least one domain. Specify `live_key`, `test_key` or both and `app_link_subdomain`,\n`domains` or both. If these are not specified, this command will prompt you\nfor this information.\n\nSee https://github.com/BranchMetrics/branch_io_cli#setup-command for more information.\n\n\n#### Options\n\n|Fastfile key|description|Environment variable|type|default value|\n|---|---|---|---|---|\n|live_key|Branch live key|BRANCH_LIVE_KEY|String||\n|test_key|Branch test key|BRANCH_TEST_KEY|String||\n|domains|Comma-separated list of custom domain(s) or non-Branch domain(s)|BRANCH_DOMAINS|Array||\n|app_link_subdomain|Branch app.link subdomain, e.g. myapp for myapp.app.link|BRANCH_APP_LINK_SUBDOMAIN|String||\n|uri_scheme|Custom URI scheme used in the Branch Dashboard for this app|BRANCH_URI_SCHEME|String||\n|setting|Use a custom build setting for the Branch key (default: Use Info.plist)|BRANCH_SETTING|String||\n|test_configurations|List of configurations that use the test key with a user-defined setting (default: Debug configurations)|BRANCH_TEST_CONFIGURATIONS|Array||\n|xcodeproj|Path to an Xcode project to update|BRANCH_XCODEPROJ|String||\n|target|Name of a target to modify in the Xcode project|BRANCH_TARGET|String||\n|podfile|Path to the Podfile for the project|BRANCH_PODFILE|String||\n|cartfile|Path to the Cartfile for the project|BRANCH_CARTFILE|String||\n|carthage_command|Command to run when installing from Carthage|BRANCH_CARTHAGE_COMMAND|String|update --platform ios|\n|frameworks|Comma-separated list of system frameworks to add to the project|BRANCH_FRAMEWORKS|Array||\n|pod_repo_update|Update the local podspec repo before installing|BRANCH_POD_REPO_UPDATE|Boolean|true|\n|validate|Validate Universal Link configuration|BRANCH_VALIDATE|Boolean|true|\n|force|Update project even if Universal Link validation fails|BRANCH_FORCE|Boolean|false|\n|add_sdk|Add the Branch framework to the project|BRANCH_ADD_SDK|Boolean|true|\n|patch_source|Add Branch SDK calls to the AppDelegate|BRANCH_PATCH_SOURCE|Boolean|true|\n|commit|Commit the results to Git if non-blank|BRANCH_COMMIT|String||\n|confirm|Enable or disable many prompts|BRANCH_CONFIRM|Boolean|true|\n\n\n#### Examples\n\n```Ruby\nsetup_branch(\n  live_key: \"key_live_xxxx\",\n  test_key: \"key_test_yyyy\",\n  app_link_subdomain: \"myapp\",\n  uri_scheme: \"myscheme\",\n  xcodeproj: \"MyIOSApp.xcodeproj\"\n)\n\n```\n\n\n\n\n### validate_universal_links action\n\n```Ruby\nvalidate_universal_links\n```\n\nThis command validates all Branch-related settings for a target in an Xcode project,\nincluding validation of the apple-app-site-association file from each domain.\nMultiple targets may be validated by running the command multiple times using\nthe `target` option. Test targets are not supported.\n\nFor each Branch key present in the Info.plist, it retrieves the settings from Branch's\nsystem. If the information cannot be retrieved (or if the `branch_key` is not present),\nan error is recorded. If the `live_key` or `test_key` option is present,\nthe set of all keys used by the target must exactly match the options.\n\nAll domains and URI schemes configured for the target must include all domains\nand URI schemes configured for all keys used by the target. Other domains or\nURI schemes may also be present in the project.\n\nThis command validates all Universal Link domains configured in an application target\nwithout making any modification. It validates both Branch and non-Branch domains. Unlike\nweb-based Universal Link validators, this command operates directly on the project. It\nfinds the bundle and signing team identifiers in the project as well as the app's\nAssociated Domains. It requests the apple-app-site-association file for each domain\nand validates the file against the project's settings.\n\nBy default, all build configurations in the project are validated. To validate a different list\nof configurations, including a single configuration, specify the `configurations` option.\n\nIf `domains` is specified, the list of Universal Link domains in the Associated\nDomains entitlement must exactly match this list, without regard to order, for all\nconfigurations under validation. If no `domains` are provided, validation passes\nif at least one Universal Link domain is configured for each configuration and passes\nvalidation, and no Universal Link domain is present in any configuration that does not\npass validation.\n\nAll parameters are optional.\n\nSee https://github.com/BranchMetrics/branch_io_cli#validate-command for more information.\n\n\n#### Options\n\n|Fastfile key|description|Environment variable|type|default value|\n|---|---|---|---|---|\n|live_key|Branch live key expected in project|BRANCH_LIVE_KEY|String||\n|test_key|Branch test key expected in project|BRANCH_TEST_KEY|String||\n|domains|Comma-separated list of domains expected to be configured in the project (Branch domains or non-Branch domains)|BRANCH_DOMAINS|Array|[]|\n|xcodeproj|Path to an Xcode project to validate|BRANCH_XCODEPROJ|String||\n|target|Name of a target to validate in the Xcode project|BRANCH_TARGET|String||\n|configurations|Comma-separated list of configurations to validate (default: all)|BRANCH_CONFIGURATIONS|Array||\n|universal_links_only|Validate only the Universal Link configuration|BRANCH_UNIVERSAL_LINKS_ONLY|Boolean|false|\n|confirm|Enable or disable many prompts|BRANCH_CONFIRM|Boolean|true|\n\n\n#### Examples\n\n```Ruby\nvalidate_universal_links\n```\n\n```Ruby\nvalidate_universal_links(xcodeproj: \"MyProject.xcodeproj\")\n```\n\n```Ruby\nvalidate_universal_links(xcodeproj: \"MyProject.xcodeproj\", target: \"MyProject\")\n```\n\n```Ruby\nvalidate_universal_links(domains: %w{example.com www.example.com})\n```\n\n\n\n\n\n### branch_report action\n\n```Ruby\nbranch_report\n```\n\nThis command optionally cleans and then builds a workspace or project, generating a verbose\nreport with additional diagnostic information suitable for opening a support ticket.\n\nUse the `header_only` option to output only a brief diagnostic report without\nbuilding.\n\n\n#### Options\n\n|Fastfile key|description|Environment variable|type|default value|\n|---|---|---|---|---|\n|workspace|Path to an Xcode workspace|BRANCH_WORKSPACE|String||\n|xcodeproj|Path to an Xcode project|BRANCH_XCODEPROJ|String||\n|scheme|A scheme from the project or workspace to build|BRANCH_SCHEME|String||\n|target|A target to build|BRANCH_TARGET|String||\n|configuration|The build configuration to use (default: Scheme-dependent)|BRANCH_CONFIGURATION|String||\n|sdk|Passed as -sdk to xcodebuild|BRANCH_SDK|String|iphonesimulator|\n|podfile|Path to the Podfile for the project|BRANCH_PODFILE|String||\n|cartfile|Path to the Cartfile for the project|BRANCH_CARTFILE|String||\n|clean|Clean before attempting to build|BRANCH_CLEAN|Boolean|true|\n|header_only|Write a report header to standard output and exit|BRANCH_HEADER_ONLY|Boolean|false|\n|pod_repo_update|Update the local podspec repo before installing|BRANCH_POD_REPO_UPDATE|Boolean|true|\n|out|Report output path|BRANCH_REPORT_PATH|String|./report.txt|\n|confirm|Enable or disable many prompts|BRANCH_CONFIRM|Boolean|true|\n\n\n#### Examples\n\n```Ruby\nbranch_report\n```\n\n```Ruby\nbranch_report(header_only: true)\n```\n\n```Ruby\nbranch_report(workspace: \"MyWorkspace.xcworkspace\")\n```\n\n\n\n\n\n\u003c!-- END ACTION REFERENCE --\u003e\n\n## Run tests for this plugin\n\nTo run both the tests, and code style validation, run\n\n```\nbundle exec rake\n```\n\nTo automatically fix many of the styling issues, use\n```\nbundle exec rubocop -a\n```\n\n## Issues and Feedback\n\nFor any other issues and feedback about this plugin, please submit it to this repository.\n\n## Troubleshooting\n\nIf you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.\n\n## Using _fastlane_ Plugins\n\nFor more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).\n\n## About _fastlane_\n\n_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBranchMetrics%2Ffastlane-plugin-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBranchMetrics%2Ffastlane-plugin-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBranchMetrics%2Ffastlane-plugin-branch/lists"}