load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application", "ios_extension", "ios_framework", ) load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library", ) load("//build-system/bazel-utils:plist_fragment.bzl", "plist_fragment", ) load( "//build-input/data:variables.bzl", "wallet_build_number", "wallet_version", "wallet_bundle_id", "wallet_team_id", ) config_setting( name = "debug", values = { "compilation_mode": "dbg", }, ) genrule( name = "empty", outs = ["empty.swift"], cmd = "touch $(OUTS)", ) swift_library( name = "_LocalDebugOptions", srcs = [":empty"], copts = [ "-Xfrontend", "-serialize-debugging-options", ], deps = [ ], module_name = "_LocalDebugOptions", tags = ["no-remote"], visibility = ["//visibility:public"], ) debug_deps = select({ ":debug": [":_LocalDebugOptions"], "//conditions:default": [], }) plist_fragment( name = "WalletInfoPlist", extension = "plist", template = """ CFBundleShortVersionString {wallet_version} CFBundleVersion {wallet_build_number} CFBundleAllowMixedLocalizations CFBundleDevelopmentRegion en CFBundleDisplayName TON Wallet CFBundleIdentifier {wallet_bundle_id} CFBundleName TON Wallet CFBundlePackageType APPL ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS NSAppTransportSecurity NSAllowsArbitraryLoads NSCameraUsageDescription Please allow TON Wallet access to your camera for scanning QR codes. NSFaceIDUsageDescription For better security, please allow TON Wallet to use your Face ID to authenticate payments. NSPhotoLibraryUsageDescription Please allow TON Wallet access to your Photo Stream in case you need to scan a QR code from a picture. UIDeviceFamily 1 2 UIFileSharingEnabled UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities armv7 UIRequiresPersistentWiFi UIStatusBarStyle UIStatusBarStyleLightContent UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIViewControllerBasedStatusBarAppearance UIViewEdgeAntialiasing UIViewGroupOpacity """.format( wallet_version = wallet_version, wallet_build_number = wallet_build_number, wallet_bundle_id = wallet_bundle_id, ) ) filegroup( name = "Strings", srcs = glob([ "Strings/**/*", ], exclude = ["Strings/**/.*"]), ) filegroup( name = "Icons", srcs = glob([ "Icons.xcassets/**/*", ], exclude = ["Icons.xcassets/**/.*"]), ) objc_library( name = "Main", srcs = [ "Sources/main.m" ], ) swift_library( name = "Lib", srcs = glob([ "Sources/**/*.swift", ]), data = [ ], deps = [ "//submodules/WalletUI:WalletUI", "//submodules/WalletCore:WalletCore", "//submodules/BuildConfig:BuildConfig", "//submodules/OverlayStatusController:OverlayStatusController", ], ) ios_application( name = "Wallet", bundle_id = wallet_bundle_id, families = ["iphone", "ipad"], minimum_os_version = "9.0", provisioning_profile = "//build-input/data/provisioning-profiles:Wallet.mobileprovision", infoplists = [ ":WalletInfoPlist.plist", ], app_icons = [ ":Icons", ], launch_storyboard = "LaunchScreen.xib", strings = [ ":Strings", ], deps = [ ":Main", ":Lib", ], )