Uncategorized

 Download source code:

 git clone -b source-only https://github.com/bazelbuild/examples

 cd into forder examples/tutorial and make file WORKSPACE by terminal:

   touch WORKSPACE

 Open WORKSPACE and type:

   cd into ios-app and make BUILD file:

 touch BUILD

 Open BUILD file and type:

 On this file:

 objc_library(
    name = "UrlGetClasses",
    srcs = [
         "UrlGet/AppDelegate.m",
         "UrlGet/UrlGetViewController.m",
         "UrlGet/main.m",
    ],
    hdrs = glob(["UrlGet/*.h"]),
    data = ["UrlGet/UrlGetViewController.xib"],
)

       

This script make 1 library objective-c with name UrlGetClasses, include files .m in forder UrlGet. header file in hdrs, data file is .xib.

Make .ipa file with rule:

 ios_application(
    name = "ios-app",
    bundle_id = "Google.UrlGet",
    families = [
        "iphone",
        "ipad",
    ],
    minimum_os_version = "9.0",
    infoplists = [":UrlGet/UrlGet-Info.plist"],
    visibility = ["//visibility:public"],
    deps = [":UrlGetClasses"],
)

               

Build app by:

 bazel build //ios-app:ios-app

 It make logs:

 The output here:

 bazel-out/applebin_ios-ios_x86_64-fastbuild-ST-e637a0adc749/bin/ios-app/ios-app.ipa

 

Code Toàn Bug

Code nhiều bug nhiều!

Leave a Reply

Your email address will not be published.