load("@build_bazel_rules_apple//apple:ios.bzl",
"ios_application",
)
load("@build_bazel_rules_swift//swift:swift.bzl",
"swift_library",
)
load("//build-system/bazel-utils:plist_fragment.bzl",
"plist_fragment",
)
load(
"@build_configuration//:variables.bzl",
"telegram_bundle_id",
"telegram_aps_environment",
"telegram_team_id",
"telegram_enable_icloud",
"telegram_enable_siri",
"telegram_enable_watch",
)
module_name = "TelegramCoreBuildTest"
swift_library(
name = "Lib",
srcs = glob([
"Sources/**/*.swift",
]),
data = [
],
deps = [
],
)
plist_fragment(
name = "BuildNumberInfoPlist",
extension = "plist",
template =
"""
CFBundleVersion
1
"""
)
plist_fragment(
name = "VersionInfoPlist",
extension = "plist",
template =
"""
CFBundleShortVersionString
{telegramVersion}
"""
)
plist_fragment(
name = "AppNameInfoPlist",
extension = "plist",
template =
"""
CFBundleDisplayName
Test
"""
)
plist_fragment(
name = "AppInfoPlist",
extension = "plist",
template =
"""
CFBundleAllowMixedLocalizations
CFBundleDevelopmentRegion
en
CFBundleDisplayName
Test
CFBundleIdentifier
ph.telegra.Telegraph
CFBundleName
Telegram
CFBundlePackageType
APPL
CFBundleSignature
????
ITSAppUsesNonExemptEncryption
LSRequiresIPhoneOS
NSAppTransportSecurity
NSAllowsArbitraryLoads
UIDeviceFamily
1
2
UIFileSharingEnabled
UILaunchStoryboardName
LaunchScreen
UIRequiredDeviceCapabilities
arm64
UIStatusBarStyle
UIStatusBarStyleDefault
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UIViewControllerBasedStatusBarAppearance
UIViewEdgeAntialiasing
UIViewGroupOpacity
CADisableMinimumFrameDurationOnPhone
""".format(module_name=module_name)
)
ios_application(
name = module_name,
bundle_id = "ph.telegra.Telegraph",
families = ["iphone", "ipad"],
minimum_os_version = "11.0",
provisioning_profile = None,
infoplists = [
":AppInfoPlist",
":BuildNumberInfoPlist",
":VersionInfoPlist",
],
resources = [
"//Tests/Common:LaunchScreen",
],
extensions = [
"//Telegram:WidgetExtension",
],
deps = [
"//Tests/Common:Main",
":Lib",
],
visibility = ["//visibility:public"],
)