Need help with rules_apple_line?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

142 Stars 8 Forks Apache License 2.0 90 Commits 2 Opened issues


LINE's Apple rules for Bazel

Services available


Need anything else?

Contributors list

LINE's Apple rules for Bazel

This repository contains additional rules for Bazel that can be used to bundle applications for Apple platforms.


Bazel's official rules for Apple platforms lack many of the features that are conventionally important in the Apple community in general, notably: supports for header maps, Clang modules and mixed language targets. This repository implements those features and exposes them as drop-in replacements for the official Apple rules.

These are open references of what are used to build the LINE iOS app. They may not work with curtain revisions of

due to their breaking changes. If they don't work out-of-the-box for you, use them as references for your custom rule's implementation.

Build Definitions

Library Rules

Bundling Rules

Other Rules


The latest versions of rules_apple and rules_swift rulesets require the usage of the --incompatibleobjccompileinfomigration flag to work correctly.

Quick setup

Add the following to your

file to add the external repositories, replacing the revision number in the
attribute with the version of the rules you wish to depend on:
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository( name = "build_bazel_rules_apple", remote = "", commit = "[SOME_HASH_VALUE]", )

git_repository( name = "build_bazel_rules_swift", remote = "", commit = "[SOME_HASH_VALUE]", )

git_repository( name = "build_bazel_apple_support", remote = "", commit = "[SOME_HASH_VALUE]", )

git_repository( name = "rules_apple_line", remote = "", commit = "[SOME_HASH_VALUE]", )

load( "@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies", )


load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", )


load( "@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies", )


load( "@rules_apple_line//apple:repositories.bzl", "rules_apple_line_dependencies", )

If you want to lock apple_support, rules_apple and rules_swift to specific

versions, be sure to call this function after their repository rules.



Minimal example:

load("@rules_apple_line//apple:mixed_static_framework.bzl", "mixed_static_framework")

mixed_static_framework( name = "Mixed", srcs = glob([ "/.m", "**/.swift", ]), hdrs = glob([ "/*.h", ]), )

See the examples directory for more examples.


Copyright 2020 LINE Corporation

LINE Corporation licenses this file to you under the Apache License, version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

See LICENSE for more detail.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.