mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Integrate AppCenter for internal builds
This commit is contained in:
parent
3851ac14ba
commit
04c6b6d7cf
@ -56,3 +56,10 @@ http_file(
|
|||||||
urls = ["https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-macos-universal.tar.gz"],
|
urls = ["https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-macos-universal.tar.gz"],
|
||||||
sha256 = "50afa2cb66bea6a0314ef28034f3ff1647325e30cf5940f97906a56fd9640bd8",
|
sha256 = "50afa2cb66bea6a0314ef28034f3ff1647325e30cf5940f97906a56fd9640bd8",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
http_archive(
|
||||||
|
name = "appcenter_sdk",
|
||||||
|
urls = ["https://github.com/microsoft/appcenter-sdk-apple/releases/download/4.1.1/AppCenter-SDK-Apple-4.1.1.zip"],
|
||||||
|
sha256 = "032907801dc7784744a1ca8fd40d3eecc34a2e27a93a4b3993f617cca204a9f3",
|
||||||
|
build_file = "@//third-party/AppCenter:AppCenter.BUILD",
|
||||||
|
)
|
||||||
|
@ -15,6 +15,11 @@ filegroup(
|
|||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
appcenter_targets = [
|
||||||
|
"@appcenter_sdk//:AppCenter",
|
||||||
|
"@appcenter_sdk//:AppCenterCrashes",
|
||||||
|
]
|
||||||
|
|
||||||
swift_library(
|
swift_library(
|
||||||
name = "TelegramUI",
|
name = "TelegramUI",
|
||||||
module_name = "TelegramUI",
|
module_name = "TelegramUI",
|
||||||
@ -223,7 +228,12 @@ swift_library(
|
|||||||
"//submodules/ImportStickerPackUI:ImportStickerPackUI",
|
"//submodules/ImportStickerPackUI:ImportStickerPackUI",
|
||||||
"//submodules/GradientBackground:GradientBackground",
|
"//submodules/GradientBackground:GradientBackground",
|
||||||
"//submodules/WallpaperBackgroundNode:WallpaperBackgroundNode",
|
"//submodules/WallpaperBackgroundNode:WallpaperBackgroundNode",
|
||||||
],
|
] + select({
|
||||||
|
"@build_bazel_rules_apple//apple:ios_armv7": [],
|
||||||
|
"@build_bazel_rules_apple//apple:ios_arm64": appcenter_targets,
|
||||||
|
"//build-system:ios_sim_arm64": [],
|
||||||
|
"@build_bazel_rules_apple//apple:ios_x86_64": [],
|
||||||
|
}),
|
||||||
visibility = [
|
visibility = [
|
||||||
"//visibility:public",
|
"//visibility:public",
|
||||||
],
|
],
|
||||||
|
@ -34,9 +34,11 @@ import CoreSpotlight
|
|||||||
import LightweightAccountData
|
import LightweightAccountData
|
||||||
import TelegramAudio
|
import TelegramAudio
|
||||||
import DebugSettingsUI
|
import DebugSettingsUI
|
||||||
|
|
||||||
#if canImport(BackgroundTasks)
|
|
||||||
import BackgroundTasks
|
import BackgroundTasks
|
||||||
|
|
||||||
|
#if os(iOS)
|
||||||
|
import AppCenter
|
||||||
|
import AppCenterCrashes
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private let handleVoipNotifications = false
|
private let handleVoipNotifications = false
|
||||||
@ -486,14 +488,7 @@ final class SharedApplicationContext {
|
|||||||
telegramUIDeclareEncodables()
|
telegramUIDeclareEncodables()
|
||||||
|
|
||||||
GlobalExperimentalSettings.isAppStoreBuild = buildConfig.isAppStoreBuild
|
GlobalExperimentalSettings.isAppStoreBuild = buildConfig.isAppStoreBuild
|
||||||
|
|
||||||
GlobalExperimentalSettings.enableFeed = false
|
GlobalExperimentalSettings.enableFeed = false
|
||||||
#if DEBUG
|
|
||||||
//GlobalExperimentalSettings.enableFeed = true
|
|
||||||
#if targetEnvironment(simulator)
|
|
||||||
//GlobalTelegramCoreConfiguration.readMessages = false
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
self.window?.makeKeyAndVisible()
|
self.window?.makeKeyAndVisible()
|
||||||
|
|
||||||
@ -1335,6 +1330,14 @@ final class SharedApplicationContext {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
self.maybeCheckForUpdates()
|
self.maybeCheckForUpdates()
|
||||||
|
|
||||||
|
#if os(iOS)
|
||||||
|
if !buildConfig.isAppStoreBuild, let appCenterId = buildConfig.appCenterId, !appCenterId.isEmpty {
|
||||||
|
AppCenter.start(withAppSecret: buildConfig.appCenterId, services: [
|
||||||
|
Crashes.self
|
||||||
|
])
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
15
third-party/AppCenter/AppCenter.BUILD
vendored
Normal file
15
third-party/AppCenter/AppCenter.BUILD
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
load("@build_bazel_rules_apple//apple:apple.bzl",
|
||||||
|
"apple_static_framework_import",
|
||||||
|
)
|
||||||
|
|
||||||
|
apple_static_framework_import(
|
||||||
|
name = "AppCenter",
|
||||||
|
framework_imports = glob(["AppCenter-SDK-Apple/iOS/AppCenter.framework/**"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
apple_static_framework_import(
|
||||||
|
name = "AppCenterCrashes",
|
||||||
|
framework_imports = glob(["AppCenter-SDK-Apple/iOS/AppCenterCrashes.framework/**"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
0
third-party/AppCenter/BUILD
vendored
Normal file
0
third-party/AppCenter/BUILD
vendored
Normal file
Loading…
x
Reference in New Issue
Block a user