Giter Site home page Giter Site logo

tinder-kaijing / rules_ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bazel-ios/rules_ios

0.0 1.0 0.0 155 KB

Bazel rules for building iOS applications and frameworks

License: Apache License 2.0

Python 2.94% C 29.64% Objective-C 0.77% Swift 0.11% Starlark 64.85% Shell 1.69%

rules_ios's Introduction

iOS Rules for Bazel

master

โš ๏ธ This is alpha software. We are developing these rules in the open so you should only use them if you know what you are doing and are willing to help develop them.

These rules provide some macros and rules that make it easier to build iOS application with Bazel. The heavy lifting of compiling, and packaging is still done by the existing objc_library rule in Bazel, and by the swift_library rule available from rules_swift.

These rules require Bazel 2.0.

Reference documentation

Click here for the documentation.

Quick setup

Add the following lines to your WORKSPACE file. Note that since rules_swift and rules_apple no longer create releases, the versions are hardcoded to commit sha's that are known to work. You can see the particular commit sha's in repositories.bzl.

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
    name = "build_bazel_rules_ios",
    remote = "https://github.com/ob/rules_ios.git",
    branch = "master",
)

load(
    "@build_bazel_rules_ios//rules:app.bzl",
    "ios_application"
)

rules_ios_dependencies()

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

apple_rules_dependencies()

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

swift_rules_dependencies()

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

apple_support_dependencies()

Examples

Minimal example:

load("@build_bazel_rules_ios//rules:app.bzl", "ios_application")

ios_application(
    name = "iOS-App",
    srcs = glob(["*.m"]),
    bundle_id = "com.example.ios-app",
    entitlements = "ios.entitlements",
    families = [
        "iphone",
        "ipad",
    ],
    launch_storyboard = "LaunchScreen.storyboard",
    minimum_os_version = "12.0",
    visibility = ["//visibility:public"],
)

See the examples directory for sample applications.

rules_ios's People

Contributors

amberdixon avatar chenxiao0228 avatar ob avatar segiddins avatar thii avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.