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(
"@rules_xcodeproj//xcodeproj:defs.bzl",
"top_level_target",
"top_level_targets",
"xcodeproj",
"xcode_provisioning_profile",
)
load("@build_bazel_rules_apple//apple:apple.bzl", "local_provisioning_profile")
load(
"@build_configuration//:variables.bzl",
"telegram_bazel_path",
)
filegroup(
name = "AppResources",
srcs = glob([
"Resources/**/*",
], exclude = ["Resources/**/.*"]),
)
swift_library(
name = "Lib",
srcs = glob([
"Sources/**/*.swift",
]),
data = [
":AppResources",
],
deps = [
"//submodules/Display",
"//submodules/MetalEngine",
"//submodules/TelegramPresentationData",
"//submodules/TelegramUI/Components/Calls/CallScreen",
],
)
plist_fragment(
name = "BuildNumberInfoPlist",
extension = "plist",
template =
"""
CFBundleVersion
1
"""
)
plist_fragment(
name = "VersionInfoPlist",
extension = "plist",
template =
"""
CFBundleShortVersionString
1.0
"""
)
plist_fragment(
name = "AppNameInfoPlist",
extension = "plist",
template =
"""
CFBundleDisplayName
Test
"""
)
plist_fragment(
name = "AppInfoPlist",
extension = "plist",
template =
"""
CFBundleAllowMixedLocalizations
CFBundleDevelopmentRegion
en
CFBundleDisplayName
Test
CFBundleIdentifier
org.telegram.Telegram-iOS
CFBundleName
Telegram
CFBundlePackageType
APPL
CFBundleSignature
????
ITSAppUsesNonExemptEncryption
LSRequiresIPhoneOS
NSAppTransportSecurity
NSAllowsArbitraryLoads
UIDeviceFamily
1
2
UIFileSharingEnabled
UILaunchStoryboardName
LaunchScreen
UIRequiredDeviceCapabilities
armv7
UIStatusBarStyle
UIStatusBarStyleDefault
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UIViewControllerBasedStatusBarAppearance
UIViewEdgeAntialiasing
UIViewGroupOpacity
CADisableMinimumFrameDurationOnPhone
"""
)
ios_application(
name = "CallUITest",
bundle_id = "org.telegram.Telegram-iOS",
families = ["iphone", "ipad"],
minimum_os_version = "12.0",
provisioning_profile = "@build_configuration//provisioning:Telegram.mobileprovision",
infoplists = [
":AppInfoPlist",
":BuildNumberInfoPlist",
":VersionInfoPlist",
],
resources = [
"//Tests/Common:LaunchScreen",
],
frameworks = [
],
deps = [
"//Tests/Common:Main",
":Lib",
],
visibility = ["//visibility:public"],
)
xcodeproj(
name = "CallUITest_xcodeproj",
build_mode = "bazel",
bazel_path = telegram_bazel_path,
project_name = "CallUITest",
tags = ["manual"],
top_level_targets = top_level_targets(
labels = [
":CallUITest",
],
target_environments = ["device", "simulator"],
),
xcode_configurations = {
"Debug": {
"//command_line_option:compilation_mode": "dbg",
},
"Release": {
"//command_line_option:compilation_mode": "opt",
},
},
default_xcode_configuration = "Debug"
)