diff --git a/.buckconfig b/.buckconfig
index 0323a3127b..1d8e0db3c0 100644
--- a/.buckconfig
+++ b/.buckconfig
@@ -1,14 +1,14 @@
[cxx]
- default_platform = iphoneos-armv7
- cflags = -fmodules -fobjc-arc -D BUCK -D DEBUG -w -fno-optimize-sibling-calls $(config custom.other_cflags)
- cxxflags = -fobjc-arc -std=c++14 -D BUCK -D DEBUG -w -fno-optimize-sibling-calls $(config custom.other_cxxflags)
+ default_platform = iphonesimulator-x86_64
+ cflags = -g -fmodules -fobjc-arc -D BUCK -DTARGET_OS_IOS=1 -g -w $(config custom.other_cflags)
+ cxxflags = -fobjc-arc -std=c++14 -D BUCK -DTARGET_OS_IOS=1 -g $(config custom.other_cxxflags)
combined_preprocess_and_compile = true
pch_enabled = false
- ldflags = -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -dead_strip -Xlinker -no_deduplicate $(config custom.other_cxxflags)
+ ldflags = -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime $(config custom.other_cxxflags)
[swift]
version = 5
- compiler_flags = -DBUCK -enable-testing -O -whole-module-optimization -suppress-warnings -Xcc -fno-optimize-sibling-calls $(config custom.other_swift_compiler_flags)
+ compiler_flags = -g -DBUCK $(config custom.optimization) $(config custom.config_swift_compiler_flags) $(config custom.other_swift_compiler_flags)
use_filelist = true
[apple]
@@ -19,8 +19,7 @@
iphoneos_target_sdk_version = 8.0
provisioning_profile_read_command = security cms -Di
xctool_default_destination_specifier = platform=iOS Simulator,OS=latest
- ;provisioning_profile_search_path = ./
- ;xctool_path = tools/xctool/bin/xctool
+ xctool_path = tools/xctool/bin/xctool
[parser]
polyglot_parsing_enabled = true
@@ -33,6 +32,4 @@
allow_symlinks = forbid
ignore = tools, \
.git, \
-
-[build]
- thread_core_ratio = 2.0
+
\ No newline at end of file
diff --git a/BUCK b/BUCK
index b1443dbcae..555f98f385 100644
--- a/BUCK
+++ b/BUCK
@@ -1,182 +1,499 @@
-load('//tools:buck_utils.bzl', 'config_with_updated_linker_flags', 'configs_with_config', 'combined_config')
-load('//tools:buck_defs.bzl', 'SHARED_CONFIGS')
+load("//Config:configs.bzl",
+ "app_binary_configs",
+ "share_extension_configs",
+ "widget_extension_configs",
+ "notification_content_extension_configs",
+ "notification_service_extension_configs",
+ "intents_extension_configs",
+ "watch_extension_binary_configs",
+ "watch_binary_configs",
+ "library_configs",
+ "info_plist_substitutions",
+ "app_info_plist_substitutions",
+ "share_extension_info_plist_substitutions",
+ "widget_extension_info_plist_substitutions",
+ "notification_content_extension_info_plist_substitutions",
+ "notification_service_extension_info_plist_substitutions",
+ "intents_extension_info_plist_substitutions",
+ "watch_extension_info_plist_substitutions",
+ "watch_info_plist_substitutions",
+ "DEVELOPMENT_LANGUAGE",
+)
-# Adding `-all_load` to our binaries works around https://bugs.swift.org/browse/SR-6004. See the
-# longer comment in `ViewController.swift` for more details.
-ALL_LOAD_LINKER_FLAG = '-all_load'
+load("//Config:buck_rule_macros.bzl",
+ "apple_lib",
+ "framework_binary_dependencies",
+ "framework_bundle_dependencies",
+ "glob_map",
+ "glob_sub_map",
+ "merge_maps",
+)
-BUILD_NUMBER = '2001'
+framework_dependencies = [
+ "//submodules/MtProtoKit:MtProtoKit",
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/Postbox:Postbox",
+ "//submodules/TelegramCore:TelegramCore",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/Display:Display",
+ "//submodules/TelegramUI:TelegramUI",
+]
-APP_CONFIGS = {
- 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES': 'YES',
- 'DEVELOPMENT_LANGUAGE': 'Swift',
- 'PRODUCT_BUNDLE_IDENTIFIER': 'ph.telegra.Telegraph',
- 'PROVISIONING_PROFILE_SPECIFIER': 'match Development ph.telegra.Telegraph',
- 'TARGETED_DEVICE_FAMILY': '1,2',
- 'APP_NAME': 'Telegram',
- 'BUILD_NUMBER': BUILD_NUMBER,
- 'CODE_SIGN_ENTITLEMENTS': 'Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements',
-}
-APP_CONFIGS.update(SHARED_CONFIGS)
+resource_dependencies = [
+ "//submodules/LegacyComponents:LegacyComponentsResources",
+ "//submodules/TelegramUI:TelegramUIAssets",
+ "//submodules/TelegramUI:TelegramUIResources",
+ "//:AppResources",
+ "//:AppStringResources",
+ "//:AppIntentVocabularyResources",
+ "//:Icons",
+ "//:AdditionalIcons",
+ "//:LaunchScreen",
+]
+
+build_phase_scripts = [
+]
apple_resource(
- name = 'LaunchScreenXib',
- files = [
- 'Telegram-iOS/Base.lproj/LaunchScreen.xib',
- ],
+ name = "AppResources",
+ files = glob([
+ "Telegram-iOS/Resources/**/*",
+ ], exclude = ["Telegram-iOS/Resources/**/.*"]),
+ visibility = ["PUBLIC"],
)
apple_resource(
- name = "StringResources",
+ name = "AppStringResources",
files = [],
variants = glob([
"Telegram-iOS/*.lproj/Localizable.strings",
]),
+ visibility = ["PUBLIC"],
)
apple_resource(
- name = "InfoPlistStringResources",
- files = [],
- variants = glob([
- "Telegram-iOS/*.lproj/InfoPlist.strings",
- ]),
-)
-
-apple_resource(
- name = "AppIntentVocabularyStringResources",
+ name = "AppIntentVocabularyResources",
files = [],
variants = glob([
"Telegram-iOS/*.lproj/AppIntentVocabulary.plist",
]),
+ visibility = ["PUBLIC"],
)
apple_asset_catalog(
- name = 'Images',
- dirs = [
- 'Telegram-iOS/Images.xcassets',
+ name = "Icons",
+ dirs = [
+ "Telegram-iOS/Icons.xcassets",
+ "Telegram-iOS/AppIcons.xcassets",
+ ],
+ app_icon = "AppIconLLC",
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "AdditionalIcons",
+ files = glob([
+ "Telegram-iOS/*.png",
+ ]),
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "LaunchScreen",
+ files = [
+ "Telegram-iOS/Base.lproj/LaunchScreen.xib",
],
- app_icon = 'AppIconLLC',
+ visibility = ["PUBLIC"],
)
apple_library(
- name = 'BuildConfig',
- srcs = glob([
- 'Telegram-iOS/BuildConfig.m',
- ]),
- headers = [
- 'Telegram-iOS/BuildConfig.h',
+ name = "AppLibrary",
+ visibility = [
+ "//:",
+ "//...",
],
- compiler_flags = [
- '-w',
- '-DAPP_CONFIG_IS_INTERNAL_BUILD=false',
- '-DAPP_CONFIG_IS_APPSTORE_BUILD=true',
- '-DAPP_CONFIG_APPSTORE_ID=686449807',
- '-DAPP_SPECIFIC_URL_SCHEME=\"tgapp\"',
- '-DAPP_CONFIG_API_ID=8',
- '-DAPP_CONFIG_API_HASH=\"7245de8e747a0d6fbe11f7cc14fcc0bb\"',
- '-DAPP_CONFIG_HOCKEYAPP_ID=\"ad8831329ffc8f8aff9a2b0b86558b24\"',
+ configs = library_configs(),
+ swift_version = native.read_config("swift", "version"),
+ srcs = [
+ "Telegram-iOS/main.m",
+ "Telegram-iOS/Application.swift"
],
- header_namespace = 'BuildConfig',
- exported_headers = [
- 'Telegram-iOS/BuildConfig.h',
- ],
- modular = True,
- visibility = ['PUBLIC'],
deps = [
- '//submodules/MtProtoKit:MtProtoKit',
- ],
-)
-
-apple_library(
- name = 'AppBinaryPrivate',
- srcs = glob([
- 'Telegram-iOS/TGBridgeServer.m',
- 'Telegram-iOS/TGAutoDownloadPreferences.m',
- 'Telegram-iOS/TGPresentationAutoNightPreferences.m',
- 'Telegram-iOS/TGProxyItem.m',
- 'Telegram-iOS/UIImage+ImageEffects.m',
- ]),
- headers = [
- ],
- header_namespace = 'AppBinaryPrivate',
- exported_headers = [
- 'Telegram-iOS/TGBridgeServer.h',
- 'Telegram-iOS/TGAutoDownloadPreferences.h',
- 'Telegram-iOS/TGPresentationAutoNightPreferences.h',
- 'Telegram-iOS/TGProxyItem.h',
- 'Telegram-iOS/UIImage+ImageEffects.h',
- ],
- modular = True,
- visibility = ['PUBLIC'],
- deps = [
- '//submodules/SSignalKit:SSignalKit',
- '//Watch:WatchUtils',
- '//submodules/LegacyComponents:LegacyComponents',
- ],
+ ]
+ + framework_binary_dependencies(framework_dependencies),
)
apple_binary(
- name = 'AppBinary',
- configs = configs_with_config(config_with_updated_linker_flags(APP_CONFIGS, ALL_LOAD_LINKER_FLAG)),
- #srcs = glob([
- # 'Telegram-iOS/*.swift',
- #]) + [
- # 'Telegram-iOS/main.m',
- #],
- srcs = ['Telegram-iOS/TempMain.m'],
- entitlements_file = 'Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements',
- deps = [
- ':LaunchScreenXib',
- ':StringResources',
- ':InfoPlistStringResources',
- ':AppIntentVocabularyStringResources',
- ':Images',
- #'//submodules/AsyncDisplayKit:AsyncDisplayKit',
- #'//submodules/MtProtoKit:MtProtoKit',
- #'//submodules/SSignalKit:SwiftSignalKit',
- #'//submodules/SSignalKit:SSignalKit',
- #'//submodules/Display:Display',
- #'//submodules/Postbox:Postbox',
- #'//submodules/TelegramCore:TelegramCore',
- #'//submodules/LegacyComponents:LegacyComponents',
- #'//submodules/HockeySDK-iOS:HockeySDK',
- #'//submodules/lottie-ios:Lottie',
- '//submodules/libtgvoip:tgvoip',
- #'//submodules/webp:WebPImage',
- #'//submodules/ffmpeg:FFMpeg',
- #'//submodules/TelegramUI:TelegramUI',
- '//submodules/TelegramUI:TelegramUIFramework',
- #'//Watch:WatchUtils',
- ':BuildConfig',
- ':AppBinaryPrivate',
+ name = "AppBinary",
+ visibility = [
+ "//:",
+ "//...",
],
+ configs = app_binary_configs(),
+ swift_version = native.read_config("swift", "version"),
+ srcs = [
+ "SupportFiles/Empty.swift",
+ ],
+ deps = [
+ ":AppLibrary",
+ ]
+ + resource_dependencies,
+)
+
+apple_bundle(
+ name = "Telegram",
+ visibility = [
+ "//:",
+ ],
+ extension = "app",
+ binary = ":AppBinary",
+ product_name = "Telegram",
+ info_plist = "Telegram-iOS/Info.plist",
+ info_plist_substitutions = app_info_plist_substitutions(),
+ deps = [
+ ":ShareExtension",
+ ":WidgetExtension",
+ ":NotificationContentExtension",
+ ":NotificationServiceExtension",
+ ":IntentsExtension",
+ ":WatchApp#watch",
+ ]
+ + framework_bundle_dependencies(framework_dependencies),
+)
+
+# Share Extension
+
+apple_binary(
+ name = "ShareBinary",
+ srcs = glob([
+ "Share/**/*.swift",
+ ]),
+ configs = share_extension_configs(),
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/TelegramUI:TelegramUI#shared",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UIKit.framework",
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ ],
+)
+
+apple_bundle(
+ name = "ShareExtension",
+ binary = ":ShareBinary",
+ extension = "appex",
+ info_plist = "Share/Info.plist",
+ info_plist_substitutions = share_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+# Widget
+
+apple_binary(
+ name = "WidgetBinary",
+ srcs = glob([
+ "Widget/**/*.swift",
+ ]),
+ configs = widget_extension_configs(),
+ swift_compiler_flags = [
+ "-application-extension",
+ ],
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
+ "//submodules/TelegramCore:TelegramCore#shared",
+ "//submodules/Postbox:Postbox#shared",
+ "//submodules/BuildConfig:BuildConfig",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UIKit.framework",
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ "$SDKROOT/System/Library/Frameworks/NotificationCenter.framework",
+ ],
+)
+
+apple_bundle(
+ name = "WidgetExtension",
+ binary = ":WidgetBinary",
+ extension = "appex",
+ info_plist = "Widget/Info.plist",
+ info_plist_substitutions = widget_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+# Notification Content
+
+apple_binary(
+ name = "NotificationContentBinary",
+ srcs = glob([
+ "NotificationContent/**/*.swift",
+ ]),
+ configs = notification_content_extension_configs(),
+ swift_compiler_flags = [
+ "-application-extension",
+ ],
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/TelegramUI:TelegramUI#shared",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UIKit.framework",
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ "$SDKROOT/System/Library/Frameworks/UserNotificationsUI.framework",
+ ],
+)
+
+apple_bundle(
+ name = "NotificationContentExtension",
+ binary = ":NotificationContentBinary",
+ extension = "appex",
+ info_plist = "NotificationContent/Info.plist",
+ info_plist_substitutions = notification_content_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+#Notification Service
+
+apple_binary(
+ name = "NotificationServiceBinary",
+ srcs = glob([
+ "NotificationService/**/*.m",
+ ]),
+ headers = glob([
+ "NotificationService/**/*.h",
+ ]),
+ configs = notification_service_extension_configs(),
+ swift_compiler_flags = [
+ "-application-extension",
+ ],
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/BuildConfig:BuildConfig",
+ "//submodules/MtProtoKit:MtProtoKit#shared",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ "$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
+ ],
+)
+
+apple_bundle(
+ name = "NotificationServiceExtension",
+ binary = ":NotificationServiceBinary",
+ extension = "appex",
+ info_plist = "NotificationService/Info.plist",
+ info_plist_substitutions = notification_service_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+# Intents
+
+apple_binary(
+ name = "IntentsBinary",
+ srcs = glob([
+ "SiriIntents/**/*.swift",
+ ]),
+ configs = intents_extension_configs(),
+ swift_compiler_flags = [
+ "-application-extension",
+ ],
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
+ "//submodules/Postbox:Postbox#shared",
+ "//submodules/TelegramCore:TelegramCore#shared",
+ "//submodules/BuildConfig:BuildConfig",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UIKit.framework",
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ ],
+)
+
+apple_bundle(
+ name = "IntentsExtension",
+ binary = ":IntentsBinary",
+ extension = "appex",
+ info_plist = "SiriIntents/Info.plist",
+ info_plist_substitutions = intents_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+# Watch
+
+apple_binary(
+ name = "WatchAppExtensionBinary",
+ srcs = glob([
+ "Watch/Extension/**/*.m",
+ "Watch/SSignalKit/**/*.m",
+ "Watch/Bridge/**/*.m",
+ "Watch/WatchCommonWatch/**/*.m",
+ ]),
+ headers = merge_maps([
+ glob_map(glob([
+ "Watch/Extension/*.h",
+ "Watch/Bridge/*.h",
+ ])),
+ glob_sub_map("Watch/Extension/", glob([
+ "Watch/Extension/SSignalKit/*.h",
+ ])),
+ glob_sub_map("Watch/", glob([
+ "Watch/WatchCommonWatch/*.h",
+ ])),
+ ]),
+ compiler_flags = [
+ "-DTARGET_OS_WATCH=1",
+ ],
+ configs = watch_extension_binary_configs(),
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
+ "$SDKROOT/System/Library/Frameworks/CoreLocation.framework",
+ "$SDKROOT/System/Library/Frameworks/CoreGraphics.framework",
+ ],
+)
+
+apple_bundle(
+ name = "WatchAppExtension",
+ binary = ":WatchAppExtensionBinary",
+ extension = "appex",
+ info_plist = "Watch/Extension/Info.plist",
+ info_plist_substitutions = watch_extension_info_plist_substitutions(),
+ xcode_product_type = "com.apple.product-type.watchkit2-extension",
+)
+
+apple_resource(
+ name = "WatchAppResources",
+ dirs = [],
+ files = glob(["Watch/Extension/Resources/*.png"])
+)
+
+apple_asset_catalog(
+ name = "WatchAppAssets",
+ dirs = [
+ "Watch/App/Assets.xcassets",
+ ],
+ app_icon = "AppIcon",
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "WatchAppInterface",
+ files = [
+ "Watch/App/Base.lproj/Interface.storyboard",
+ ],
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "WatchAppStringResources",
+ files = [],
+ variants = glob([
+ "Telegram-iOS/*.lproj/Localizable.strings",
+ ]),
+ visibility = ["PUBLIC"],
+)
+
+apple_binary(
+ name = "WatchAppBinary",
+ configs = watch_binary_configs(),
+ deps = [
+ ":WatchAppResources",
+ ":WatchAppAssets",
+ ":WatchAppInterface",
+ ":WatchAppStringResources",
+ ],
+)
+
+apple_bundle(
+ name = "WatchApp",
+ binary = ":WatchAppBinary",
+ visibility = [
+ "//:",
+ ],
+ extension = "app",
+ info_plist = "Watch/App/Info.plist",
+ info_plist_substitutions = watch_info_plist_substitutions(),
+ xcode_product_type = "com.apple.product-type.application.watchapp2",
+ deps = [
+ ":WatchAppExtension",
+ ],
+)
+
+# Package
+
+apple_package(
+ name = "AppPackage",
+ bundle = ":Telegram",
)
xcode_workspace_config(
name = "workspace",
- workspace_name = "Telegram",
- src_target = ":AppBinary",
-)
-
-apple_bundle(
- name = 'AppBundle',
- extension = 'app',
- binary = ':AppBinary',
- product_name = 'Telegram',
- info_plist = 'Telegram-iOS/Info.plist',
- info_plist_substitutions = {
- 'DEVELOPMENT_LANGUAGE': 'en-us',
- 'APP_NAME': 'Telegram',
- 'EXECUTABLE_NAME': 'Telegram',
- 'PRODUCT_BUNDLE_IDENTIFIER': 'ph.telegra.Telegraph',
- 'PRODUCT_NAME': 'Telegram',
- 'APP_SPECIFIC_URL_SCHEME': 'tgapp',
- 'VERSION': '5.8',
- 'BUILD_NUMBER': BUILD_NUMBER,
- },
-)
-
-apple_package(
- name = 'AppPackage',
- bundle = ':AppBundle',
-)
+ workspace_name = "Telegram_Buck",
+ src_target = ":Telegram",
+)
\ No newline at end of file
diff --git a/Config/BUCK b/Config/BUCK
new file mode 100644
index 0000000000..babd7d22cd
--- /dev/null
+++ b/Config/BUCK
@@ -0,0 +1,10 @@
+# This file can be depended upon for any apple_test_lib rules.
+genrule(
+ name = "test_info_plist",
+ visibility = ["PUBLIC"],
+ srcs = [
+ "BuckSupportFiles/TestInfo.plist",
+ ],
+ out = 'TestInfo.plist',
+ cmd = 'cp $SRCDIR/BuckSupportFiles/TestInfo.plist $OUT',
+)
diff --git a/Config/BuckSupportFiles/TestInfo.plist b/Config/BuckSupportFiles/TestInfo.plist
new file mode 100644
index 0000000000..6c40a6cd0c
--- /dev/null
+++ b/Config/BuckSupportFiles/TestInfo.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+
+
diff --git a/Config/app_configuration.bzl b/Config/app_configuration.bzl
new file mode 100644
index 0000000000..dbc6f547a5
--- /dev/null
+++ b/Config/app_configuration.bzl
@@ -0,0 +1,20 @@
+
+def appConfig():
+ apiId = native.read_config("custom", "apiId")
+ apiHash = native.read_config("custom", "apiHash")
+ hockeyAppId = native.read_config("custom", "hockeyAppId")
+ isInternalBuild = native.read_config("custom", "isInternalBuild")
+ isAppStoreBuild = native.read_config("custom", "isAppStoreBuild")
+ appStoreId = native.read_config("custom", "appStoreId")
+ appSpecificUrlScheme = native.read_config("custom", "appSpecificUrlScheme")
+ buildNumber = native.read_config("custom", "buildNumber")
+ return {
+ "apiId": apiId,
+ "apiHash": apiHash,
+ "hockeyAppId": hockeyAppId,
+ "isInternalBuild": isInternalBuild,
+ "isAppStoreBuild": isAppStoreBuild,
+ "appStoreId": appStoreId,
+ "appSpecificUrlScheme": appSpecificUrlScheme,
+ "buildNumber": buildNumber,
+ }
diff --git a/Config/buck_rule_macros.bzl b/Config/buck_rule_macros.bzl
new file mode 100644
index 0000000000..c00d4a7bff
--- /dev/null
+++ b/Config/buck_rule_macros.bzl
@@ -0,0 +1,282 @@
+load("//Config:configs.bzl", "library_configs", "dynamic_library_configs", "info_plist_substitutions")
+
+def apple_lib(
+ name,
+ visibility = ["PUBLIC"],
+ srcs = [],
+ headers = [],
+ exported_headers = [],
+ extra_xcode_files = [],
+ deps = [],
+ exported_deps = [],
+ additional_linker_flags = None,
+ frameworks = [],
+ swift_version = None,
+ modular = True,
+ compiler_flags = None,
+ platform_compiler_flags = None,
+ swift_compiler_flags = None,
+ warning_as_error = False,
+ suppress_warnings = False,
+ has_cpp = False,
+ framework = False):
+ swift_version = swift_version or native.read_config('swift', 'version')
+ swift_compiler_flags = swift_compiler_flags or []
+
+ if native.read_config("xcode", "beta") == "True":
+ warning_as_error = False
+
+ if platform_compiler_flags != None:
+ if compiler_flags != None:
+ fail("compiler_flags and platform_compiler_flags are mutually exclusive")
+ compiler_flags = []
+ for i in range(len(platform_compiler_flags)):
+ if warning_as_error:
+ platform_compiler_flags[i][1].append("-Werror")
+ elif suppress_warnings:
+ platform_compiler_flags[i][1].append("-w")
+ else:
+ compiler_flags = compiler_flags or []
+ if warning_as_error:
+ compiler_flags.append("-Werror")
+ elif suppress_warnings:
+ compiler_flags.append("-w")
+
+ if warning_as_error:
+ swift_compiler_flags.append("-warnings-as-errors")
+ elif suppress_warnings:
+ swift_compiler_flags.append("-suppress-warnings")
+
+ if framework:
+ additional_linker_flags = additional_linker_flags or []
+ if has_cpp:
+ linker_flags = [
+ "-lc++",
+ "-lz"
+ ]
+ else:
+ linker_flags = []
+
+ if native.read_config("custom", "mode") == "project":
+ resolved_linker_flags = linker_flags + additional_linker_flags + ["-Wl,-install_name,@rpath/lib%s.dylib" % (name)]
+ else:
+ resolved_linker_flags = linker_flags + additional_linker_flags + ["-Wl,-install_name,@rpath/%s.framework/%s" % (name, name)]
+ native.apple_library(
+ name = name + "",
+ srcs = srcs,
+ header_namespace = name,
+ module_name = name,
+ soname = "lib" + name + ".dylib",
+ headers = headers,
+ exported_headers = exported_headers,
+ deps = deps,
+ exported_deps = exported_deps,
+ extra_xcode_files = extra_xcode_files,
+ frameworks = frameworks,
+ visibility = visibility,
+ swift_version = swift_version,
+ configs = dynamic_library_configs(),
+ modular = modular,
+ compiler_flags = compiler_flags,
+ platform_compiler_flags = platform_compiler_flags,
+ swift_compiler_flags = swift_compiler_flags,
+ preferred_linkage = "shared",
+ #link_style = "static",
+ linker_flags = resolved_linker_flags,
+ )
+ else:
+ additional_linker_flags = additional_linker_flags or []
+ if has_cpp:
+ linker_flags = [
+ "-lc++",
+ "-lz"
+ ]
+ else:
+ linker_flags = []
+
+ resolved_exported_linker_flags = linker_flags + additional_linker_flags
+ native.apple_library(
+ name = name,
+ srcs = srcs,
+ headers = headers,
+ exported_headers = exported_headers,
+ deps = deps,
+ exported_deps = exported_deps,
+ exported_linker_flags = resolved_exported_linker_flags,
+ extra_xcode_files = extra_xcode_files,
+ frameworks = frameworks,
+ visibility = visibility,
+ swift_version = swift_version,
+ configs = library_configs(),
+ modular = modular,
+ compiler_flags = compiler_flags,
+ platform_compiler_flags = platform_compiler_flags,
+ swift_compiler_flags = swift_compiler_flags,
+ preferred_linkage = "static",
+ )
+
+def static_library(
+ name,
+ visibility = ["PUBLIC"],
+ has_cpp = False,
+ srcs = [],
+ headers = [],
+ exported_headers = [],
+ extra_xcode_files = [],
+ deps = [],
+ additional_linker_flags = None,
+ frameworks = [],
+ info_plist = None,
+ info_plist_substitutions = {},
+ modular = True,
+ compiler_flags = None,
+ platform_compiler_flags = None,
+ swift_compiler_flags = None,
+ warning_as_error = False,
+ suppress_warnings = True):
+ apple_lib(
+ name = name,
+ srcs = srcs,
+ has_cpp = has_cpp,
+ exported_headers = exported_headers,
+ headers = headers,
+ modular = modular,
+ compiler_flags = compiler_flags,
+ platform_compiler_flags = platform_compiler_flags,
+ swift_compiler_flags = swift_compiler_flags,
+ extra_xcode_files = extra_xcode_files,
+ deps = deps,
+ additional_linker_flags = additional_linker_flags,
+ frameworks = frameworks,
+ warning_as_error = warning_as_error,
+ suppress_warnings = suppress_warnings
+ )
+
+def framework(
+ name,
+ visibility = ["PUBLIC"],
+ has_cpp = False,
+ srcs = [],
+ headers = [],
+ exported_headers = [],
+ extra_xcode_files = [],
+ deps = [],
+ exported_deps = [],
+ additional_linker_flags = None,
+ frameworks = [],
+ info_plist = None,
+ info_plist_substitutions = {},
+ modular = True,
+ compiler_flags = None,
+ platform_compiler_flags = None,
+ swift_compiler_flags = None,
+ warning_as_error = False,
+ suppress_warnings = True):
+ apple_lib(
+ name = name,
+ srcs = srcs,
+ has_cpp = has_cpp,
+ exported_headers = exported_headers,
+ headers = headers,
+ modular = modular,
+ compiler_flags = compiler_flags,
+ platform_compiler_flags = platform_compiler_flags,
+ swift_compiler_flags = swift_compiler_flags,
+ extra_xcode_files = extra_xcode_files,
+ deps = deps,
+ exported_deps = exported_deps,
+ additional_linker_flags = additional_linker_flags,
+ frameworks = frameworks,
+ warning_as_error = warning_as_error,
+ suppress_warnings = suppress_warnings,
+ framework = True
+ )
+
+
+CXX_SRC_EXT = ["mm", "cpp", "S"]
+def apple_cxx_lib(
+ srcs = [],
+ additional_exported_linker_flags = [],
+ **kwargs):
+ c_srcs, cxx_srcs = [], []
+
+ cxx_compile_flags = native.read_config("cxx", "cxxflags").split(" ")
+ cxx_compile_flags.append("-w")
+
+ for file_ in srcs:
+ if file_.split(".")[-1] in CXX_SRC_EXT:
+ cxx_srcs.append((file_, cxx_compile_flags))
+ else:
+ c_srcs.append(file_)
+ apple_lib(
+ srcs = c_srcs + cxx_srcs,
+ exported_linker_flags = [
+ "-lc++",
+ "-lz"
+ ] + additional_exported_linker_flags,
+ **kwargs
+ )
+
+def framework_binary_dependencies(names):
+ result = []
+ for name in names:
+ result.append(name + "#shared")
+ return result
+
+def framework_bundle_dependencies(names):
+ result = []
+ if native.read_config("custom", "mode") == "project":
+ for name in names:
+ pass
+ else:
+ for name in names:
+ result.append(name + "#shared")
+ return result
+
+def gen_header_targets(header_paths, prefix, flavor, source_rule, source_path):
+ result = dict()
+ for header_path in header_paths:
+ name = prefix + header_path.replace('/', '_sub_')
+ native.genrule(
+ name = name + flavor,
+ cmd = 'cp $(location :' + source_rule + ')/' + source_path + '/' + header_path + ' $OUT',
+ out = name,
+ )
+ result[header_path] = ':' + name + flavor
+ return result
+
+def merge_maps(dicts):
+ result = dict()
+ for d in dicts:
+ for key in d:
+ if key in result and result[key] != d[key]:
+ fail(
+ "Conflicting files in file search paths. " +
+ "\"%s\" maps to both \"%s\" and \"%s\"." %
+ (key, result[key], d[key]),
+ )
+ result.update(d)
+ return result
+
+def basename(p):
+ return p.rpartition("/")[-1]
+
+def glob_map(glob_results):
+ result = dict()
+ for path in glob_results:
+ file_name = basename(path)
+ if file_name in result:
+ fail('\"%s\" maps to both \"%s\" and \"%s\"' % (file_name, result[file_name], path))
+ result[file_name] = path
+ return result
+
+def glob_sub_map(prefix, glob_specs):
+ result = dict()
+ for path in native.glob(glob_specs):
+ if not path.startswith(prefix):
+ fail('\"%s\" does not start with \"%s\"' % (path, prefix))
+ file_key = path[len(prefix):]
+ if file_key in result:
+ fail('\"%s\" maps to both \"%s\" and \"%s\"' % (file_key, result[file_key], path))
+ result[file_key] = path
+ return result
diff --git a/Config/configs.bzl b/Config/configs.bzl
new file mode 100644
index 0000000000..5ef6de43d9
--- /dev/null
+++ b/Config/configs.bzl
@@ -0,0 +1,457 @@
+load("//Config:utils.bzl", "config_with_updated_linker_flags", "configs_with_config")
+load("//Config:app_configuration.bzl", "appConfig")
+
+DEVELOPMENT_LANGUAGE = "en"
+
+def merge_dict(a, b):
+ d = {}
+ d.update(a)
+ d.update(b)
+ return d
+
+def pretty(dict, current = ""):
+ current = "\n"
+ indent = 0
+ for key, value in dict.items():
+ current = current + str(key) + ": "
+ if type(value) == type({}):
+ current = current + "\n"
+ indent = 1
+ for key2, value2 in value.items():
+ current = current + "\t" * indent + str(key2)
+ current = current + ": " + str(value2) + "\n"
+ else:
+ current = current + "\t" * (indent + 1) + str(value) + "\n"
+
+ return current
+
+SHARED_CONFIGS = {
+ "IPHONEOS_DEPLOYMENT_TARGET": "8.0",
+ "SDKROOT": "iphoneos",
+ "GCC_OPTIMIZATION_LEVEL": "0",
+ "SWIFT_WHOLE_MODULE_OPTIMIZATION": "NO",
+ "ONLY_ACTIVE_ARCH": "YES",
+ "LD_RUNPATH_SEARCH_PATHS": "@executable_path/Frameworks",
+ "ENABLE_BITCODE": "NO",
+}
+
+def optimization_config():
+ return {
+ "SWIFT_OPTIMIZATION_LEVEL": native.read_config("custom", "optimization"),
+ }
+
+# Adding `-all_load` to our binaries works around https://bugs.swift.org/browse/SR-6004.
+ALL_LOAD_LINKER_FLAG = "-all_load"
+
+def read_config_nonempty(name):
+ value = native.read_config("custom", name)
+ if value == None:
+ fail("Configuration paramter custom.%s should be defined" % name)
+ elif len(value) == 0:
+ fail("Configuration paramter custom.%s should not be empty" % name)
+ else:
+ return value
+
+def get_codesign_identity(environment):
+ if environment == "development":
+ return read_config_nonempty("developmentCodeSignIdentity")
+ elif environment == "distribution":
+ return read_config_nonempty("distributionCodeSignIdentity")
+ else:
+ fail("Unknown environment " + environment)
+
+def get_provisioning_profile(environment, type):
+ if type == "app":
+ return read_config_nonempty(environment + "ProvisioningProfileApp")
+ elif type == "share":
+ return read_config_nonempty(environment + "ProvisioningProfileExtensionShare")
+ elif type == "widget":
+ return read_config_nonempty(environment + "ProvisioningProfileExtensionWidget")
+ elif type == "notification_service":
+ return read_config_nonempty(environment + "ProvisioningProfileExtensionNotificationService")
+ elif type == "notification_content":
+ return read_config_nonempty(environment + "ProvisioningProfileExtensionNotificationContent")
+ elif type == "intents":
+ return read_config_nonempty(environment + "ProvisioningProfileExtensionIntents")
+ elif type == "watch_app":
+ return read_config_nonempty(environment + "ProvisioningProfileWatchApp")
+ elif type == "watch_extension":
+ return read_config_nonempty(environment + "ProvisioningProfileWatchExtension")
+ else:
+ fail("Unknown provisioning profile type " + type)
+
+def get_development_team():
+ return read_config_nonempty("developmentTeam")
+
+def add_item_to_subdict(superdict, key, subkey, item):
+ subdict = dict(superdict[key])
+ subdict[subkey] = item
+ superdict[key] = subdict
+
+valid_configurations = ["Debug", "Profile", "Release"]
+
+def add_provisioning_profile_specifier(configs, type):
+ for configuration in configs:
+ if configuration not in valid_configurations:
+ fail("Unknown configuration " + configuration)
+
+ configs = dict(configs)
+ for configuration in valid_configurations:
+ if configuration == "Debug":
+ add_item_to_subdict(configs, configuration, "PROVISIONING_PROFILE_SPECIFIER", get_provisioning_profile(environment="development", type=type))
+ elif configuration == "Profile":
+ add_item_to_subdict(configs, configuration, "PROVISIONING_PROFILE_SPECIFIER", get_provisioning_profile(environment="development", type=type))
+ elif configuration == "Release":
+ add_item_to_subdict(configs, configuration, "PROVISIONING_PROFILE_SPECIFIER", get_provisioning_profile(environment="distribution", type=type))
+ return configs
+
+def add_codesign_identity(configs):
+ for configuration in configs:
+ if configuration not in valid_configurations:
+ fail("Unknown configuration " + configuration)
+
+ configs = dict(configs)
+ for configuration in valid_configurations:
+ if configuration == "Debug":
+ add_item_to_subdict(configs, configuration, "CODE_SIGN_IDENTITY", get_codesign_identity(environment="development"))
+ elif configuration == "Profile":
+ add_item_to_subdict(configs, configuration, "CODE_SIGN_IDENTITY", get_codesign_identity(environment="development"))
+ elif configuration == "Release":
+ add_item_to_subdict(configs, configuration, "CODE_SIGN_IDENTITY", get_codesign_identity(environment="distribution"))
+ return configs
+
+def get_codesign_entitlements(type):
+ if type == "app":
+ return read_config_nonempty("entitlementsApp")
+ elif type == "share":
+ return read_config_nonempty("entitlementsExtensionShare")
+ elif type == "widget":
+ return read_config_nonempty("entitlementsExtensionWidget")
+ elif type == "notification_service":
+ return read_config_nonempty("entitlementsExtensionNotificationService")
+ elif type == "notification_content":
+ return read_config_nonempty("entitlementsExtensionNotificationContent")
+ elif type == "intents":
+ return read_config_nonempty("entitlementsExtensionIntents")
+ else:
+ fail("unknown provisioning profile type")
+
+def get_build_number():
+ return read_config_nonempty("buildNumber")
+
+def bundle_identifier(suffix):
+ return read_config_nonempty("baseApplicationBundleId") + suffix
+
+def library_configs():
+ lib_specific_config = {
+ "SWIFT_WHOLE_MODULE_OPTIMIZATION": "NO",
+
+ # Setting SKIP_INSTALL to NO for static library configs would create
+ # create a generic xcode archive which can not be uploaded the app store
+ # https://developer.apple.com/library/archive/technotes/tn2215/_index.html
+ "SKIP_INSTALL": "YES",
+ }
+ library_config = merge_dict(SHARED_CONFIGS, lib_specific_config)
+ library_config = merge_dict(library_config, optimization_config())
+ configs = {
+ "Debug": library_config,
+ "Profile": library_config,
+ "Release": library_config,
+ }
+ return configs
+
+def dynamic_library_configs():
+ lib_specific_config = {
+ "SWIFT_WHOLE_MODULE_OPTIMIZATION": "NO",
+
+ # Setting SKIP_INSTALL to NO for static library configs would create
+ # create a generic xcode archive which can not be uploaded the app store
+ # https://developer.apple.com/library/archive/technotes/tn2215/_index.html
+ "SKIP_INSTALL": "YES",
+ "MACH_O_TYPE": "mh_dylib",
+ "CODE_SIGNING_ALLOWED": "NO",
+ }
+
+ library_config = merge_dict(SHARED_CONFIGS, lib_specific_config)
+ library_config = merge_dict(library_config, optimization_config())
+ #library_config = config_with_updated_linker_flags(library_config, ALL_LOAD_LINKER_FLAG)
+ configs = {
+ "Debug": library_config,
+ "Profile": library_config,
+ "Release": library_config,
+ }
+ return configs
+
+def app_binary_configs():
+ config = {
+ "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES": "YES",
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=""),
+ "CODE_SIGN_ENTITLEMENTS": get_codesign_entitlements("app"),
+ "DEVELOPMENT_TEAM": get_development_team(),
+ "ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon",
+ "BUILD_NUMBER": get_build_number(),
+ "APP_NAME": "Telegram",
+ "PRODUCT_NAME": "Telegram",
+ "TARGETED_DEVICE_FAMILY": "1,2",
+ }
+ config = merge_dict(SHARED_CONFIGS, config)
+ config = merge_dict(config, optimization_config())
+ config = config_with_updated_linker_flags(config, ALL_LOAD_LINKER_FLAG)
+ configs = configs_with_config(config)
+ configs = add_provisioning_profile_specifier(configs, "app")
+ configs = add_codesign_identity(configs)
+ return configs
+
+def share_extension_configs():
+ config = {
+ "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES": "NO",
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".Share"),
+ "CODE_SIGN_ENTITLEMENTS": get_codesign_entitlements("share"),
+ "DEVELOPMENT_TEAM": get_development_team(),
+ "BUILD_NUMBER": get_build_number(),
+ "APP_NAME": "Telegram",
+ "PRODUCT_NAME": "ShareExtension",
+ }
+ config = merge_dict(SHARED_CONFIGS, config)
+ config = merge_dict(config, optimization_config())
+ config = config_with_updated_linker_flags(config, ALL_LOAD_LINKER_FLAG)
+ configs = configs_with_config(config)
+ configs = add_provisioning_profile_specifier(configs, "share")
+ configs = add_codesign_identity(configs)
+ return configs
+
+def widget_extension_configs():
+ config = {
+ "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES": "NO",
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".Widget"),
+ "CODE_SIGN_ENTITLEMENTS": get_codesign_entitlements("widget"),
+ "DEVELOPMENT_TEAM": get_development_team(),
+ "BUILD_NUMBER": get_build_number(),
+ "APP_NAME": "Telegram",
+ "PRODUCT_NAME": "WidgetExtension",
+ }
+ config = merge_dict(SHARED_CONFIGS, config)
+ config = merge_dict(config, optimization_config())
+ config = config_with_updated_linker_flags(config, ALL_LOAD_LINKER_FLAG)
+ configs = configs_with_config(config)
+ configs = add_provisioning_profile_specifier(configs, "widget")
+ configs = add_codesign_identity(configs)
+ return configs
+
+def notification_content_extension_configs():
+ config = {
+ "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES": "NO",
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".NotificationContent"),
+ "CODE_SIGN_ENTITLEMENTS": get_codesign_entitlements("notification_content"),
+ "DEVELOPMENT_TEAM": get_development_team(),
+ "BUILD_NUMBER": get_build_number(),
+ "APP_NAME": "Telegram",
+ "PRODUCT_NAME": "NotificationContentExtension",
+ }
+ config = merge_dict(SHARED_CONFIGS, config)
+ config = merge_dict(config, optimization_config())
+ config = config_with_updated_linker_flags(config, ALL_LOAD_LINKER_FLAG)
+ configs = configs_with_config(config)
+ configs = add_provisioning_profile_specifier(configs, "notification_content")
+ configs = add_codesign_identity(configs)
+ return configs
+
+def notification_service_extension_configs():
+ config = {
+ "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES": "NO",
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".NotificationService"),
+ "CODE_SIGN_ENTITLEMENTS": get_codesign_entitlements("notification_service"),
+ "DEVELOPMENT_TEAM": get_development_team(),
+ "BUILD_NUMBER": get_build_number(),
+ "APP_NAME": "Telegram",
+ "PRODUCT_NAME": "NotificationServiceExtension",
+ }
+ config = merge_dict(SHARED_CONFIGS, config)
+ config = merge_dict(config, optimization_config())
+ config = config_with_updated_linker_flags(config, ALL_LOAD_LINKER_FLAG)
+ configs = configs_with_config(config)
+ configs = add_provisioning_profile_specifier(configs, "notification_service")
+ configs = add_codesign_identity(configs)
+ return configs
+
+def intents_extension_configs():
+ config = {
+ "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES": "NO",
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".SiriIntents"),
+ "CODE_SIGN_ENTITLEMENTS": get_codesign_entitlements("intents"),
+ "DEVELOPMENT_TEAM": get_development_team(),
+ "BUILD_NUMBER": get_build_number(),
+ "APP_NAME": "Telegram",
+ "PRODUCT_NAME": "IntentsExtension",
+ }
+ config = merge_dict(SHARED_CONFIGS, config)
+ config = merge_dict(config, optimization_config())
+ config = config_with_updated_linker_flags(config, ALL_LOAD_LINKER_FLAG)
+ configs = configs_with_config(config)
+ configs = add_provisioning_profile_specifier(configs, "intents")
+ configs = add_codesign_identity(configs)
+ return configs
+
+def watch_extension_binary_configs():
+ config = {
+ "SDKROOT": "watchos",
+ "WATCHOS_DEPLOYMENT_TARGET": "4.0",
+ "TARGETED_DEVICE_FAMILY": "4",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".watchkitapp.watchkitextension"),
+ "DEVELOPMENT_TEAM": get_development_team(),
+ "LD_RUNPATH_SEARCH_PATHS": "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks",
+ "WK_COMPANION_APP_BUNDLE_IDENTIFIER": bundle_identifier(suffix=""),
+ "WK_APP_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".watchkitapp"),
+ "APP_NAME": "Telegram",
+ "APP_BUNDLE_ID": bundle_identifier(suffix=""),
+ "BUILD_NUMBER": get_build_number(),
+ "ENABLE_BITCODE": "YES",
+ }
+ config = config_with_updated_linker_flags(config, ALL_LOAD_LINKER_FLAG)
+ configs = configs_with_config(config)
+ configs = add_provisioning_profile_specifier(configs, "watch_extension")
+ configs = add_codesign_identity(configs)
+ return configs
+
+def watch_binary_configs():
+ config = {
+ "SDKROOT": "watchos",
+ "WATCHOS_DEPLOYMENT_TARGET": "4.0",
+ "TARGETED_DEVICE_FAMILY": "4",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".watchkitapp"),
+ "DEVELOPMENT_TEAM": get_development_team(),
+ "LD_RUNPATH_SEARCH_PATHS": "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks",
+ "WK_COMPANION_APP_BUNDLE_IDENTIFIER": bundle_identifier(suffix=""),
+ "WK_APP_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".watchkitapp"),
+ "APP_NAME": "Telegram",
+ "APP_BUNDLE_ID": bundle_identifier(suffix=""),
+ "ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon",
+ "BUILD_NUMBER": get_build_number(),
+ "ENABLE_BITCODE": "YES",
+ }
+ config = config_with_updated_linker_flags(config, ALL_LOAD_LINKER_FLAG)
+ configs = configs_with_config(config)
+ configs = add_provisioning_profile_specifier(configs, "watch_app")
+ configs = add_codesign_identity(configs)
+ return configs
+
+def info_plist_substitutions(name):
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": name,
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(name),
+ "PRODUCT_NAME": name,
+ "CURRENT_PROJECT_VERSION": "1",
+ }
+ return substitutions
+
+def app_info_plist_substitutions():
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": "Telegram",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=""),
+ "PRODUCT_NAME": "Telegram",
+ "APP_NAME": "Telegram",
+ "CURRENT_PROJECT_VERSION": "1",
+ "APP_SPECIFIC_URL_SCHEME": appConfig()["appSpecificUrlScheme"],
+ "BUILD_NUMBER": get_build_number(),
+ "ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon",
+ "TARGETED_DEVICE_FAMILY": "1,2",
+ }
+ return substitutions
+
+def share_extension_info_plist_substitutions():
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": "ShareExtension",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".Share"),
+ "PRODUCT_NAME": "Share",
+ "APP_NAME": "Telegram",
+ "CURRENT_PROJECT_VERSION": "1",
+ "APP_SPECIFIC_URL_SCHEME": appConfig()["appSpecificUrlScheme"],
+ "BUILD_NUMBER": get_build_number(),
+ }
+ return substitutions
+
+def widget_extension_info_plist_substitutions():
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": "WidgetExtension",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".Widget"),
+ "PRODUCT_NAME": "Widget",
+ "APP_NAME": "Telegram",
+ "CURRENT_PROJECT_VERSION": "1",
+ "APP_SPECIFIC_URL_SCHEME": appConfig()["appSpecificUrlScheme"],
+ "BUILD_NUMBER": get_build_number(),
+ }
+ return substitutions
+
+def notification_content_extension_info_plist_substitutions():
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": "NotificationContentExtension",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".NotificationContent"),
+ "PRODUCT_NAME": "Telegram",
+ "APP_NAME": "Telegram",
+ "CURRENT_PROJECT_VERSION": "1",
+ "BUILD_NUMBER": get_build_number(),
+ }
+ return substitutions
+
+def notification_service_extension_info_plist_substitutions():
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": "NotificationServiceExtension",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".NotificationService"),
+ "PRODUCT_NAME": "Telegram",
+ "APP_NAME": "Telegram",
+ "CURRENT_PROJECT_VERSION": "1",
+ "BUILD_NUMBER": get_build_number(),
+ }
+ return substitutions
+
+def intents_extension_info_plist_substitutions():
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": "IntentsExtension",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".SiriIntents"),
+ "PRODUCT_NAME": "Telegram",
+ "APP_NAME": "Telegram",
+ "CURRENT_PROJECT_VERSION": "1",
+ "APP_SPECIFIC_URL_SCHEME": appConfig()["appSpecificUrlScheme"],
+ "BUILD_NUMBER": get_build_number(),
+ "PRODUCT_MODULE_NAME": "SiriIntents",
+ }
+ return substitutions
+
+def watch_extension_info_plist_substitutions():
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": "WatchAppExtension",
+ "PRODUCT_BUNDLE_IDENTIFIER": bundle_identifier(suffix=".watchkitapp.watchkitextension"),
+ "APP_NAME": "Telegram",
+ "APP_BUNDLE_ID": bundle_identifier(suffix=""),
+ "PRODUCT_NAME": "Telegram",
+ "CURRENT_PROJECT_VERSION": "1",
+ "BUILD_NUMBER": get_build_number(),
+ }
+ return substitutions
+
+def watch_info_plist_substitutions():
+ substitutions = {
+ "DEVELOPMENT_LANGUAGE": DEVELOPMENT_LANGUAGE,
+ "EXECUTABLE_NAME": "WatchApp",
+ "PRODUCT_BUNDLE_IDENTIFIER":bundle_identifier(suffix=".watchkitapp"),
+ "APP_NAME": "Telegram",
+ "APP_BUNDLE_ID": bundle_identifier(suffix=""),
+ "PRODUCT_NAME": "Telegram",
+ "CURRENT_PROJECT_VERSION": "1",
+ "BUILD_NUMBER": get_build_number(),
+ }
+ return substitutions
diff --git a/Config/utils.bzl b/Config/utils.bzl
new file mode 100644
index 0000000000..bb2b6c70f4
--- /dev/null
+++ b/Config/utils.bzl
@@ -0,0 +1,35 @@
+OTHER_LINKER_FLAGS_KEY = 'OTHER_LDFLAGS'
+
+def configs_with_config(config):
+ return {
+ "Debug": config,
+ "Profile": config,
+ "Release": config,
+ }
+
+def configs_with_updated_linker_flags(configs, other_linker_flags):
+ if other_linker_flags == None:
+ return configs
+ else:
+ updated_configs = { }
+ for build_configuration in configs:
+ updated_configs[build_configuration] = config_with_updated_linker_flags(
+ configs[build_configuration],
+ other_linker_flags)
+ return updated_configs
+
+def config_with_updated_linker_flags(config, other_linker_flags, config_key=OTHER_LINKER_FLAGS_KEY):
+ new_config = { }
+ config_key_found = False
+ for key in config:
+ if key == config_key:
+ new_config[key] = config[key] + (" %s" % other_linker_flags)
+ config_key_found = True
+ else:
+ new_config[key] = config[key]
+
+ if config_key_found == False:
+ # If `config` does not currently contain `config_key`, add it. Inherit for good measure.
+ new_config[config_key] = '$(inherited) ' + other_linker_flags
+
+ return new_config
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..2bf1da1109
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,264 @@
+.PHONY : check_env build build_arm64 build_debug_arm64 package package_arm64 app app_arm64 app_debug_arm64 build_buckdebug build_verbose kill_xcode clean project project_buckdebug temp
+
+
+BUCK_DEBUG_OPTIONS=\
+ --config custom.other_cflags="-O0 -D DEBUG" \
+ --config custom.other_cxxflags="-O0 -D DEBUG" \
+ --config custom.optimization="-Onone" \
+ --config custom.config_swift_compiler_flags=""
+
+BUCK_RELEASE_OPTIONS=\
+ --config custom.other_cflags="-Os" \
+ --config custom.other_cxxflags="-Os" \
+ --config custom.optimization="-O" \
+ --config custom.config_swift_compiler_flags="-whole-module-optimization"
+
+BUCK_OPTIONS=\
+ --config custom.developmentCodeSignIdentity="${DEVELOPMENT_CODE_SIGN_IDENTITY}" \
+ --config custom.distributionCodeSignIdentity="${DISTRIBUTION_CODE_SIGN_IDENTITY}" \
+ --config custom.developmentTeam="${DEVELOPMENT_TEAM}" \
+ --config custom.baseApplicationBundleId="${BUNDLE_ID}" \
+ --config custom.apiId="${API_ID}" \
+ --config custom.apiHash="${API_HASH}" \
+ --config custom.hockeyAppId="${HOCKEYAPP_ID}" \
+ --config custom.isInternalBuild="${IS_INTERNAL_BUILD}" \
+ --config custom.isAppStoreBuild="${IS_APPSTORE_BUILD}" \
+ --config custom.appStoreId="${APPSTORE_ID}" \
+ --config custom.appSpecificUrlScheme="${APP_SPECIFIC_URL_SCHEME}" \
+ --config custom.buildNumber="${BUILD_NUMBER}" \
+ --config custom.entitlementsApp="${ENTITLEMENTS_APP}" \
+ --config custom.developmentProvisioningProfileApp="${DEVELOPMENT_PROVISIONING_PROFILE_APP}" \
+ --config custom.distributionProvisioningProfileApp="${DISTRIBUTION_PROVISIONING_PROFILE_APP}" \
+ --config custom.entitlementsExtensionShare="${ENTITLEMENTS_EXTENSION_SHARE}" \
+ --config custom.developmentProvisioningProfileExtensionShare="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
+ --config custom.distributionProvisioningProfileExtensionShare="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
+ --config custom.entitlementsExtensionWidget="${ENTITLEMENTS_EXTENSION_WIDGET}" \
+ --config custom.developmentProvisioningProfileExtensionWidget="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
+ --config custom.distributionProvisioningProfileExtensionWidget="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
+ --config custom.entitlementsExtensionNotificationService="${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
+ --config custom.developmentProvisioningProfileExtensionNotificationService="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
+ --config custom.distributionProvisioningProfileExtensionNotificationService="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
+ --config custom.entitlementsExtensionNotificationContent="${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
+ --config custom.developmentProvisioningProfileExtensionNotificationContent="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
+ --config custom.distributionProvisioningProfileExtensionNotificationContent="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
+ --config custom.entitlementsExtensionIntents="${ENTITLEMENTS_EXTENSION_INTENTS}" \
+ --config custom.developmentProvisioningProfileExtensionIntents="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
+ --config custom.distributionProvisioningProfileExtensionIntents="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
+ --config custom.developmentProvisioningProfileWatchApp="${DEVELOPMENT_PROVISIONING_PROFILE_WATCH_APP}" \
+ --config custom.distributionProvisioningProfileWatchApp="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_APP}" \
+ --config custom.developmentProvisioningProfileWatchExtension="${DEVELOPMENT_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
+ --config custom.distributionProvisioningProfileWatchExtension="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION}"
+
+BUCK_THREADS_OPTIONS=--config build.threads=$(shell sysctl -n hw.logicalcpu)
+
+BUCK_CACHE_OPTIONS=
+
+ifneq ($(BUCK_HTTP_CACHE),)
+ ifeq ($(BUCK_CACHE_MODE),)
+ BUCK_CACHE_MODE=readwrite
+ endif
+ BUCK_CACHE_OPTIONS=\
+ --config cache.mode=http \
+ --config cache.http_url="$(BUCK_HTTP_CACHE)" \
+ --config cache.http_mode="$(BUCK_CACHE_MODE)"
+endif
+
+check_env:
+ifndef BUCK
+ $(error BUCK is not set)
+endif
+ sh check_env.sh
+
+build_arm64: check_env
+ $(BUCK) build \
+ //:AppPackage#iphoneos-arm64 \
+ //:Telegram#dwarf-and-dsym,iphoneos-arm64 \
+ //submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared,iphoneos-arm64 \
+ //submodules/Postbox:Postbox#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/Postbox:Postbox#shared,iphoneos-arm64 \
+ //submodules/TelegramCore:TelegramCore#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/TelegramCore:TelegramCore#shared,iphoneos-arm64 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#shared,iphoneos-arm64 \
+ //submodules/Display:Display#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/Display:Display#shared,iphoneos-arm64 \
+ //submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64 \
+ //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
+ ${BUCK_OPTIONS} ${BUCK_RELEASE_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
+
+build_debug_arm64: check_env
+ $(BUCK) build \
+ //:AppPackage#iphoneos-arm64 \
+ //:Telegram#dwarf-and-dsym,iphoneos-arm64 \
+ //submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared,iphoneos-arm64 \
+ //submodules/Postbox:Postbox#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/Postbox:Postbox#shared,iphoneos-arm64 \
+ //submodules/TelegramCore:TelegramCore#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/TelegramCore:TelegramCore#shared,iphoneos-arm64 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#shared,iphoneos-arm64 \
+ //submodules/Display:Display#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/Display:Display#shared,iphoneos-arm64 \
+ //submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64 \
+ //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
+ ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
+
+build: check_env
+ $(BUCK) build \
+ //:AppPackage#iphoneos-arm64,iphoneos-armv7 \
+ //:Telegram#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/Postbox:Postbox#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/Postbox:Postbox#shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/TelegramCore:TelegramCore#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/TelegramCore:TelegramCore#shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/Display:Display#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/Display:Display#shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
+ //submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64,iphoneos-armv7 \
+ //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //:ShareExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ ${BUCK_OPTIONS} ${BUCK_RELEASE_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
+
+package_arm64:
+ PACKAGE_DEVELOPMENT_TEAM="${DEVELOPMENT_TEAM}" \
+ PACKAGE_CODE_SIGN_IDENTITY="${DISTRIBUTION_CODE_SIGN_IDENTITY}" \
+ PACKAGE_PROVISIONING_PROFILE_APP="${DISTRIBUTION_PROVISIONING_PROFILE_APP}" \
+ PACKAGE_ENTITLEMENTS_APP="${ENTITLEMENTS_APP}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_Share="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Share="${ENTITLEMENTS_EXTENSION_SHARE}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_Widget="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Widget="${ENTITLEMENTS_EXTENSION_WIDGET}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationService="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationContent="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_Intents="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Intents="${ENTITLEMENTS_EXTENSION_INTENTS}" \
+ PACKAGE_PROVISIONING_PROFILE_WATCH_APP="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_APP}" \
+ PACKAGE_PROVISIONING_PROFILE_WATCH_EXTENSION="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
+ PACKAGE_BUNDLE_ID="${BUNDLE_ID}" \
+ sh package_app.sh iphoneos-arm64 $(BUCK) $(BUCK_OPTIONS) ${BUCK_RELEASE_OPTIONS}
+
+package:
+ PACKAGE_DEVELOPMENT_TEAM="${DEVELOPMENT_TEAM}" \
+ PACKAGE_CODE_SIGN_IDENTITY="${DISTRIBUTION_CODE_SIGN_IDENTITY}" \
+ PACKAGE_PROVISIONING_PROFILE_APP="${DISTRIBUTION_PROVISIONING_PROFILE_APP}" \
+ PACKAGE_ENTITLEMENTS_APP="${ENTITLEMENTS_APP}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_Share="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Share="${ENTITLEMENTS_EXTENSION_SHARE}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_Widget="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Widget="${ENTITLEMENTS_EXTENSION_WIDGET}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationService="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationContent="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_PROVISIONING_PROFILE_EXTENSION_Intents="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Intents="${ENTITLEMENTS_EXTENSION_INTENTS}" \
+ PACKAGE_PROVISIONING_PROFILE_WATCH_APP="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_APP}" \
+ PACKAGE_PROVISIONING_PROFILE_WATCH_EXTENSION="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
+ PACKAGE_BUNDLE_ID="${BUNDLE_ID}" \
+ sh package_app.sh iphoneos-arm64,iphoneos-armv7 $(BUCK) $(BUCK_OPTIONS) ${BUCK_RELEASE_OPTIONS}
+
+app: build package
+
+app_arm64: build_arm64 package_arm64
+
+app_debug_arm64: build_debug_arm64 package_arm64
+
+build_buckdebug: check_env
+ BUCK_DEBUG_MODE=1 $(BUCK) build \
+ //:AppPackage#iphoneos-arm64 \
+ //:Telegram#dwarf-and-dsym,iphoneos-arm64 \
+ //submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared,iphoneos-arm64 \
+ //submodules/Postbox:Postbox#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/Postbox:Postbox#shared,iphoneos-arm64 \
+ //submodules/TelegramCore:TelegramCore#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/TelegramCore:TelegramCore#shared,iphoneos-arm64 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#shared,iphoneos-arm64 \
+ //submodules/Display:Display#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/Display:Display#shared,iphoneos-arm64 \
+ //submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64 \
+ //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
+ --verbose 7 ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
+
+build_verbose: check_env
+ $(BUCK) build \
+ //:AppPackage#iphoneos-arm64 \
+ //:Telegram#dwarf-and-dsym,iphoneos-arm64 \
+ //submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared,iphoneos-arm64 \
+ //submodules/Postbox:Postbox#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/Postbox:Postbox#shared,iphoneos-arm64 \
+ //submodules/TelegramCore:TelegramCore#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/TelegramCore:TelegramCore#shared,iphoneos-arm64 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/AsyncDisplayKit:AsyncDisplayKit#shared,iphoneos-arm64 \
+ //submodules/Display:Display#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/Display:Display#shared,iphoneos-arm64 \
+ //submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64 \
+ //submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64 \
+ //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
+ --verbose 8 ${BUCK_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_DEBUG_OPTIONS}
+
+kill_xcode:
+ killall Xcode || true
+
+clean: kill_xcode
+ sh clean.sh
+
+project: check_env kill_xcode
+ $(BUCK) project //:workspace --config custom.mode=project ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
+ open Telegram_Buck.xcworkspace
+
+project_buckdebug: check_env kill_xcode
+ BUCK_DEBUG_MODE=1 $(BUCK) project //:workspace --config custom.mode=project ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
+ open Telegram_Buck.xcworkspace
+
+temp_project: check_env kill_xcode
+ $(BUCK) project //Temp:workspace --config custom.mode=project ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
+ open Temp/Telegram_Buck.xcworkspace
diff --git a/NotificationContent/ChatHistoryFragmentView.swift b/NotificationContent/ChatHistoryFragmentView.swift
deleted file mode 100644
index c252aa9651..0000000000
--- a/NotificationContent/ChatHistoryFragmentView.swift
+++ /dev/null
@@ -1,260 +0,0 @@
-import Foundation
-import Display
-import TelegramCore
-import TelegramUI
-import Postbox
-import SwiftSignalKit
-
-private let accountCache = Atomic<[AccountRecordId: Account]>(value: [:])
-
-private struct ChatHistoryFragmentEntry: Comparable, Identifiable {
- let message: Message
- let read: Bool
-
- var stableId: UInt32 {
- return self.message.stableId
- }
-}
-
-private func==(lhs: ChatHistoryFragmentEntry, rhs: ChatHistoryFragmentEntry) -> Bool {
- if MessageIndex(lhs.message) == MessageIndex(rhs.message) && lhs.message.flags == rhs.message.flags {
- if lhs.message.media.count != rhs.message.media.count {
- return false
- }
- if lhs.read != rhs.read {
- return false
- }
- for i in 0 ..< lhs.message.media.count {
- if !lhs.message.media[i].isEqual(rhs.message.media[i]) {
- return false
- }
- }
- return true
- } else {
- return false
- }
-}
-
-private func <(lhs: ChatHistoryFragmentEntry, rhs: ChatHistoryFragmentEntry) -> Bool {
- return MessageIndex(lhs.message) < MessageIndex(rhs.message)
-}
-
-private final class ChatHistoryFragmentDisplayItem {
- fileprivate let item: ListViewItem
- fileprivate var node: ListViewItemNode?
-
- init(item: ListViewItem) {
- self.item = item
- }
-
- init(item: ListViewItem, node: ListViewItemNode?) {
- self.item = item
- self.node = node
- }
-}
-
-final class ChatHistoryFragmentView: UIView {
- private let sizeUpdated: (CGSize) -> Void
-
- private var layoutWidth: CGFloat?
- private var displayItems: [ChatHistoryFragmentDisplayItem] = []
-
- private let disposable = MetaDisposable()
-
- let account = Promise()
-
- init(peerId: PeerId, width: CGFloat, sizeUpdated: @escaping (CGSize) -> Void) {
- self.sizeUpdated = sizeUpdated
- self.layoutWidth = width
-
- super.init(frame: CGRect())
-
- /*let appBundleIdentifier = Bundle.main.bundleIdentifier!
- guard let lastDotRange = appBundleIdentifier.range(of: ".", options: [.backwards]) else {
- return
- }
-
- let appGroupName = "group.\(appBundleIdentifier.substring(to: lastDotRange.lowerBound))"
- let maybeAppGroupUrl = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroupName)
-
- guard let appGroupUrl = maybeAppGroupUrl else {
- return
- }
-
- let accountPromise = self.account
-
- let accountId = currentAccountId(appGroupPath: appGroupUrl.path, testingEnvironment: false)
-
- let authorizedAccount: Signal
- let cachedAccount = accountCache.with { dict -> Account? in
- if let account = dict[accountId] {
- return account
- } else {
- return nil
- }
- }
- if let cachedAccount = cachedAccount {
- authorizedAccount = .single(cachedAccount)
- } else {
- authorizedAccount = accountWithId(accountId, appGroupPath: appGroupUrl.path, logger: .named("notification-content"), testingEnvironment: false) |> mapToSignal { account -> Signal in
- switch account {
- case .left:
- return .complete()
- case let .right(authorizedAccount):
- setupAccount(authorizedAccount)
- let _ = accountCache.modify { dict in
- var dict = dict
- dict[accountId] = authorizedAccount
- return dict
- }
- return .single(authorizedAccount)
- }
- }
- }
-
- let view = authorizedAccount
- |> take(1)
- |> mapToSignal { account -> Signal<(Account, MessageHistoryView, ViewUpdateType), NoError> in
- accountPromise.set(.single(account))
- account.stateManager.reset()
- account.shouldBeServiceTaskMaster.set(.single(.now))
- let view = account.viewTracker.aroundMessageHistoryViewForPeerId(peerId, index: MessageIndex.upperBound(peerId: peerId), count: 20, anchorIndex: MessageIndex.upperBound(peerId: peerId), fixedCombinedReadStates: nil, tagMask: nil)
- |> map { view, updateType, _ -> (Account, MessageHistoryView, ViewUpdateType) in
- return (account, view, updateType)
- }
- return view
- }
-
- let previousEntries = Atomic<[ChatHistoryFragmentEntry]>(value: [])
-
- let controllerInteraction = ChatControllerInteraction(openMessage: { _ in }, openSecretMessagePreview: { _ in }, closeSecretMessagePreview: { }, openPeer: { _ in }, openPeerMention: { _ in }, openMessageContextMenu: { _ in }, navigateToMessage: { _ in }, clickThroughMessage: { }, toggleMessagesSelection: { _ in }, sendMessage: { _ in }, sendSticker: { _ in }, requestMessageActionCallback: { _ in }, openUrl: { _ in }, shareCurrentLocation: {}, shareAccountContact: {}, sendBotCommand: { _, _ in }, openInstantPage: { _ in }, openHashtag: { _ in }, updateInputState: { _ in })
-
- let messages = view
- |> map { (account, view, viewUpdateType) -> (Account, [ChatHistoryFragmentEntry], [Int: Int]) in
- var entries: [ChatHistoryFragmentEntry] = []
- for entry in view.entries.reversed() {
- switch entry {
- case let .MessageEntry(message, read, _):
- entries.append(ChatHistoryFragmentEntry(message: message, read: read))
- default:
- break
- }
- }
-
- var previousIndices: [Int: Int] = [:]
- let _ = previousEntries.modify { previousEntries in
- var index = 0
- for entry in entries {
- var previousIndex = 0
- for previousEntry in previousEntries {
- if previousEntry.stableId == entry.stableId {
- previousIndices[index] = previousIndex
- break
- }
- previousIndex += 1
- }
- index += 1
- }
-
- return entries
- }
-
- return (account, entries, previousIndices)
- }
-
- let displayItems = messages
- |> map { (account, messages, previousIndices) -> ([ChatHistoryFragmentDisplayItem], [Int: Int]) in
- var result: [ChatHistoryFragmentDisplayItem] = []
- for entry in messages {
- result.append(ChatHistoryFragmentDisplayItem(item: ChatMessageItem(account: account, peerId: peerId, controllerInteraction: controllerInteraction, message: entry.message, read: entry.read)))
- }
- return (result, previousIndices)
- }
-
- let semaphore = DispatchSemaphore(value: 0)
- var resultItems: [ChatHistoryFragmentDisplayItem]?
- disposable.set(displayItems.start(next: { [weak self] (displayItems, previousIndices) in
- if resultItems == nil {
- resultItems = displayItems
- semaphore.signal()
- } else {
- Queue.mainQueue().async {
- if let strongSelf = self {
- var updatedDisplayItems: [ChatHistoryFragmentDisplayItem] = []
- for i in 0 ..< displayItems.count {
- if let previousIndex = previousIndices[i] {
- updatedDisplayItems.append(ChatHistoryFragmentDisplayItem(item: displayItems[i].item, node: strongSelf.displayItems[previousIndex].node))
- } else {
- updatedDisplayItems.append(displayItems[i])
- }
- }
- let previousIndexSet = Set(previousIndices.values)
- for i in 0 ..< strongSelf.displayItems.count {
- if !previousIndexSet.contains(i) {
- strongSelf.displayItems[i].node?.removeFromSupernode()
- }
- }
- strongSelf.displayItems = updatedDisplayItems
- if let layoutWidth = strongSelf.layoutWidth {
- strongSelf.updateDisplayItems(width: layoutWidth)
- }
- }
- }
- }
- }))
- semaphore.wait()
- if let resultItems = resultItems {
- self.displayItems = resultItems
- }
- if let layoutWidth = self.layoutWidth {
- self.updateDisplayItems(width: layoutWidth)
- }*/
- }
-
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- deinit {
- self.disposable.dispose()
- }
-
- private func updateDisplayItems(width: CGFloat) {
- for i in 0 ..< self.displayItems.count {
- if let node = self.displayItems[i].node {
- self.displayItems[i].item.updateNode(async: { $0() }, node: node, width: width, previousItem: i == 0 ? nil : self.displayItems[i - 1].item, nextItem: i == self.displayItems.count - 1 ? nil : self.displayItems[i + 1].item, animation: .None, completion: { layout, apply in
- node.insets = layout.insets
- node.contentSize = layout.contentSize
- apply()
- })
- node.layoutForWidth(width, item: self.displayItems[i].item, previousItem: i == 0 ? nil : self.displayItems[i - 1].item, nextItem: i == self.displayItems.count - 1 ? nil : self.displayItems[i + 1].item)
- } else {
- self.displayItems[i].item.nodeConfiguredForWidth(async: { $0() }, width: width, previousItem: i == 0 ? nil : self.displayItems[i - 1].item, nextItem: i == self.displayItems.count - 1 ? nil : self.displayItems[i + 1].item, completion: { node, apply in
- apply()
- self.displayItems[i].node = node
- self.addSubnode(node)
- })
- }
- }
-
- var verticalOffset: CGFloat = 4.0
- for displayItem in self.displayItems {
- if let node = displayItem.node {
- node.frame = CGRect(origin: CGPoint(x: 0.0, y: verticalOffset), size: node.layout.size)
- verticalOffset += node.layout.size.height
- }
- }
-
- let displaySize = CGSize(width: width, height: verticalOffset + 4.0)
- self.sizeUpdated(displaySize)
- }
-
- override func layoutSubviews() {
- super.layoutSubviews()
-
- if self.layoutWidth != self.bounds.size.width {
- self.layoutWidth = self.bounds.size.width
- self.updateDisplayItems(width: self.bounds.size.width)
- }
- }
-}
diff --git a/NotificationContent/Info.plist b/NotificationContent/Info.plist
index 63a5db75f2..f982785438 100644
--- a/NotificationContent/Info.plist
+++ b/NotificationContent/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 5.11
+ 5.12
CFBundleVersion
${BUILD_NUMBER}
NSExtension
diff --git a/NotificationContent/NotificationViewController.swift b/NotificationContent/NotificationViewController.swift
index 2c901bb4a2..f08edd06a7 100644
--- a/NotificationContent/NotificationViewController.swift
+++ b/NotificationContent/NotificationViewController.swift
@@ -5,6 +5,7 @@ import TelegramUI
import BuildConfig
@objc(NotificationViewController)
+@available(iOSApplicationExtension 10.0, *)
class NotificationViewController: UIViewController, UNNotificationContentExtension {
private var impl: NotificationViewControllerImpl?
diff --git a/NotificationService/Attachments.m b/NotificationService/Attachments.m
index e0a86247ba..29d498dc2d 100644
--- a/NotificationService/Attachments.m
+++ b/NotificationService/Attachments.m
@@ -1,6 +1,11 @@
#import "Attachments.h"
-#import
+#ifdef BUCK
+#import
+#else
+#import
+#endif
+
#import "Api.h"
id _Nullable parseAttachment(NSData * _Nonnull data) {
diff --git a/NotificationService/FetchImage.m b/NotificationService/FetchImage.m
index 8a1e8921a5..4726cf52ec 100644
--- a/NotificationService/FetchImage.m
+++ b/NotificationService/FetchImage.m
@@ -1,6 +1,10 @@
#import "FetchImage.h"
+#ifdef BUCK
+#import
+#else
#import
+#endif
#import "Serialization.h"
diff --git a/NotificationService/Info.plist b/NotificationService/Info.plist
index 14cecfaf70..b9f2e746f9 100644
--- a/NotificationService/Info.plist
+++ b/NotificationService/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 5.11
+ 5.12
CFBundleVersion
${BUILD_NUMBER}
NSExtension
@@ -27,5 +27,7 @@
NSExtensionPrincipalClass
NotificationService
+ MinimumOSVersion
+ 10.0
diff --git a/NotificationService/Serialization.h b/NotificationService/Serialization.h
index f08453b3f3..d2beb976d6 100644
--- a/NotificationService/Serialization.h
+++ b/NotificationService/Serialization.h
@@ -1,5 +1,10 @@
#import
+
+#ifdef BUCK
+#import
+#else
#import
+#endif
NS_ASSUME_NONNULL_BEGIN
diff --git a/NotificationService/Serialization.m b/NotificationService/Serialization.m
index a10db76cba..6f6f9191a5 100644
--- a/NotificationService/Serialization.m
+++ b/NotificationService/Serialization.m
@@ -3,7 +3,7 @@
@implementation Serialization
- (NSUInteger)currentLayer {
- return 105;
+ return 106;
}
- (id _Nullable)parseMessage:(NSData * _Nullable)data {
diff --git a/NotificationService/StoredAccountInfos.m b/NotificationService/StoredAccountInfos.m
index bdfeb05095..4f60eac49b 100644
--- a/NotificationService/StoredAccountInfos.m
+++ b/NotificationService/StoredAccountInfos.m
@@ -1,6 +1,11 @@
#import "StoredAccountInfos.h"
-#import
+#ifdef BUCK
+#import
+#else
+#import
+#endif
+
#import
@implementation AccountNotificationKey
diff --git a/Share/Info.plist b/Share/Info.plist
index 9ce95e61f2..21a471347b 100644
--- a/Share/Info.plist
+++ b/Share/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 5.11
+ 5.12
CFBundleVersion
${BUILD_NUMBER}
NSExtension
diff --git a/SiriIntents/Info.plist b/SiriIntents/Info.plist
index ff9f035c1e..d6b99942eb 100644
--- a/SiriIntents/Info.plist
+++ b/SiriIntents/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 5.11
+ 5.12
CFBundleVersion
${BUILD_NUMBER}
NSExtension
diff --git a/SiriIntents/IntentContacts.swift b/SiriIntents/IntentContacts.swift
index 8b5182c44b..79aa8d3506 100644
--- a/SiriIntents/IntentContacts.swift
+++ b/SiriIntents/IntentContacts.swift
@@ -45,6 +45,7 @@ private func cleanPhoneNumber(_ text: String) -> String {
return result
}
+@available(iOSApplicationExtension 10.0, *)
func matchingDeviceContacts(stableIds: [String]) -> Signal<[MatchingDeviceContact], IntentContactsError> {
guard CNContactStore.authorizationStatus(for: .contacts) == .authorized else {
return .fail(.generic)
@@ -118,6 +119,7 @@ func matchingCloudContact(postbox: Postbox, peerId: PeerId) -> Signal INPerson {
var nameComponents = PersonNameComponents()
nameComponents.givenName = user.firstName
diff --git a/SiriIntents/IntentHandler.swift b/SiriIntents/IntentHandler.swift
index 1e3b901f9a..740f539ecb 100644
--- a/SiriIntents/IntentHandler.swift
+++ b/SiriIntents/IntentHandler.swift
@@ -47,6 +47,7 @@ enum IntentHandlingError {
case generic
}
+@available(iOSApplicationExtension 10.0, *)
class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessagesIntentHandling, INSetMessageAttributeIntentHandling, INStartAudioCallIntentHandling, INSearchCallHistoryIntentHandling {
private let accountPromise = Promise()
diff --git a/SiriIntents/IntentMessages.swift b/SiriIntents/IntentMessages.swift
index f3f0042f1e..8f419a8cc2 100644
--- a/SiriIntents/IntentMessages.swift
+++ b/SiriIntents/IntentMessages.swift
@@ -16,6 +16,7 @@ extension MessageId {
}
}
+@available(iOSApplicationExtension 10.0, *)
func getMessages(account: Account, ids: [MessageId]) -> Signal<[INMessage], NoError> {
return account.postbox.transaction { transaction -> [INMessage] in
var messages: [INMessage] = []
@@ -28,6 +29,7 @@ func getMessages(account: Account, ids: [MessageId]) -> Signal<[INMessage], NoEr
}
}
+@available(iOSApplicationExtension 10.0, *)
func unreadMessages(account: Account) -> Signal<[INMessage], NoError> {
return account.postbox.tailChatListView(groupId: .root, count: 20, summaryComponents: ChatListEntrySummaryComponents())
|> take(1)
@@ -86,6 +88,7 @@ func unreadMessages(account: Account) -> Signal<[INMessage], NoError> {
}
}
+@available(iOSApplicationExtension 10.0, *)
struct CallRecord {
let identifier: String
let date: Date
@@ -99,6 +102,7 @@ struct CallRecord {
}
}
+@available(iOSApplicationExtension 10.0, *)
func missedCalls(account: Account) -> Signal<[CallRecord], NoError> {
return account.viewTracker.callListView(type: .missed, index: MessageIndex.absoluteUpperBound(), count: 30)
|> take(1)
@@ -120,6 +124,7 @@ func missedCalls(account: Account) -> Signal<[CallRecord], NoError> {
}
}
+@available(iOSApplicationExtension 10.0, *)
private func callWithTelegramMessage(_ telegramMessage: Message, account: Account) -> CallRecord? {
guard let author = telegramMessage.author, let user = telegramMessage.peers[author.id] as? TelegramUser else {
return nil
@@ -158,6 +163,7 @@ private func callWithTelegramMessage(_ telegramMessage: Message, account: Accoun
return CallRecord(identifier: identifier, date: date, caller: caller, duration: duration, unseen: true)
}
+@available(iOSApplicationExtension 10.0, *)
private func messageWithTelegramMessage(_ telegramMessage: Message) -> INMessage? {
guard let author = telegramMessage.author, let user = telegramMessage.peers[author.id] as? TelegramUser, user.id.id != 777000 else {
return nil
diff --git a/SupportFiles/Empty.swift b/SupportFiles/Empty.swift
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/SupportFiles/Empty.swift
@@ -0,0 +1 @@
+
diff --git a/Telegram-iOS.xcodeproj/project.pbxproj b/Telegram-iOS.xcodeproj/project.pbxproj
index 6e660a20bb..22fa50dc7d 100644
--- a/Telegram-iOS.xcodeproj/project.pbxproj
+++ b/Telegram-iOS.xcodeproj/project.pbxproj
@@ -219,20 +219,20 @@
09EC5CDA22CBBF9600292E42 /* telegram_plane1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 09EC5CD922CBBF9600292E42 /* telegram_plane1@2x.png */; };
09FDAEE62140477F00BF856F /* MtProtoKitDynamic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09FDAEE52140477F00BF856F /* MtProtoKitDynamic.framework */; };
D000CACF21FB6E380011B15D /* NotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D000CAC821FB6E370011B15D /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
- D001D5AA1F878DA300DF975A /* PhoneCountries.txt in Resources */ = {isa = PBXBuildFile; fileRef = D001D5A91F878DA300DF975A /* PhoneCountries.txt */; };
D008185022B5797A008A895F /* BuildConfig.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D008184F22B5797A008A895F /* BuildConfig.framework */; };
D008185222B57986008A895F /* BuildConfig.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D008185122B57986008A895F /* BuildConfig.framework */; };
D008185422B57994008A895F /* BuildConfig.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D008185322B57994008A895F /* BuildConfig.framework */; };
D008185622B579A1008A895F /* BuildConfig.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D008185522B579A1008A895F /* BuildConfig.framework */; };
D008185822B579AD008A895F /* BuildConfig.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D008185722B579AD008A895F /* BuildConfig.framework */; };
D00818A522B58CCB008A895F /* WatchCommonWatch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D00818A422B58CCB008A895F /* WatchCommonWatch.framework */; };
- D00859A91B28189D00EAF753 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D00859A81B28189D00EAF753 /* Images.xcassets */; };
+ D00859A91B28189D00EAF753 /* Icons.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D00859A81B28189D00EAF753 /* Icons.xcassets */; };
D00859AC1B28189D00EAF753 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D00859AA1B28189D00EAF753 /* LaunchScreen.xib */; };
D00ED75A1FE94630001F38BD /* AppIntentVocabulary.plist in Resources */ = {isa = PBXBuildFile; fileRef = D00ED7581FE94630001F38BD /* AppIntentVocabulary.plist */; };
D00ED75D1FE95287001F38BD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D00ED75B1FE95287001F38BD /* InfoPlist.strings */; };
D015E04D225D2D8F00CB9E8A /* WebP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D015E04C225D2D8F00CB9E8A /* WebP.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
D015E050225D303F00CB9E8A /* WebP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D015E04C225D2D8F00CB9E8A /* WebP.framework */; };
D015E051225D303F00CB9E8A /* WebP.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D015E04C225D2D8F00CB9E8A /* WebP.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ D01748C7231976B200AF3D3A /* LegacyComponentsResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D01748C6231976B100AF3D3A /* LegacyComponentsResources.bundle */; };
D021D4D9219CAEDD0064BEBA /* Config-Fork.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = D021D4D8219CAEDD0064BEBA /* Config-Fork.xcconfig */; };
D02CF5FD215D9ABF00E0F56A /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AA1A671D568BA400152314 /* UserNotifications.framework */; };
D02CF5FE215D9ABF00E0F56A /* UserNotificationsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AA1A691D568BA400152314 /* UserNotificationsUI.framework */; };
@@ -400,8 +400,95 @@
D0E8C2E02285EA6A009F26E8 /* BlackIcon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0E8C2DF2285EA6A009F26E8 /* BlackIcon@3x.png */; };
D0ECCB7F1FE9C38500609802 /* Telegram_iOS_UITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0ECCB7E1FE9C38500609802 /* Telegram_iOS_UITests.swift */; };
D0ECCB8A1FE9C4AC00609802 /* SnapshotHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0ECCB891FE9C4AC00609802 /* SnapshotHelper.swift */; };
+ D0EFF27C2319835B00CF5164 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF27B2319835A00CF5164 /* Images.xcassets */; };
+ D0EFF2D52319838800CF5164 /* PhoneCountries.txt in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF27D2319838400CF5164 /* PhoneCountries.txt */; };
+ D0EFF2D62319838800CF5164 /* currencies.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF27E2319838500CF5164 /* currencies.json */; };
+ D0EFF2D72319838800CF5164 /* Emoji.mapping in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF27F2319838500CF5164 /* Emoji.mapping */; };
+ D0EFF2D82319838800CF5164 /* lol.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2812319838500CF5164 /* lol.tgs */; };
+ D0EFF2D92319838800CF5164 /* thumbsup.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2822319838500CF5164 /* thumbsup.tgs */; };
+ D0EFF2DA2319838800CF5164 /* poker.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2832319838500CF5164 /* poker.tgs */; };
+ D0EFF2DB2319838800CF5164 /* cry.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2842319838500CF5164 /* cry.tgs */; };
+ D0EFF2DC2319838800CF5164 /* meh.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2852319838500CF5164 /* meh.tgs */; };
+ D0EFF2DD2319838800CF5164 /* sad.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2862319838500CF5164 /* sad.tgs */; };
+ D0EFF2DE2319838800CF5164 /* surprised.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2872319838500CF5164 /* surprised.tgs */; };
+ D0EFF2DF2319838800CF5164 /* ok.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2882319838500CF5164 /* ok.tgs */; };
+ D0EFF2E02319838800CF5164 /* heart.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2892319838500CF5164 /* heart.tgs */; };
+ D0EFF2E12319838800CF5164 /* poop.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF28A2319838500CF5164 /* poop.tgs */; };
+ D0EFF2E22319838800CF5164 /* celebrate.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF28B2319838600CF5164 /* celebrate.tgs */; };
+ D0EFF2E32319838800CF5164 /* smile.tgs in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF28C2319838600CF5164 /* smile.tgs */; };
+ D0EFF2E42319838800CF5164 /* ChatWallpaperBuiltin0.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF28D2319838600CF5164 /* ChatWallpaperBuiltin0.jpg */; };
+ D0EFF2E52319838800CF5164 /* stp_card_visa_template@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF28F2319838600CF5164 /* stp_card_visa_template@3x.png */; };
+ D0EFF2E62319838800CF5164 /* stp_card_form_back@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2902319838600CF5164 /* stp_card_form_back@3x.png */; };
+ D0EFF2E72319838800CF5164 /* stp_card_amex@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2912319838600CF5164 /* stp_card_amex@3x.png */; };
+ D0EFF2E82319838800CF5164 /* stp_card_diners@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2922319838600CF5164 /* stp_card_diners@2x.png */; };
+ D0EFF2E92319838800CF5164 /* stp_card_diners_template@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2932319838600CF5164 /* stp_card_diners_template@2x.png */; };
+ D0EFF2EA2319838800CF5164 /* stp_card_amex_template@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2942319838600CF5164 /* stp_card_amex_template@3x.png */; };
+ D0EFF2EB2319838800CF5164 /* stp_card_diners_template@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2952319838600CF5164 /* stp_card_diners_template@3x.png */; };
+ D0EFF2EC2319838800CF5164 /* stp_card_amex_template@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2962319838600CF5164 /* stp_card_amex_template@2x.png */; };
+ D0EFF2ED2319838800CF5164 /* stp_card_diners@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2972319838600CF5164 /* stp_card_diners@3x.png */; };
+ D0EFF2EE2319838800CF5164 /* stp_card_amex@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2982319838600CF5164 /* stp_card_amex@2x.png */; };
+ D0EFF2EF2319838800CF5164 /* stp_card_form_back@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2992319838600CF5164 /* stp_card_form_back@2x.png */; };
+ D0EFF2F02319838800CF5164 /* stp_card_visa_template@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF29A2319838600CF5164 /* stp_card_visa_template@2x.png */; };
+ D0EFF2F12319838800CF5164 /* stp_card_form_front@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF29B2319838600CF5164 /* stp_card_form_front@2x.png */; };
+ D0EFF2F22319838800CF5164 /* stp_card_applepay_template@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF29C2319838600CF5164 /* stp_card_applepay_template@2x.png */; };
+ D0EFF2F32319838800CF5164 /* stp_card_cvc_amex@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF29D2319838600CF5164 /* stp_card_cvc_amex@3x.png */; };
+ D0EFF2F42319838800CF5164 /* stp_card_discover@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF29E2319838600CF5164 /* stp_card_discover@3x.png */; };
+ D0EFF2F52319838800CF5164 /* stp_card_cvc@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF29F2319838600CF5164 /* stp_card_cvc@2x.png */; };
+ D0EFF2F62319838800CF5164 /* stp_card_jcb_template@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A02319838600CF5164 /* stp_card_jcb_template@3x.png */; };
+ D0EFF2F72319838800CF5164 /* stp_card_jcb@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A12319838600CF5164 /* stp_card_jcb@3x.png */; };
+ D0EFF2F82319838800CF5164 /* stp_card_jcb@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A22319838600CF5164 /* stp_card_jcb@2x.png */; };
+ D0EFF2F92319838800CF5164 /* stp_card_cvc@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A32319838600CF5164 /* stp_card_cvc@3x.png */; };
+ D0EFF2FA2319838800CF5164 /* stp_card_jcb_template@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A42319838600CF5164 /* stp_card_jcb_template@2x.png */; };
+ D0EFF2FB2319838800CF5164 /* stp_card_discover@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A52319838600CF5164 /* stp_card_discover@2x.png */; };
+ D0EFF2FC2319838800CF5164 /* stp_card_cvc_amex@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A62319838600CF5164 /* stp_card_cvc_amex@2x.png */; };
+ D0EFF2FD2319838800CF5164 /* stp_card_applepay_template@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A72319838600CF5164 /* stp_card_applepay_template@3x.png */; };
+ D0EFF2FE2319838800CF5164 /* stp_card_form_front@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A82319838600CF5164 /* stp_card_form_front@3x.png */; };
+ D0EFF2FF2319838800CF5164 /* stp_card_visa@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2A92319838600CF5164 /* stp_card_visa@3x.png */; };
+ D0EFF3002319838800CF5164 /* stp_card_placeholder_template@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2AA2319838600CF5164 /* stp_card_placeholder_template@3x.png */; };
+ D0EFF3012319838800CF5164 /* stp_card_applepay@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2AB2319838600CF5164 /* stp_card_applepay@2x.png */; };
+ D0EFF3022319838800CF5164 /* stp_card_applepay@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2AC2319838600CF5164 /* stp_card_applepay@3x.png */; };
+ D0EFF3032319838800CF5164 /* stp_card_placeholder_template@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2AD2319838600CF5164 /* stp_card_placeholder_template@2x.png */; };
+ D0EFF3042319838800CF5164 /* stp_card_visa@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2AE2319838600CF5164 /* stp_card_visa@2x.png */; };
+ D0EFF3052319838800CF5164 /* stp_card_mastercard_template@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2AF2319838600CF5164 /* stp_card_mastercard_template@3x.png */; };
+ D0EFF3062319838800CF5164 /* stp_card_discover_template@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B02319838600CF5164 /* stp_card_discover_template@2x.png */; };
+ D0EFF3072319838800CF5164 /* stp_card_form_applepay@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B12319838600CF5164 /* stp_card_form_applepay@3x.png */; };
+ D0EFF3082319838800CF5164 /* stp_card_mastercard@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B22319838600CF5164 /* stp_card_mastercard@2x.png */; };
+ D0EFF3092319838800CF5164 /* stp_card_mastercard@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B32319838600CF5164 /* stp_card_mastercard@3x.png */; };
+ D0EFF30A2319838800CF5164 /* stp_card_discover_template@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B42319838600CF5164 /* stp_card_discover_template@3x.png */; };
+ D0EFF30B2319838800CF5164 /* stp_card_form_applepay@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B52319838600CF5164 /* stp_card_form_applepay@2x.png */; };
+ D0EFF30C2319838800CF5164 /* stp_card_mastercard_template@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B62319838600CF5164 /* stp_card_mastercard_template@2x.png */; };
+ D0EFF30D2319838800CF5164 /* anim_read.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B82319838700CF5164 /* anim_read.json */; };
+ D0EFF30E2319838800CF5164 /* anim_archive.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2B92319838700CF5164 /* anim_archive.json */; };
+ D0EFF30F2319838800CF5164 /* anim_pin.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2BA2319838700CF5164 /* anim_pin.json */; };
+ D0EFF3102319838800CF5164 /* anim_infotip.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2BB2319838700CF5164 /* anim_infotip.json */; };
+ D0EFF3112319838800CF5164 /* anim_unmute.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2BC2319838700CF5164 /* anim_unmute.json */; };
+ D0EFF3122319838800CF5164 /* anim_unpin.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2BD2319838700CF5164 /* anim_unpin.json */; };
+ D0EFF3132319838800CF5164 /* anim_success.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2BE2319838700CF5164 /* anim_success.json */; };
+ D0EFF3142319838800CF5164 /* anim_unread.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2BF2319838700CF5164 /* anim_unread.json */; };
+ D0EFF3152319838800CF5164 /* anim_archiveswipe.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C02319838700CF5164 /* anim_archiveswipe.json */; };
+ D0EFF3162319838800CF5164 /* anim_delete.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C12319838700CF5164 /* anim_delete.json */; };
+ D0EFF3172319838800CF5164 /* anim_archiveAvatar.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C22319838700CF5164 /* anim_archiveAvatar.json */; };
+ D0EFF3182319838800CF5164 /* anim_unarchive.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C32319838700CF5164 /* anim_unarchive.json */; };
+ D0EFF3192319838800CF5164 /* anim_ungroup.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C42319838700CF5164 /* anim_ungroup.json */; };
+ D0EFF31A2319838800CF5164 /* anim_hide.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C52319838700CF5164 /* anim_hide.json */; };
+ D0EFF31B2319838800CF5164 /* anim_group.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C62319838700CF5164 /* anim_group.json */; };
+ D0EFF31C2319838800CF5164 /* anim_mute.json in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C72319838700CF5164 /* anim_mute.json */; };
+ D0EFF31D2319838800CF5164 /* PresentationStrings.mapping in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2C82319838700CF5164 /* PresentationStrings.mapping */; };
+ D0EFF31E2319838800CF5164 /* VimeoUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2CA2319838700CF5164 /* VimeoUserScript.js */; };
+ D0EFF31F2319838800CF5164 /* TwitchUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2CB2319838700CF5164 /* TwitchUserScript.js */; };
+ D0EFF3202319838800CF5164 /* Youtube.html in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2CC2319838700CF5164 /* Youtube.html */; };
+ D0EFF3212319838800CF5164 /* Twitch.html in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2CD2319838700CF5164 /* Twitch.html */; };
+ D0EFF3222319838800CF5164 /* Vimeo.html in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2CE2319838700CF5164 /* Vimeo.html */; };
+ D0EFF3232319838800CF5164 /* Instagram.html in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2CF2319838700CF5164 /* Instagram.html */; };
+ D0EFF3242319838800CF5164 /* Generic.html in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2D02319838700CF5164 /* Generic.html */; };
+ D0EFF3252319838800CF5164 /* GenericUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2D12319838700CF5164 /* GenericUserScript.js */; };
+ D0EFF3262319838800CF5164 /* YoutubeUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2D22319838700CF5164 /* YoutubeUserScript.js */; };
+ D0EFF3272319838800CF5164 /* SFCompactRounded-Semibold.otf in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF2D42319838700CF5164 /* SFCompactRounded-Semibold.otf */; };
+ D0EFF32B231983BF00CF5164 /* MessageSent.caf in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF329231983BF00CF5164 /* MessageSent.caf */; };
+ D0EFF32C231983BF00CF5164 /* notification.caf in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF32A231983BF00CF5164 /* notification.caf */; };
+ D0EFF33023198D3200CF5164 /* NavigationBackArrowLight@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF32E23198D3200CF5164 /* NavigationBackArrowLight@2x.png */; };
+ D0EFF33123198D3200CF5164 /* NavigationShadow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0EFF32F23198D3200CF5164 /* NavigationShadow@2x.png */; };
D0F575132083B96B00F1C1E1 /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0F575122083B96B00F1C1E1 /* CloudKit.framework */; };
- D0FC1948201D2DA800FEDBB2 /* SFCompactRounded-Semibold.otf in Resources */ = {isa = PBXBuildFile; fileRef = D0FC1947201D2DA700FEDBB2 /* SFCompactRounded-Semibold.otf */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -547,7 +634,6 @@
094DDF5222E8C30F004B0256 /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = Localizable.strings; sourceTree = ""; };
094DDF5422E8C30F004B0256 /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = InfoPlist.strings; sourceTree = ""; };
094DDF5622E8C30F004B0256 /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = id; path = AppIntentVocabulary.plist; sourceTree = ""; };
- 0956AF2B217B4642008106D0 /* WatchCommunicationManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WatchCommunicationManager.swift; sourceTree = ""; };
0956AF2D217B8109008106D0 /* TGNeoUnsupportedMessageViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TGNeoUnsupportedMessageViewModel.h; sourceTree = ""; };
0956AF2E217B8109008106D0 /* TGNeoUnsupportedMessageViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TGNeoUnsupportedMessageViewModel.m; sourceTree = ""; };
0972C6DF21791D950069E98A /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS5.0.sdk/System/Library/Frameworks/UserNotifications.framework; sourceTree = DEVELOPER_DIR; };
@@ -565,11 +651,8 @@
09A4192D22B7A4D400637EB4 /* BlueClassicIconLargeIpad@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "BlueClassicIconLargeIpad@2x.png"; sourceTree = ""; };
09A4192E22B7A4D400637EB4 /* BlackClassicIconIpad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = BlackClassicIconIpad.png; sourceTree = ""; };
09A4192F22B7A4D400637EB4 /* BlackClassicIconIpad@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "BlackClassicIconIpad@2x.png"; sourceTree = ""; };
- 09C50E7921738178009E676F /* TGBridgeServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGBridgeServer.h; sourceTree = ""; };
- 09C50E7A21738178009E676F /* TGBridgeServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGBridgeServer.m; sourceTree = ""; };
09C50E852173854D009E676F /* WatchKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WatchKit.framework; path = System/Library/Frameworks/WatchKit.framework; sourceTree = SDKROOT; };
09C50E87217385CF009E676F /* WatchConnectivity.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WatchConnectivity.framework; path = System/Library/Frameworks/WatchConnectivity.framework; sourceTree = SDKROOT; };
- 09C50E892173AEDB009E676F /* WatchRequestHandlers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchRequestHandlers.swift; sourceTree = ""; };
09C56F8B2172797200BDF00F /* Watch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Watch.app; sourceTree = BUILT_PRODUCTS_DIR; };
09C56F8E2172797200BDF00F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; };
09C56F902172797400BDF00F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
@@ -848,7 +931,6 @@
09C573132172953800BDF00F /* TGBridgeStickerPack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TGBridgeStickerPack.h; path = Bridge/TGBridgeStickerPack.h; sourceTree = ""; };
09C573152172953800BDF00F /* TGBridgeLocationVenue+TGTableItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "TGBridgeLocationVenue+TGTableItem.h"; path = "Bridge/TGBridgeLocationVenue+TGTableItem.h"; sourceTree = ""; };
09CFB211217299E80083F7A3 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS5.0.sdk/System/Library/Frameworks/CoreLocation.framework; sourceTree = DEVELOPER_DIR; };
- 09D304212174335F00C00567 /* WatchBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchBridge.swift; sourceTree = ""; };
09E9600122C23FF000B13673 /* BlackNotificationIcon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "BlackNotificationIcon@3x.png"; sourceTree = ""; };
09E9600222C23FF000B13673 /* BlackNotificationIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = BlackNotificationIcon.png; sourceTree = ""; };
09E9600322C23FF000B13673 /* BlueNotificationIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = BlueNotificationIcon.png; sourceTree = ""; };
@@ -881,7 +963,6 @@
D000CAC221FB6E170011B15D /* NotificationService-AppStore.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "NotificationService-AppStore.entitlements"; sourceTree = ""; };
D000CAC321FB6E170011B15D /* NotificationService-AppStoreLLC.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "NotificationService-AppStoreLLC.entitlements"; sourceTree = ""; };
D000CAC821FB6E370011B15D /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; };
- D001D5A91F878DA300DF975A /* PhoneCountries.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = PhoneCountries.txt; path = "Telegram-iOS/Resources/PhoneCountries.txt"; sourceTree = ""; };
D006CFA121A8D12600FDCD32 /* ModernProto.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ModernProto.framework; path = "../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-ffbqcdyqpehxdvcwhyaorlehrrdc/Build/Products/Debug Hockeyapp-iphoneos/ModernProto.framework"; sourceTree = ""; };
D008184B22B578EC008A895F /* WatchCommon.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WatchCommon.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D008184D22B5796E008A895F /* BuildConfig.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = BuildConfig.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -895,13 +976,14 @@
D00818CE22B595DB008A895F /* LightweightAccountData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = LightweightAccountData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D008599C1B28189D00EAF753 /* Telegram.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Telegram.app; sourceTree = BUILT_PRODUCTS_DIR; };
D00859A01B28189D00EAF753 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- D00859A81B28189D00EAF753 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
+ D00859A81B28189D00EAF753 /* Icons.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Icons.xcassets; sourceTree = ""; };
D00859AB1B28189D00EAF753 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
D00859B61B28189D00EAF753 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
D00859B71B28189D00EAF753 /* Telegram_iOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Telegram_iOSTests.swift; sourceTree = ""; };
D00ED7591FE94630001F38BD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = en; path = en.lproj/AppIntentVocabulary.plist; sourceTree = ""; };
D00ED75C1FE95287001F38BD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
D015E04C225D2D8F00CB9E8A /* WebP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WebP.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D01748C6231976B100AF3D3A /* LegacyComponentsResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = LegacyComponentsResources.bundle; path = submodules/LegacyComponents/LegacyComponents/Resources/LegacyComponentsResources.bundle; sourceTree = ""; };
D01A47521F4DBEB100383CC1 /* libHockeySDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libHockeySDK.a; path = "../../build/HockeySDK-iOS/Support/build/Debug-iphoneos/libHockeySDK.a"; sourceTree = ""; };
D01A47541F4DBED700383CC1 /* HockeySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HockeySDK.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D021D4D7219CAEDD0064BEBA /* Telegram-iOS-Fork.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = "Telegram-iOS-Fork.entitlements"; sourceTree = ""; };
@@ -1129,8 +1211,95 @@
D0ECCB801FE9C38500609802 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
D0ECCB891FE9C4AC00609802 /* SnapshotHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SnapshotHelper.swift; sourceTree = ""; };
D0ED633C21FF3F28001D4648 /* NotificationService-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NotificationService-Bridging-Header.h"; sourceTree = ""; };
+ D0EFF27B2319835A00CF5164 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = submodules/TelegramUI/Images.xcassets; sourceTree = ""; };
+ D0EFF27D2319838400CF5164 /* PhoneCountries.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = PhoneCountries.txt; path = submodules/TelegramUI/TelegramUI/Resources/PhoneCountries.txt; sourceTree = ""; };
+ D0EFF27E2319838500CF5164 /* currencies.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = currencies.json; path = submodules/TelegramUI/TelegramUI/Resources/currencies.json; sourceTree = ""; };
+ D0EFF27F2319838500CF5164 /* Emoji.mapping */ = {isa = PBXFileReference; lastKnownFileType = file; name = Emoji.mapping; path = submodules/TelegramUI/TelegramUI/Resources/Emoji.mapping; sourceTree = ""; };
+ D0EFF2812319838500CF5164 /* lol.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = lol.tgs; sourceTree = ""; };
+ D0EFF2822319838500CF5164 /* thumbsup.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = thumbsup.tgs; sourceTree = ""; };
+ D0EFF2832319838500CF5164 /* poker.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = poker.tgs; sourceTree = ""; };
+ D0EFF2842319838500CF5164 /* cry.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = cry.tgs; sourceTree = ""; };
+ D0EFF2852319838500CF5164 /* meh.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = meh.tgs; sourceTree = ""; };
+ D0EFF2862319838500CF5164 /* sad.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = sad.tgs; sourceTree = ""; };
+ D0EFF2872319838500CF5164 /* surprised.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = surprised.tgs; sourceTree = ""; };
+ D0EFF2882319838500CF5164 /* ok.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = ok.tgs; sourceTree = ""; };
+ D0EFF2892319838500CF5164 /* heart.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = heart.tgs; sourceTree = ""; };
+ D0EFF28A2319838500CF5164 /* poop.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = poop.tgs; sourceTree = ""; };
+ D0EFF28B2319838600CF5164 /* celebrate.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = celebrate.tgs; sourceTree = ""; };
+ D0EFF28C2319838600CF5164 /* smile.tgs */ = {isa = PBXFileReference; lastKnownFileType = file; path = smile.tgs; sourceTree = ""; };
+ D0EFF28D2319838600CF5164 /* ChatWallpaperBuiltin0.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = ChatWallpaperBuiltin0.jpg; path = submodules/TelegramUI/TelegramUI/Resources/ChatWallpaperBuiltin0.jpg; sourceTree = ""; };
+ D0EFF28F2319838600CF5164 /* stp_card_visa_template@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_visa_template@3x.png"; sourceTree = ""; };
+ D0EFF2902319838600CF5164 /* stp_card_form_back@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_form_back@3x.png"; sourceTree = ""; };
+ D0EFF2912319838600CF5164 /* stp_card_amex@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_amex@3x.png"; sourceTree = ""; };
+ D0EFF2922319838600CF5164 /* stp_card_diners@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_diners@2x.png"; sourceTree = ""; };
+ D0EFF2932319838600CF5164 /* stp_card_diners_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_diners_template@2x.png"; sourceTree = ""; };
+ D0EFF2942319838600CF5164 /* stp_card_amex_template@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_amex_template@3x.png"; sourceTree = ""; };
+ D0EFF2952319838600CF5164 /* stp_card_diners_template@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_diners_template@3x.png"; sourceTree = ""; };
+ D0EFF2962319838600CF5164 /* stp_card_amex_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_amex_template@2x.png"; sourceTree = ""; };
+ D0EFF2972319838600CF5164 /* stp_card_diners@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_diners@3x.png"; sourceTree = ""; };
+ D0EFF2982319838600CF5164 /* stp_card_amex@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_amex@2x.png"; sourceTree = ""; };
+ D0EFF2992319838600CF5164 /* stp_card_form_back@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_form_back@2x.png"; sourceTree = ""; };
+ D0EFF29A2319838600CF5164 /* stp_card_visa_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_visa_template@2x.png"; sourceTree = ""; };
+ D0EFF29B2319838600CF5164 /* stp_card_form_front@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_form_front@2x.png"; sourceTree = ""; };
+ D0EFF29C2319838600CF5164 /* stp_card_applepay_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_applepay_template@2x.png"; sourceTree = ""; };
+ D0EFF29D2319838600CF5164 /* stp_card_cvc_amex@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_cvc_amex@3x.png"; sourceTree = ""; };
+ D0EFF29E2319838600CF5164 /* stp_card_discover@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_discover@3x.png"; sourceTree = ""; };
+ D0EFF29F2319838600CF5164 /* stp_card_cvc@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_cvc@2x.png"; sourceTree = ""; };
+ D0EFF2A02319838600CF5164 /* stp_card_jcb_template@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_jcb_template@3x.png"; sourceTree = ""; };
+ D0EFF2A12319838600CF5164 /* stp_card_jcb@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_jcb@3x.png"; sourceTree = ""; };
+ D0EFF2A22319838600CF5164 /* stp_card_jcb@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_jcb@2x.png"; sourceTree = ""; };
+ D0EFF2A32319838600CF5164 /* stp_card_cvc@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_cvc@3x.png"; sourceTree = ""; };
+ D0EFF2A42319838600CF5164 /* stp_card_jcb_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_jcb_template@2x.png"; sourceTree = ""; };
+ D0EFF2A52319838600CF5164 /* stp_card_discover@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_discover@2x.png"; sourceTree = ""; };
+ D0EFF2A62319838600CF5164 /* stp_card_cvc_amex@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_cvc_amex@2x.png"; sourceTree = ""; };
+ D0EFF2A72319838600CF5164 /* stp_card_applepay_template@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_applepay_template@3x.png"; sourceTree = ""; };
+ D0EFF2A82319838600CF5164 /* stp_card_form_front@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_form_front@3x.png"; sourceTree = ""; };
+ D0EFF2A92319838600CF5164 /* stp_card_visa@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_visa@3x.png"; sourceTree = ""; };
+ D0EFF2AA2319838600CF5164 /* stp_card_placeholder_template@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_placeholder_template@3x.png"; sourceTree = ""; };
+ D0EFF2AB2319838600CF5164 /* stp_card_applepay@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_applepay@2x.png"; sourceTree = ""; };
+ D0EFF2AC2319838600CF5164 /* stp_card_applepay@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_applepay@3x.png"; sourceTree = ""; };
+ D0EFF2AD2319838600CF5164 /* stp_card_placeholder_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_placeholder_template@2x.png"; sourceTree = ""; };
+ D0EFF2AE2319838600CF5164 /* stp_card_visa@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_visa@2x.png"; sourceTree = ""; };
+ D0EFF2AF2319838600CF5164 /* stp_card_mastercard_template@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_mastercard_template@3x.png"; sourceTree = ""; };
+ D0EFF2B02319838600CF5164 /* stp_card_discover_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_discover_template@2x.png"; sourceTree = ""; };
+ D0EFF2B12319838600CF5164 /* stp_card_form_applepay@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_form_applepay@3x.png"; sourceTree = ""; };
+ D0EFF2B22319838600CF5164 /* stp_card_mastercard@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_mastercard@2x.png"; sourceTree = ""; };
+ D0EFF2B32319838600CF5164 /* stp_card_mastercard@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_mastercard@3x.png"; sourceTree = ""; };
+ D0EFF2B42319838600CF5164 /* stp_card_discover_template@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_discover_template@3x.png"; sourceTree = ""; };
+ D0EFF2B52319838600CF5164 /* stp_card_form_applepay@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_form_applepay@2x.png"; sourceTree = ""; };
+ D0EFF2B62319838600CF5164 /* stp_card_mastercard_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_mastercard_template@2x.png"; sourceTree = ""; };
+ D0EFF2B82319838700CF5164 /* anim_read.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_read.json; sourceTree = ""; };
+ D0EFF2B92319838700CF5164 /* anim_archive.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_archive.json; sourceTree = ""; };
+ D0EFF2BA2319838700CF5164 /* anim_pin.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_pin.json; sourceTree = ""; };
+ D0EFF2BB2319838700CF5164 /* anim_infotip.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_infotip.json; sourceTree = ""; };
+ D0EFF2BC2319838700CF5164 /* anim_unmute.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_unmute.json; sourceTree = ""; };
+ D0EFF2BD2319838700CF5164 /* anim_unpin.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_unpin.json; sourceTree = ""; };
+ D0EFF2BE2319838700CF5164 /* anim_success.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_success.json; sourceTree = ""; };
+ D0EFF2BF2319838700CF5164 /* anim_unread.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_unread.json; sourceTree = ""; };
+ D0EFF2C02319838700CF5164 /* anim_archiveswipe.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_archiveswipe.json; sourceTree = ""; };
+ D0EFF2C12319838700CF5164 /* anim_delete.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_delete.json; sourceTree = ""; };
+ D0EFF2C22319838700CF5164 /* anim_archiveAvatar.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_archiveAvatar.json; sourceTree = ""; };
+ D0EFF2C32319838700CF5164 /* anim_unarchive.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_unarchive.json; sourceTree = ""; };
+ D0EFF2C42319838700CF5164 /* anim_ungroup.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_ungroup.json; sourceTree = ""; };
+ D0EFF2C52319838700CF5164 /* anim_hide.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_hide.json; sourceTree = ""; };
+ D0EFF2C62319838700CF5164 /* anim_group.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_group.json; sourceTree = ""; };
+ D0EFF2C72319838700CF5164 /* anim_mute.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = anim_mute.json; sourceTree = ""; };
+ D0EFF2C82319838700CF5164 /* PresentationStrings.mapping */ = {isa = PBXFileReference; lastKnownFileType = file; name = PresentationStrings.mapping; path = submodules/TelegramUI/TelegramUI/Resources/PresentationStrings.mapping; sourceTree = ""; };
+ D0EFF2CA2319838700CF5164 /* VimeoUserScript.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = VimeoUserScript.js; sourceTree = ""; };
+ D0EFF2CB2319838700CF5164 /* TwitchUserScript.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = TwitchUserScript.js; sourceTree = ""; };
+ D0EFF2CC2319838700CF5164 /* Youtube.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Youtube.html; sourceTree = ""; };
+ D0EFF2CD2319838700CF5164 /* Twitch.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Twitch.html; sourceTree = ""; };
+ D0EFF2CE2319838700CF5164 /* Vimeo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Vimeo.html; sourceTree = ""; };
+ D0EFF2CF2319838700CF5164 /* Instagram.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Instagram.html; sourceTree = ""; };
+ D0EFF2D02319838700CF5164 /* Generic.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Generic.html; sourceTree = ""; };
+ D0EFF2D12319838700CF5164 /* GenericUserScript.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = GenericUserScript.js; sourceTree = ""; };
+ D0EFF2D22319838700CF5164 /* YoutubeUserScript.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = YoutubeUserScript.js; sourceTree = ""; };
+ D0EFF2D42319838700CF5164 /* SFCompactRounded-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SFCompactRounded-Semibold.otf"; sourceTree = ""; };
+ D0EFF329231983BF00CF5164 /* MessageSent.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = MessageSent.caf; sourceTree = ""; };
+ D0EFF32A231983BF00CF5164 /* notification.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = notification.caf; sourceTree = ""; };
+ D0EFF32E23198D3200CF5164 /* NavigationBackArrowLight@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "NavigationBackArrowLight@2x.png"; path = "Telegram-iOS/Resources/NavigationBackArrowLight@2x.png"; sourceTree = ""; };
+ D0EFF32F23198D3200CF5164 /* NavigationShadow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "NavigationShadow@2x.png"; path = "Telegram-iOS/Resources/NavigationShadow@2x.png"; sourceTree = ""; };
D0F575122083B96B00F1C1E1 /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; };
- D0FC1947201D2DA700FEDBB2 /* SFCompactRounded-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "SFCompactRounded-Semibold.otf"; path = "Telegram-iOS/Resources/SFCompactRounded-Semibold.otf"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -1369,18 +1538,6 @@
name = "App Icons";
sourceTree = "";
};
- 09C50E7821738150009E676F /* Watch */ = {
- isa = PBXGroup;
- children = (
- 0956AF2B217B4642008106D0 /* WatchCommunicationManager.swift */,
- 09C50E892173AEDB009E676F /* WatchRequestHandlers.swift */,
- 09D304212174335F00C00567 /* WatchBridge.swift */,
- 09C50E7921738178009E676F /* TGBridgeServer.h */,
- 09C50E7A21738178009E676F /* TGBridgeServer.m */,
- );
- name = Watch;
- sourceTree = "";
- };
09C56F8C2172797200BDF00F /* Watch */ = {
isa = PBXGroup;
children = (
@@ -1945,13 +2102,12 @@
children = (
09A218E122A14E5600DE6898 /* App Icons */,
D0338729223A8347007A2CE4 /* Config */,
- 09C50E7821738150009E676F /* Watch */,
D021D4D8219CAEDD0064BEBA /* Config-Fork.xcconfig */,
D0ADF913212B398000310BBC /* Telegram-iOS-AppStoreLLC.entitlements */,
D079FD001F06BBD10038FADE /* Telegram-iOS-AppStore.entitlements */,
D0E3A7071B285B5000A402D9 /* Telegram-iOS-Hockeyapp.entitlements */,
D021D4D7219CAEDD0064BEBA /* Telegram-iOS-Fork.entitlements */,
- D00859A81B28189D00EAF753 /* Images.xcassets */,
+ D00859A81B28189D00EAF753 /* Icons.xcassets */,
D00859AA1B28189D00EAF753 /* LaunchScreen.xib */,
D008599F1B28189D00EAF753 /* Supporting Files */,
);
@@ -2085,14 +2241,27 @@
D023EBB31DDB2F0E00BD496D /* Resources */ = {
isa = PBXGroup;
children = (
+ D0EFF32E23198D3200CF5164 /* NavigationBackArrowLight@2x.png */,
+ D0EFF32F23198D3200CF5164 /* NavigationShadow@2x.png */,
+ D0EFF328231983BF00CF5164 /* Sounds */,
+ D0EFF2B72319838700CF5164 /* Animations */,
+ D0EFF2802319838500CF5164 /* BuiltinReactions */,
+ D0EFF28D2319838600CF5164 /* ChatWallpaperBuiltin0.jpg */,
+ D0EFF27E2319838500CF5164 /* currencies.json */,
+ D0EFF27F2319838500CF5164 /* Emoji.mapping */,
+ D0EFF2D32319838700CF5164 /* Fonts */,
+ D0EFF27D2319838400CF5164 /* PhoneCountries.txt */,
+ D0EFF2C82319838700CF5164 /* PresentationStrings.mapping */,
+ D0EFF28E2319838600CF5164 /* Stripe */,
+ D0EFF2C92319838700CF5164 /* WebEmbed */,
+ D0EFF27B2319835A00CF5164 /* Images.xcassets */,
+ D01748C6231976B100AF3D3A /* LegacyComponentsResources.bundle */,
D0E8B8AC2044496C00605593 /* voip_busy.caf */,
D0E8B8A82044496B00605593 /* voip_connecting.mp3 */,
D0E8B8A92044496C00605593 /* voip_end.caf */,
D0E8B8AA2044496C00605593 /* voip_fail.caf */,
D0E8B8AB2044496C00605593 /* voip_ringback.caf */,
- D0FC1947201D2DA700FEDBB2 /* SFCompactRounded-Semibold.otf */,
D0CFBB921FD88C2900B65C0D /* begin_record.caf */,
- D001D5A91F878DA300DF975A /* PhoneCountries.txt */,
D04DCC0A1F71C80000B021D7 /* notifications */,
D050F21B1E49DEDE00988324 /* intro */,
);
@@ -2480,6 +2649,134 @@
path = "Telegram-iOS UITests";
sourceTree = "";
};
+ D0EFF2802319838500CF5164 /* BuiltinReactions */ = {
+ isa = PBXGroup;
+ children = (
+ D0EFF2812319838500CF5164 /* lol.tgs */,
+ D0EFF2822319838500CF5164 /* thumbsup.tgs */,
+ D0EFF2832319838500CF5164 /* poker.tgs */,
+ D0EFF2842319838500CF5164 /* cry.tgs */,
+ D0EFF2852319838500CF5164 /* meh.tgs */,
+ D0EFF2862319838500CF5164 /* sad.tgs */,
+ D0EFF2872319838500CF5164 /* surprised.tgs */,
+ D0EFF2882319838500CF5164 /* ok.tgs */,
+ D0EFF2892319838500CF5164 /* heart.tgs */,
+ D0EFF28A2319838500CF5164 /* poop.tgs */,
+ D0EFF28B2319838600CF5164 /* celebrate.tgs */,
+ D0EFF28C2319838600CF5164 /* smile.tgs */,
+ );
+ name = BuiltinReactions;
+ path = submodules/TelegramUI/TelegramUI/Resources/BuiltinReactions;
+ sourceTree = "";
+ };
+ D0EFF28E2319838600CF5164 /* Stripe */ = {
+ isa = PBXGroup;
+ children = (
+ D0EFF28F2319838600CF5164 /* stp_card_visa_template@3x.png */,
+ D0EFF2902319838600CF5164 /* stp_card_form_back@3x.png */,
+ D0EFF2912319838600CF5164 /* stp_card_amex@3x.png */,
+ D0EFF2922319838600CF5164 /* stp_card_diners@2x.png */,
+ D0EFF2932319838600CF5164 /* stp_card_diners_template@2x.png */,
+ D0EFF2942319838600CF5164 /* stp_card_amex_template@3x.png */,
+ D0EFF2952319838600CF5164 /* stp_card_diners_template@3x.png */,
+ D0EFF2962319838600CF5164 /* stp_card_amex_template@2x.png */,
+ D0EFF2972319838600CF5164 /* stp_card_diners@3x.png */,
+ D0EFF2982319838600CF5164 /* stp_card_amex@2x.png */,
+ D0EFF2992319838600CF5164 /* stp_card_form_back@2x.png */,
+ D0EFF29A2319838600CF5164 /* stp_card_visa_template@2x.png */,
+ D0EFF29B2319838600CF5164 /* stp_card_form_front@2x.png */,
+ D0EFF29C2319838600CF5164 /* stp_card_applepay_template@2x.png */,
+ D0EFF29D2319838600CF5164 /* stp_card_cvc_amex@3x.png */,
+ D0EFF29E2319838600CF5164 /* stp_card_discover@3x.png */,
+ D0EFF29F2319838600CF5164 /* stp_card_cvc@2x.png */,
+ D0EFF2A02319838600CF5164 /* stp_card_jcb_template@3x.png */,
+ D0EFF2A12319838600CF5164 /* stp_card_jcb@3x.png */,
+ D0EFF2A22319838600CF5164 /* stp_card_jcb@2x.png */,
+ D0EFF2A32319838600CF5164 /* stp_card_cvc@3x.png */,
+ D0EFF2A42319838600CF5164 /* stp_card_jcb_template@2x.png */,
+ D0EFF2A52319838600CF5164 /* stp_card_discover@2x.png */,
+ D0EFF2A62319838600CF5164 /* stp_card_cvc_amex@2x.png */,
+ D0EFF2A72319838600CF5164 /* stp_card_applepay_template@3x.png */,
+ D0EFF2A82319838600CF5164 /* stp_card_form_front@3x.png */,
+ D0EFF2A92319838600CF5164 /* stp_card_visa@3x.png */,
+ D0EFF2AA2319838600CF5164 /* stp_card_placeholder_template@3x.png */,
+ D0EFF2AB2319838600CF5164 /* stp_card_applepay@2x.png */,
+ D0EFF2AC2319838600CF5164 /* stp_card_applepay@3x.png */,
+ D0EFF2AD2319838600CF5164 /* stp_card_placeholder_template@2x.png */,
+ D0EFF2AE2319838600CF5164 /* stp_card_visa@2x.png */,
+ D0EFF2AF2319838600CF5164 /* stp_card_mastercard_template@3x.png */,
+ D0EFF2B02319838600CF5164 /* stp_card_discover_template@2x.png */,
+ D0EFF2B12319838600CF5164 /* stp_card_form_applepay@3x.png */,
+ D0EFF2B22319838600CF5164 /* stp_card_mastercard@2x.png */,
+ D0EFF2B32319838600CF5164 /* stp_card_mastercard@3x.png */,
+ D0EFF2B42319838600CF5164 /* stp_card_discover_template@3x.png */,
+ D0EFF2B52319838600CF5164 /* stp_card_form_applepay@2x.png */,
+ D0EFF2B62319838600CF5164 /* stp_card_mastercard_template@2x.png */,
+ );
+ name = Stripe;
+ path = submodules/TelegramUI/TelegramUI/Resources/Stripe;
+ sourceTree = "";
+ };
+ D0EFF2B72319838700CF5164 /* Animations */ = {
+ isa = PBXGroup;
+ children = (
+ D0EFF2B82319838700CF5164 /* anim_read.json */,
+ D0EFF2B92319838700CF5164 /* anim_archive.json */,
+ D0EFF2BA2319838700CF5164 /* anim_pin.json */,
+ D0EFF2BB2319838700CF5164 /* anim_infotip.json */,
+ D0EFF2BC2319838700CF5164 /* anim_unmute.json */,
+ D0EFF2BD2319838700CF5164 /* anim_unpin.json */,
+ D0EFF2BE2319838700CF5164 /* anim_success.json */,
+ D0EFF2BF2319838700CF5164 /* anim_unread.json */,
+ D0EFF2C02319838700CF5164 /* anim_archiveswipe.json */,
+ D0EFF2C12319838700CF5164 /* anim_delete.json */,
+ D0EFF2C22319838700CF5164 /* anim_archiveAvatar.json */,
+ D0EFF2C32319838700CF5164 /* anim_unarchive.json */,
+ D0EFF2C42319838700CF5164 /* anim_ungroup.json */,
+ D0EFF2C52319838700CF5164 /* anim_hide.json */,
+ D0EFF2C62319838700CF5164 /* anim_group.json */,
+ D0EFF2C72319838700CF5164 /* anim_mute.json */,
+ );
+ name = Animations;
+ path = submodules/TelegramUI/TelegramUI/Resources/Animations;
+ sourceTree = "";
+ };
+ D0EFF2C92319838700CF5164 /* WebEmbed */ = {
+ isa = PBXGroup;
+ children = (
+ D0EFF2CA2319838700CF5164 /* VimeoUserScript.js */,
+ D0EFF2CB2319838700CF5164 /* TwitchUserScript.js */,
+ D0EFF2CC2319838700CF5164 /* Youtube.html */,
+ D0EFF2CD2319838700CF5164 /* Twitch.html */,
+ D0EFF2CE2319838700CF5164 /* Vimeo.html */,
+ D0EFF2CF2319838700CF5164 /* Instagram.html */,
+ D0EFF2D02319838700CF5164 /* Generic.html */,
+ D0EFF2D12319838700CF5164 /* GenericUserScript.js */,
+ D0EFF2D22319838700CF5164 /* YoutubeUserScript.js */,
+ );
+ name = WebEmbed;
+ path = submodules/TelegramUI/TelegramUI/Resources/WebEmbed;
+ sourceTree = "";
+ };
+ D0EFF2D32319838700CF5164 /* Fonts */ = {
+ isa = PBXGroup;
+ children = (
+ D0EFF2D42319838700CF5164 /* SFCompactRounded-Semibold.otf */,
+ );
+ name = Fonts;
+ path = submodules/TelegramUI/TelegramUI/Resources/Fonts;
+ sourceTree = "";
+ };
+ D0EFF328231983BF00CF5164 /* Sounds */ = {
+ isa = PBXGroup;
+ children = (
+ D0EFF329231983BF00CF5164 /* MessageSent.caf */,
+ D0EFF32A231983BF00CF5164 /* notification.caf */,
+ );
+ name = Sounds;
+ path = submodules/TelegramUI/TelegramUI/Sounds;
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -2827,21 +3124,32 @@
buildActionMask = 2147483647;
files = (
D0CE6F6B213EDA4400BCD44B /* InfoPlist.strings in Resources */,
+ D0EFF2E02319838800CF5164 /* heart.tgs in Resources */,
D08DB0AC213F4D1D00F2ADBF /* ic_bubble_dot@2x.png in Resources */,
D08DB0B0213F4D1D00F2ADBF /* ic_pin@2x.png in Resources */,
D04DCC211F71C80000B021D7 /* 0.m4a in Resources */,
D04DCC261F71C80000B021D7 /* 103.m4a in Resources */,
09A218F222A1570A00DE6898 /* BlueFilledIcon@2x.png in Resources */,
+ D0EFF2EC2319838800CF5164 /* stp_card_amex_template@2x.png in Resources */,
+ D0EFF30B2319838800CF5164 /* stp_card_form_applepay@2x.png in Resources */,
+ D0EFF2F52319838800CF5164 /* stp_card_cvc@2x.png in Resources */,
09E9600922C23FF200B13673 /* BlueNotificationIcon.png in Resources */,
+ D0EFF30F2319838800CF5164 /* anim_pin.json in Resources */,
090E777722A6945900CD99F5 /* BlueClassicIcon@2x.png in Resources */,
D0CE6F69213EDA4400BCD44B /* AppIntentVocabulary.plist in Resources */,
D08DB0C0213F4D1D00F2ADBF /* telegram_sphere@2x.png in Resources */,
+ D0EFF3062319838800CF5164 /* stp_card_discover_template@2x.png in Resources */,
D08DB0AB213F4D1D00F2ADBF /* ic_bubble@2x.png in Resources */,
+ D0EFF32C231983BF00CF5164 /* notification.caf in Resources */,
D04DCC341F71C80000B021D7 /* 7.m4a in Resources */,
09E9600722C23FF200B13673 /* BlackNotificationIcon@3x.png in Resources */,
09EBE2A522B004EA00F670AB /* BlueFilledIconIpad.png in Resources */,
094DDF5C22E8C310004B0256 /* AppIntentVocabulary.plist in Resources */,
094DDF3C22E7A98E004B0256 /* Localizable.strings in Resources */,
+ D0EFF2F62319838800CF5164 /* stp_card_jcb_template@3x.png in Resources */,
+ D0EFF2D92319838800CF5164 /* thumbsup.tgs in Resources */,
+ D0EFF3022319838800CF5164 /* stp_card_applepay@3x.png in Resources */,
+ D0EFF2E62319838800CF5164 /* stp_card_form_back@3x.png in Resources */,
094DDF3422E7A61B004B0256 /* AppIntentVocabulary.plist in Resources */,
D0CE6F60213EDA4400BCD44B /* AppIntentVocabulary.plist in Resources */,
D0CE6F63213EDA4400BCD44B /* AppIntentVocabulary.plist in Resources */,
@@ -2855,21 +3163,40 @@
D0CE6F68213EDA4400BCD44B /* InfoPlist.strings in Resources */,
09A218EE22A1570A00DE6898 /* BlueFilledIcon@3x.png in Resources */,
09E9600C22C23FF200B13673 /* BlueNotificationIcon@3x.png in Resources */,
+ D0EFF2FE2319838800CF5164 /* stp_card_form_front@3x.png in Resources */,
09E9601422C2441000B13673 /* BlackClassicNotificationIcon@3x.png in Resources */,
D0CE6F6A213EDA4400BCD44B /* Localizable.strings in Resources */,
+ D0EFF3132319838800CF5164 /* anim_success.json in Resources */,
+ D0EFF3212319838800CF5164 /* Twitch.html in Resources */,
+ D0EFF2FF2319838800CF5164 /* stp_card_visa@3x.png in Resources */,
+ D0EFF2F02319838800CF5164 /* stp_card_visa_template@2x.png in Resources */,
09A4193522B7A4D500637EB4 /* BlackClassicIconIpad@2x.png in Resources */,
+ D0EFF3122319838800CF5164 /* anim_unpin.json in Resources */,
+ D0EFF3112319838800CF5164 /* anim_unmute.json in Resources */,
+ D0EFF2E32319838800CF5164 /* smile.tgs in Resources */,
+ D0EFF3142319838800CF5164 /* anim_unread.json in Resources */,
09E9601622C2441000B13673 /* BlueClassicNotificationIcon@2x.png in Resources */,
+ D0EFF2D52319838800CF5164 /* PhoneCountries.txt in Resources */,
09E9601322C2441000B13673 /* BlackClassicNotificationIcon@2x.png in Resources */,
+ D0EFF3052319838800CF5164 /* stp_card_mastercard_template@3x.png in Resources */,
D0E8C2DE2285EA55009F26E8 /* BlackIcon@2x.png in Resources */,
+ D0EFF3272319838800CF5164 /* SFCompactRounded-Semibold.otf in Resources */,
D09DCBB71D0C856B00F51FFE /* Localizable.strings in Resources */,
094DDF5722E8C310004B0256 /* Localizable.strings in Resources */,
+ D0EFF2E92319838800CF5164 /* stp_card_diners_template@2x.png in Resources */,
D0CE6F66213EDA4400BCD44B /* AppIntentVocabulary.plist in Resources */,
+ D0EFF2E72319838800CF5164 /* stp_card_amex@3x.png in Resources */,
D08DB0B8213F4D1D00F2ADBF /* powerful_mask@2x.png in Resources */,
D08DB0B4213F4D1D00F2ADBF /* knot_down@2x.png in Resources */,
+ D0EFF2DB2319838800CF5164 /* cry.tgs in Resources */,
+ D0EFF2F72319838800CF5164 /* stp_card_jcb@3x.png in Resources */,
094DDF4822E7A9A8004B0256 /* AppIntentVocabulary.plist in Resources */,
09EC5CDA22CBBF9600292E42 /* telegram_plane1@2x.png in Resources */,
+ D0EFF3082319838800CF5164 /* stp_card_mastercard@2x.png in Resources */,
D08DB0BC213F4D1D00F2ADBF /* start_arrow@2x.png in Resources */,
+ D0EFF2FB2319838800CF5164 /* stp_card_discover@2x.png in Resources */,
D08DB0B6213F4D1D00F2ADBF /* powerful_infinity@2x.png in Resources */,
+ D0EFF3042319838800CF5164 /* stp_card_visa@2x.png in Resources */,
094DDF5B22E8C310004B0256 /* InfoPlist.strings in Resources */,
09EBE2AA22B004EA00F670AB /* BlueIconLargeIpad@2x.png in Resources */,
D0CE6F5B213EDA4400BCD44B /* Localizable.strings in Resources */,
@@ -2877,10 +3204,13 @@
094DDF5922E8C310004B0256 /* AppIntentVocabulary.plist in Resources */,
09A4193422B7A4D500637EB4 /* BlackClassicIconIpad.png in Resources */,
094DDF4622E7A9A8004B0256 /* Localizable.strings in Resources */,
+ D0EFF27C2319835B00CF5164 /* Images.xcassets in Resources */,
09A4193222B7A4D500637EB4 /* BlueClassicIconIpad.png in Resources */,
+ D0EFF2D82319838800CF5164 /* lol.tgs in Resources */,
D0CE6F62213EDA4400BCD44B /* InfoPlist.strings in Resources */,
D08DB0A8213F4D1D00F2ADBF /* fast_arrow_shadow@2x.png in Resources */,
D0CFBB931FD88C2900B65C0D /* begin_record.caf in Resources */,
+ D0EFF3002319838800CF5164 /* stp_card_placeholder_template@3x.png in Resources */,
D04DCC2C1F71C80000B021D7 /* 109.m4a in Resources */,
D08DB0BD213F4D1D00F2ADBF /* start_arrow_ipad.png in Resources */,
09EBE2AB22B004EA00F670AB /* BlackIconLargeIpad@2x.png in Resources */,
@@ -2888,92 +3218,146 @@
D0CE6F64213EDA4400BCD44B /* Localizable.strings in Resources */,
D0CE6F6C213EDA4400BCD44B /* AppIntentVocabulary.plist in Resources */,
094DDF3E22E7A98E004B0256 /* AppIntentVocabulary.plist in Resources */,
+ D0EFF3252319838800CF5164 /* GenericUserScript.js in Resources */,
094DDF3D22E7A98E004B0256 /* InfoPlist.strings in Resources */,
D04DCC231F71C80000B021D7 /* 100.m4a in Resources */,
+ D0EFF2EF2319838800CF5164 /* stp_card_form_back@2x.png in Resources */,
+ D0EFF33123198D3200CF5164 /* NavigationShadow@2x.png in Resources */,
+ D0EFF31D2319838800CF5164 /* PresentationStrings.mapping in Resources */,
+ D0EFF2EE2319838800CF5164 /* stp_card_amex@2x.png in Resources */,
09E9600A22C23FF200B13673 /* BlueNotificationIcon@2x.png in Resources */,
094DDF3222E7A61B004B0256 /* Localizable.strings in Resources */,
09A218EF22A1570A00DE6898 /* BlueIcon@2x.png in Resources */,
D04DCC281F71C80000B021D7 /* 105.m4a in Resources */,
+ D0EFF32B231983BF00CF5164 /* MessageSent.caf in Resources */,
D08DB0BB213F4D1D00F2ADBF /* private_screw@2x.png in Resources */,
D0CE6F5F213EDA4400BCD44B /* InfoPlist.strings in Resources */,
+ D0EFF2EA2319838800CF5164 /* stp_card_amex_template@3x.png in Resources */,
D04DCC2D1F71C80000B021D7 /* 110.m4a in Resources */,
094DDF5A22E8C310004B0256 /* Localizable.strings in Resources */,
+ D0EFF2DF2319838800CF5164 /* ok.tgs in Resources */,
D04DCC2B1F71C80000B021D7 /* 108.m4a in Resources */,
D00859AC1B28189D00EAF753 /* LaunchScreen.xib in Resources */,
D08DB0B5213F4D1D00F2ADBF /* knot_up1@2x.png in Resources */,
D0E8B8AD2044496C00605593 /* voip_connecting.mp3 in Resources */,
+ D0EFF31F2319838800CF5164 /* TwitchUserScript.js in Resources */,
+ D0EFF2F42319838800CF5164 /* stp_card_discover@3x.png in Resources */,
D08DB0BE213F4D1D00F2ADBF /* start_arrow_ipad@2x.png in Resources */,
D08DB0A9213F4D1D00F2ADBF /* fast_body@2x.png in Resources */,
D04DCC321F71C80000B021D7 /* 5.m4a in Resources */,
D04DCC241F71C80000B021D7 /* 101.m4a in Resources */,
09A4193122B7A4D500637EB4 /* BlackClassicIconLargeIpad@2x.png in Resources */,
+ D0EFF3262319838800CF5164 /* YoutubeUserScript.js in Resources */,
+ D0EFF2E42319838800CF5164 /* ChatWallpaperBuiltin0.jpg in Resources */,
D04DCC351F71C80000B021D7 /* 8.m4a in Resources */,
+ D0EFF3182319838800CF5164 /* anim_unarchive.json in Resources */,
+ D0EFF2DA2319838800CF5164 /* poker.tgs in Resources */,
D08DB0B1213F4D1D00F2ADBF /* ic_smile@2x.png in Resources */,
+ D0EFF3102319838800CF5164 /* anim_infotip.json in Resources */,
+ D0EFF2DC2319838800CF5164 /* meh.tgs in Resources */,
09EBE2A722B004EA00F670AB /* BlueIconIpad.png in Resources */,
+ D0EFF33023198D3200CF5164 /* NavigationBackArrowLight@2x.png in Resources */,
D0CE6F57213EDA4400BCD44B /* AppIntentVocabulary.plist in Resources */,
+ D0EFF2FD2319838800CF5164 /* stp_card_applepay_template@3x.png in Resources */,
D0CE6F59213EDA4400BCD44B /* InfoPlist.strings in Resources */,
D08DB0B9213F4D1D00F2ADBF /* powerful_star@2x.png in Resources */,
D04DCC271F71C80000B021D7 /* 104.m4a in Resources */,
09E9600B22C23FF200B13673 /* BlackNotificationIcon@2x.png in Resources */,
090E777522A6945900CD99F5 /* BlueClassicIcon@3x.png in Resources */,
+ D0EFF2F92319838800CF5164 /* stp_card_cvc@3x.png in Resources */,
+ D0EFF2FA2319838800CF5164 /* stp_card_jcb_template@2x.png in Resources */,
+ D0EFF2F12319838800CF5164 /* stp_card_form_front@2x.png in Resources */,
09A218F122A1570A00DE6898 /* BlackFilledIcon@3x.png in Resources */,
D04DCC2A1F71C80000B021D7 /* 107.m4a in Resources */,
D08DB0BA213F4D1D00F2ADBF /* private_door@2x.png in Resources */,
+ D0EFF2E52319838800CF5164 /* stp_card_visa_template@3x.png in Resources */,
09A218F022A1570A00DE6898 /* BlackFilledIcon@2x.png in Resources */,
+ D0EFF30C2319838800CF5164 /* stp_card_mastercard_template@2x.png in Resources */,
D08DB0AE213F4D1D00F2ADBF /* ic_cam_lens@2x.png in Resources */,
+ D0EFF3192319838800CF5164 /* anim_ungroup.json in Resources */,
+ D0EFF30D2319838800CF5164 /* anim_read.json in Resources */,
+ D0EFF2D72319838800CF5164 /* Emoji.mapping in Resources */,
+ D0EFF3202319838800CF5164 /* Youtube.html in Resources */,
09A218F322A1570A00DE6898 /* BlueIcon@3x.png in Resources */,
+ D0EFF2F32319838800CF5164 /* stp_card_cvc_amex@3x.png in Resources */,
+ D0EFF2D62319838800CF5164 /* currencies.json in Resources */,
D04DCC2F1F71C80000B021D7 /* 2.m4a in Resources */,
+ D0EFF2DE2319838800CF5164 /* surprised.tgs in Resources */,
09EBE2AC22B004EA00F670AB /* BlackIconIpad.png in Resources */,
+ D0EFF2E12319838800CF5164 /* poop.tgs in Resources */,
+ D0EFF31B2319838800CF5164 /* anim_group.json in Resources */,
09EBE2B022B004EA00F670AB /* BlueFilledIconLargeIpad@2x.png in Resources */,
+ D0EFF3222319838800CF5164 /* Vimeo.html in Resources */,
+ D0EFF2E22319838800CF5164 /* celebrate.tgs in Resources */,
D0CE6F58213EDA4400BCD44B /* Localizable.strings in Resources */,
D08DB0AF213F4D1D00F2ADBF /* ic_pencil@2x.png in Resources */,
094DDF5822E8C310004B0256 /* InfoPlist.strings in Resources */,
+ D0EFF2DD2319838800CF5164 /* sad.tgs in Resources */,
09E9601822C2441000B13673 /* BlueClassicNotificationIcon@3x.png in Resources */,
+ D01748C7231976B200AF3D3A /* LegacyComponentsResources.bundle in Resources */,
D0CE6F67213EDA4400BCD44B /* Localizable.strings in Resources */,
+ D0EFF3242319838800CF5164 /* Generic.html in Resources */,
09A4193322B7A4D500637EB4 /* BlueClassicIconLargeIpad@2x.png in Resources */,
D04DCC291F71C80000B021D7 /* 106.m4a in Resources */,
D0CE6F5E213EDA4400BCD44B /* Localizable.strings in Resources */,
D052974622B0073F004ABAF6 /* WhiteFilledIcon@3x.png in Resources */,
D08DB0B7213F4D1D00F2ADBF /* powerful_infinity_white@2x.png in Resources */,
- D00859A91B28189D00EAF753 /* Images.xcassets in Resources */,
+ D00859A91B28189D00EAF753 /* Icons.xcassets in Resources */,
094DDF0922E7A0D3004B0256 /* InfoPlist.strings in Resources */,
- D001D5AA1F878DA300DF975A /* PhoneCountries.txt in Resources */,
+ D0EFF3172319838800CF5164 /* anim_archiveAvatar.json in Resources */,
+ D0EFF3092319838800CF5164 /* stp_card_mastercard@3x.png in Resources */,
+ D0EFF2F22319838800CF5164 /* stp_card_applepay_template@2x.png in Resources */,
094DDF0822E7A0D3004B0256 /* Localizable.strings in Resources */,
094DDF4722E7A9A8004B0256 /* InfoPlist.strings in Resources */,
D0CE6F56213EDA4400BCD44B /* InfoPlist.strings in Resources */,
D0CE6F65213EDA4400BCD44B /* InfoPlist.strings in Resources */,
+ D0EFF31E2319838800CF5164 /* VimeoUserScript.js in Resources */,
D0E8B8B12044496C00605593 /* voip_busy.caf in Resources */,
+ D0EFF3072319838800CF5164 /* stp_card_form_applepay@3x.png in Resources */,
+ D0EFF3152319838800CF5164 /* anim_archiveswipe.json in Resources */,
+ D0EFF3032319838800CF5164 /* stp_card_placeholder_template@2x.png in Resources */,
09EBE2A622B004EA00F670AB /* BlueIconIpad@2x.png in Resources */,
D08DB0A7213F4D1D00F2ADBF /* fast_arrow@2x.png in Resources */,
094DDF0A22E7A0D3004B0256 /* AppIntentVocabulary.plist in Resources */,
D0E8B8AF2044496C00605593 /* voip_fail.caf in Resources */,
D0CE6F55213EDA4400BCD44B /* Localizable.strings in Resources */,
+ D0EFF2E82319838800CF5164 /* stp_card_diners@2x.png in Resources */,
D08DB0B2213F4D1D00F2ADBF /* ic_smile_eye@2x.png in Resources */,
D08DB0B3213F4D1D00F2ADBF /* ic_videocam@2x.png in Resources */,
D04DCC2E1F71C80000B021D7 /* 111.m4a in Resources */,
D08DB0AA213F4D1D00F2ADBF /* fast_spiral@2x.png in Resources */,
+ D0EFF2EB2319838800CF5164 /* stp_card_diners_template@3x.png in Resources */,
D0CE6F5C213EDA4400BCD44B /* InfoPlist.strings in Resources */,
D052974722B0073F004ABAF6 /* WhiteFilledIcon@2x.png in Resources */,
D0CE6F5D213EDA4400BCD44B /* AppIntentVocabulary.plist in Resources */,
D0CE6F61213EDA4400BCD44B /* Localizable.strings in Resources */,
D04DCC311F71C80000B021D7 /* 4.m4a in Resources */,
- D0FC1948201D2DA800FEDBB2 /* SFCompactRounded-Semibold.otf in Resources */,
+ D0EFF31C2319838800CF5164 /* anim_mute.json in Resources */,
D04DCC331F71C80000B021D7 /* 6.m4a in Resources */,
D04DCC251F71C80000B021D7 /* 102.m4a in Resources */,
09EBE2A822B004EA00F670AB /* BlackFilledIconIpad@2x.png in Resources */,
D021D4D9219CAEDD0064BEBA /* Config-Fork.xcconfig in Resources */,
+ D0EFF31A2319838800CF5164 /* anim_hide.json in Resources */,
D08DB0AD213F4D1D00F2ADBF /* ic_cam@2x.png in Resources */,
+ D0EFF3232319838800CF5164 /* Instagram.html in Resources */,
+ D0EFF30E2319838800CF5164 /* anim_archive.json in Resources */,
094DDF3322E7A61B004B0256 /* InfoPlist.strings in Resources */,
090E777622A6945900CD99F5 /* BlackClassicIcon@3x.png in Resources */,
D0E8B8B02044496C00605593 /* voip_ringback.caf in Resources */,
09E9600822C23FF200B13673 /* BlackNotificationIcon.png in Resources */,
+ D0EFF2ED2319838800CF5164 /* stp_card_diners@3x.png in Resources */,
+ D0EFF2F82319838800CF5164 /* stp_card_jcb@2x.png in Resources */,
+ D0EFF3012319838800CF5164 /* stp_card_applepay@2x.png in Resources */,
09EBE2A922B004EA00F670AB /* BlackFilledIconLargeIpad@2x.png in Resources */,
+ D0EFF30A2319838800CF5164 /* stp_card_discover_template@3x.png in Resources */,
090E777422A6945900CD99F5 /* BlackClassicIcon@2x.png in Resources */,
+ D0EFF2FC2319838800CF5164 /* stp_card_cvc_amex@2x.png in Resources */,
D00ED75A1FE94630001F38BD /* AppIntentVocabulary.plist in Resources */,
D04DCC221F71C80000B021D7 /* 1.m4a in Resources */,
09EBE2AD22B004EA00F670AB /* BlackFilledIconIpad.png in Resources */,
09E9601522C2441000B13673 /* BlueClassicNotificationIcon.png in Resources */,
D0E8C2E02285EA6A009F26E8 /* BlackIcon@3x.png in Resources */,
+ D0EFF3162319838800CF5164 /* anim_delete.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Telegram-iOS.xcworkspace/contents.xcworkspacedata b/Telegram-iOS.xcworkspace/contents.xcworkspacedata
index 9b8384320d..9e47100447 100644
--- a/Telegram-iOS.xcworkspace/contents.xcworkspacedata
+++ b/Telegram-iOS.xcworkspace/contents.xcworkspacedata
@@ -63,6 +63,9 @@
+
+
@@ -180,7 +183,7 @@
location = "container:"
name = "Image Processing">
+ location = "group:submodules/YuvConversion/YuvConversion_Xcode.xcodeproj">
diff --git a/Telegram-iOS/Images.xcassets/AppIcon.appiconset/Contents.json b/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIcon.appiconset/Contents.json
rename to Telegram-iOS/Icons.xcassets/AppIcon.appiconset/Contents.json
diff --git a/Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@1024px.png b/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@1024px.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@1024px.png
rename to Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@1024px.png
diff --git a/Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@120px.png b/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@120px.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@120px.png
rename to Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@120px.png
diff --git a/Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@152px.png b/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@152px.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@152px.png
rename to Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@152px.png
diff --git a/Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@167px.png b/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@167px.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@167px.png
rename to Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@167px.png
diff --git a/Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@180px.png b/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@180px.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@180px.png
rename to Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@180px.png
diff --git a/Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@76px.png b/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@76px.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIcon.appiconset/icon@76px.png
rename to Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@76px.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIconIpad.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIconIpad.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Contents.json b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Contents.json
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Contents.json
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Contents.json
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@29x29.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@29x29.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@29x29.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@29x29.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@58x58.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@58x58.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@80x80.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@80x80.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80.png
diff --git a/Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@87x87.png b/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@87x87.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/AppIconLLC.appiconset/Simple@87x87.png
rename to Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@87x87.png
diff --git a/Telegram-iOS/Images.xcassets/Contents.json b/Telegram-iOS/Icons.xcassets/Contents.json
similarity index 100%
rename from Telegram-iOS/Images.xcassets/Contents.json
rename to Telegram-iOS/Icons.xcassets/Contents.json
diff --git a/Telegram-iOS/Images.xcassets/Shortcuts/Contents.json b/Telegram-iOS/Icons.xcassets/Shortcuts/Contents.json
similarity index 100%
rename from Telegram-iOS/Images.xcassets/Shortcuts/Contents.json
rename to Telegram-iOS/Icons.xcassets/Shortcuts/Contents.json
diff --git a/Telegram-iOS/Images.xcassets/Shortcuts/SavedMessages.imageset/Contents.json b/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/Contents.json
similarity index 100%
rename from Telegram-iOS/Images.xcassets/Shortcuts/SavedMessages.imageset/Contents.json
rename to Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/Contents.json
diff --git a/Telegram-iOS/Images.xcassets/Shortcuts/SavedMessages.imageset/SavedMessagesIcon@2x.png b/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/SavedMessagesIcon@2x.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/Shortcuts/SavedMessages.imageset/SavedMessagesIcon@2x.png
rename to Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/SavedMessagesIcon@2x.png
diff --git a/Telegram-iOS/Images.xcassets/Shortcuts/SavedMessages.imageset/SavedMessagesIcon@3x.png b/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/SavedMessagesIcon@3x.png
similarity index 100%
rename from Telegram-iOS/Images.xcassets/Shortcuts/SavedMessages.imageset/SavedMessagesIcon@3x.png
rename to Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/SavedMessagesIcon@3x.png
diff --git a/Telegram-iOS/Info.plist b/Telegram-iOS/Info.plist
index 0c3c9d00ae..f65788504f 100644
--- a/Telegram-iOS/Info.plist
+++ b/Telegram-iOS/Info.plist
@@ -185,7 +185,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 5.11
+ 5.12
CFBundleSignature
????
CFBundleURLTypes
@@ -356,5 +356,10 @@
+ UIDeviceFamily
+
+ 1
+ 2
+
diff --git a/submodules/Display/Display/NavigationBackArrowLight@2x.png b/Telegram-iOS/Resources/NavigationBackArrowLight@2x.png
similarity index 100%
rename from submodules/Display/Display/NavigationBackArrowLight@2x.png
rename to Telegram-iOS/Resources/NavigationBackArrowLight@2x.png
diff --git a/submodules/Display/Display/NavigationShadow@2x.png b/Telegram-iOS/Resources/NavigationShadow@2x.png
similarity index 100%
rename from submodules/Display/Display/NavigationShadow@2x.png
rename to Telegram-iOS/Resources/NavigationShadow@2x.png
diff --git a/Telegram-iOS/Resources/PhoneCountries.txt b/Telegram-iOS/Resources/PhoneCountries.txt
deleted file mode 100644
index 0f0932ed27..0000000000
--- a/Telegram-iOS/Resources/PhoneCountries.txt
+++ /dev/null
@@ -1,232 +0,0 @@
-1876;JM;Jamaica
-1869;KN;Saint Kitts & Nevis
-1868;TT;Trinidad & Tobago
-1784;VC;Saint Vincent & the Grenadines
-1767;DM;Dominica
-1758;LC;Saint Lucia
-1721;SX;Sint Maarten
-1684;AS;American Samoa
-1671;GU;Guam
-1670;MP;Northern Mariana Islands
-1664;MS;Montserrat
-1649;TC;Turks & Caicos Islands
-1473;GD;Grenada
-1441;BM;Bermuda
-1345;KY;Cayman Islands
-1340;VI;US Virgin Islands
-1284;VG;British Virgin Islands
-1268;AG;Antigua & Barbuda
-1264;AI;Anguilla
-1246;BB;Barbados
-1242;BS;Bahamas
-998;UZ;Uzbekistan
-996;KG;Kyrgyzstan
-995;GE;Georgia
-994;AZ;Azerbaijan
-993;TM;Turkmenistan
-992;TJ;Tajikistan
-977;NP;Nepal
-976;MN;Mongolia
-975;BT;Bhutan
-974;QA;Qatar
-973;BH;Bahrain
-972;IL;Israel
-971;AE;United Arab Emirates
-970;PS;Palestine
-968;OM;Oman
-967;YE;Yemen
-966;SA;Saudi Arabia
-965;KW;Kuwait
-964;IQ;Iraq
-963;SY;Syrian Arab Republic
-962;JO;Jordan
-961;LB;Lebanon
-960;MV;Maldives
-886;TW;Taiwan
-880;BD;Bangladesh
-856;LA;Laos
-855;KH;Cambodia
-853;MO;Macau
-852;HK;Hong Kong
-850;KP;North Korea
-692;MH;Marshall Islands
-691;FM;Micronesia
-690;TK;Tokelau
-689;PF;French Polynesia
-688;TV;Tuvalu
-687;NC;New Caledonia
-686;KI;Kiribati
-685;WS;Samoa
-683;NU;Niue
-682;CK;Cook Islands
-681;WF;Wallis & Futuna
-680;PW;Palau
-679;FJ;Fiji
-678;VU;Vanuatu
-677;SB;Solomon Islands
-676;TO;Tonga
-675;PG;Papua New Guinea
-674;NR;Nauru
-673;BN;Brunei Darussalam
-672;NF;Norfolk Island
-670;TL;Timor-Leste
-599;BQ;Bonaire, Sint Eustatius & Saba
-599;CW;Curaçao
-598;UY;Uruguay
-597;SR;Suriname
-596;MQ;Martinique
-595;PY;Paraguay
-594;GF;French Guiana
-593;EC;Ecuador
-592;GY;Guyana
-591;BO;Bolivia
-590;GP;Guadeloupe
-509;HT;Haiti
-508;PM;Saint Pierre & Miquelon
-507;PA;Panama
-506;CR;Costa Rica
-505;NI;Nicaragua
-504;HN;Honduras
-503;SV;El Salvador
-502;GT;Guatemala
-501;BZ;Belize
-500;FK;Falkland Islands
-423;LI;Liechtenstein
-421;SK;Slovakia
-420;CZ;Czech Republic
-383;XK;Kosovo
-389;MK;Macedonia
-387;BA;Bosnia & Herzegovina
-386;SI;Slovenia
-385;HR;Croatia
-382;ME;Montenegro
-381;RS;Serbia
-380;UA;Ukraine
-378;SM;San Marino
-377;MC;Monaco
-376;AD;Andorra
-375;BY;Belarus
-374;AM;Armenia
-373;MD;Moldova
-372;EE;Estonia
-371;LV;Latvia
-370;LT;Lithuania
-359;BG;Bulgaria
-358;FI;Finland
-357;CY;Cyprus
-356;MT;Malta
-355;AL;Albania
-354;IS;Iceland
-353;IE;Ireland
-352;LU;Luxembourg
-351;PT;Portugal
-350;GI;Gibraltar
-299;GL;Greenland
-298;FO;Faroe Islands
-297;AW;Aruba
-291;ER;Eritrea
-290;SH;Saint Helena
-269;KM;Comoros
-268;SZ;Swaziland
-267;BW;Botswana
-266;LS;Lesotho
-265;MW;Malawi
-264;NA;Namibia
-263;ZW;Zimbabwe
-262;RE;Réunion
-261;MG;Madagascar
-260;ZM;Zambia
-258;MZ;Mozambique
-257;BI;Burundi
-256;UG;Uganda
-255;TZ;Tanzania
-254;KE;Kenya
-253;DJ;Djibouti
-252;SO;Somalia
-251;ET;Ethiopia
-250;RW;Rwanda
-249;SD;Sudan
-248;SC;Seychelles
-247;SH;Saint Helena
-246;IO;Diego Garcia
-245;GW;Guinea-Bissau
-244;AO;Angola
-243;CD;Congo (Dem. Rep.)
-242;CG;Congo (Rep.)
-241;GA;Gabon
-240;GQ;Equatorial Guinea
-239;ST;São Tomé & Príncipe
-238;CV;Cape Verde
-237;CM;Cameroon
-236;CF;Central African Rep.
-235;TD;Chad
-234;NG;Nigeria
-233;GH;Ghana
-232;SL;Sierra Leone
-231;LR;Liberia
-230;MU;Mauritius
-229;BJ;Benin
-228;TG;Togo
-227;NE;Niger
-226;BF;Burkina Faso
-225;CI;Côte d`Ivoire
-224;GN;Guinea
-223;ML;Mali
-222;MR;Mauritania
-221;SN;Senegal
-220;GM;Gambia
-218;LY;Libya
-216;TN;Tunisia
-213;DZ;Algeria
-212;MA;Morocco
-211;SS;South Sudan
-98;IR;Iran
-95;MM;Myanmar
-94;LK;Sri Lanka
-93;AF;Afghanistan
-92;PK;Pakistan
-91;IN;India
-90;TR;Turkey
-86;CN;China
-84;VN;Vietnam
-82;KR;South Korea
-81;JP;Japan
-66;TH;Thailand
-65;SG;Singapore
-64;NZ;New Zealand
-63;PH;Philippines
-62;ID;Indonesia
-61;AU;Australia
-60;MY;Malaysia
-58;VE;Venezuela
-57;CO;Colombia
-56;CL;Chile
-55;BR;Brazil
-54;AR;Argentina
-53;CU;Cuba
-52;MX;Mexico
-51;PE;Peru
-49;DE;Germany
-48;PL;Poland
-47;NO;Norway
-46;SE;Sweden
-45;DK;Denmark
-44;GB;United Kingdom
-43;AT;Austria
-41;CH;Switzerland
-40;RO;Romania
-39;IT;Italy
-36;HU;Hungary
-34;ES;Spain
-33;FR;France
-32;BE;Belgium
-31;NL;Netherlands
-30;GR;Greece
-27;ZA;South Africa
-20;EG;Egypt
-7;RU;Russian Federation
-7;KZ;Kazakhstan
-1;US;USA
-1;PR;Puerto Rico
-1;DO;Dominican Rep.
-1;CA;Canada
diff --git a/Telegram-iOS/Resources/SFCompactRounded-Semibold.otf b/Telegram-iOS/Resources/SFCompactRounded-Semibold.otf
deleted file mode 100644
index 100e58bff7..0000000000
Binary files a/Telegram-iOS/Resources/SFCompactRounded-Semibold.otf and /dev/null differ
diff --git a/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements b/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements
index 4b8f4137a4..2ee56b1a9a 100644
--- a/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements
+++ b/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements
@@ -30,7 +30,7 @@
keychain-access-groups
- $(AppIdentifierPrefix)org.telegram.Telegram-iOS
+ X834Q8SBVP.org.telegram.Telegram-iOS
diff --git a/Telegram-iOS/en.lproj/Localizable.strings b/Telegram-iOS/en.lproj/Localizable.strings
index d07fc5db9c..7ad93f1eda 100644
--- a/Telegram-iOS/en.lproj/Localizable.strings
+++ b/Telegram-iOS/en.lproj/Localizable.strings
@@ -218,6 +218,7 @@
"PUSH_CHAT_MESSAGE_VIDEOS" = "%1$@ sent %3$@ videos to the group %2$@";
"PUSH_REMINDER_TITLE" = "🗓 Reminder";
+"PUSH_SENDER_YOU" = "📅 You";
"LOCAL_MESSAGE_FWDS" = "%1$@ forwarded you %2$d messages";
"LOCAL_CHANNEL_MESSAGE_FWDS" = "%1$@ posted %2$d forwarded messages";
@@ -243,6 +244,7 @@
"Common.Search" = "Search";
"Common.More" = "More";
"Common.Select" = "Select";
+"Items.NOfM" = "%1$@ of %2$@";
// State
"State.Connecting" = "Connecting...";
@@ -309,6 +311,7 @@
"LastSeen.HoursAgo_0" = "last seen %@ hours ago";
"LastSeen.YesterdayAt" = "last seen yesterday at %@";
"LastSeen.AtDate" = "last seen %@";
+"LastSeen.TodayAt" = "last seen today at %@";
"LastSeen.Lately" = "last seen recently";
"LastSeen.WithinAWeek" = "last seen within a week";
"LastSeen.WithinAMonth" = "last seen within a month";
@@ -4679,7 +4682,8 @@ Any member of this group will be able to see messages in the channel.";
"EditTheme.Preview" = "CHAT PREVIEW";
"EditTheme.UploadNewTheme" = "Create from File...";
"EditTheme.UploadEditedTheme" = "Update from File...";
-"EditTheme.ThemeTemplateAlert" = "New Theme Added\n\nPress and hold on your theme to edit it or get a sharing link. Users who install your theme will get automatic updates each time you change it.\n\nFor advanced editing purposes, you can find a file with your theme in Saved Messages.";
+"EditTheme.ThemeTemplateAlertTitle" = "New Theme Added";
+"EditTheme.ThemeTemplateAlertText" = "Press and hold on your theme to edit it or get a sharing link. Users who install your theme will get automatic updates each time you change it.\n\nFor advanced editing purposes, you can find a file with your theme in Saved Messages.";
"EditTheme.FileReadError" = "Invalid theme file";
"EditTheme.Create.TopInfo" = "The theme will be based on your currently selected colors and wallpaper.";
@@ -4707,6 +4711,7 @@ Any member of this group will be able to see messages in the channel.";
"EditTheme.Edit.Preview.OutgoingText" = "Or upload a theme file";
"EditTheme.ErrorLinkTaken" = "Sorry, this link is already taken";
+"EditTheme.ErrorInvalidCharacters" = "Sorry, this link is invalid.";
"Wallpaper.ErrorNotFound" = "Sorry, this chat background doesn't seem to exist.";
"Theme.ErrorNotFound" = "Sorry, this color theme doesn't seem to exist.";
@@ -4720,3 +4725,27 @@ Any member of this group will be able to see messages in the channel.";
"Theme.UsersCount_0" = "%@ people are using this theme";
"Conversation.SendMessageErrorTooMuchScheduled" = "Sorry, you can not schedule more than 100 messages.";
+
+"ChatList.Context.MarkAllAsRead" = "Mark All as Read";
+"ChatList.Context.HideArchive" = "Hide Above the List";
+"ChatList.Context.UnhideArchive" = "Pin in the list";
+"ChatList.Context.RemoveFromRecents" = "Clear from Recents";
+"ChatList.Context.AddToContacts" = "Add to Contacts";
+"ChatList.Context.MarkAsRead" = "Mark as Read";
+"ChatList.Context.MarkAsUnread" = "Mark as Unread";
+"ChatList.Context.Archive" = "Archive";
+"ChatList.Context.Unarchive" = "Unarchive";
+"ChatList.Context.Pin" = "Pin";
+"ChatList.Context.Unpin" = "Unpin";
+"ChatList.Context.Mute" = "Mute";
+"ChatList.Context.Unmute" = "Unmute";
+"ChatList.Context.JoinChannel" = "Join Channel";
+"ChatList.Context.Delete" = "Delete";
+
+"ContactList.Context.SendMessage" = "Send Message";
+"ContactList.Context.StartSecretChat" = "Start Secret Chat";
+"ContactList.Context.Call" = "Cal";
+
+"Theme.Context.Apply" = "Apply";
+
+"Settings.Context.Logout" = "Logout";
diff --git a/Telegram-iOS/main.m b/Telegram-iOS/main.m
index 6e4c714868..dcc092613b 100644
--- a/Telegram-iOS/main.m
+++ b/Telegram-iOS/main.m
@@ -8,7 +8,8 @@ int main(int argc, char *argv[]) {
sleep(1000);
void *NotificationService = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/NotificationService.appex/NotificationService"] UTF8String], RTLD_LAZY);
void *SiriIntents = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/SiriIntents.appex/SiriIntents"] UTF8String], RTLD_LAZY);
- void *Widget = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/Widget.appex/Widget"] UTF8String], RTLD_LAZY);*/
+ void *Widget = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/Widget.appex/Widget"] UTF8String], RTLD_LAZY);
+ 1*/
@autoreleasepool {
return UIApplicationMain(argc, argv, @"Application", @"AppDelegate");
diff --git a/Telegram_Buck.xcworkspace/buck-project.meta.json b/Telegram_Buck.xcworkspace/buck-project.meta.json
new file mode 100644
index 0000000000..1156e6950f
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/buck-project.meta.json
@@ -0,0 +1 @@
+{"required-targets":["//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_ac3_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_adts_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avcodec.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avdct.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avfft.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_d3d11va.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dirac.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dv_profile.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dxva2.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_jni.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_mediacodec.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_qsv.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vaapi.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vdpau.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_videotoolbox.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vorbis_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_xvmc.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_avformat.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_avio.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_adler32.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_aes.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_aes_ctr.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_attributes.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_audio_fifo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avassert.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avconfig.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avstring.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avutil.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_base64.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_blowfish.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_bprint.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_bswap.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_buffer.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_camellia.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_cast5.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_channel_layout.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_common.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_cpu.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_crc.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_des.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_dict.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_display.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_downmix_info.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_encryption_info.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_error.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_eval.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_ffversion.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_fifo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_file.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_frame.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hash.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hmac.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_cuda.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_d3d11va.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_drm.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_dxva2.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_mediacodec.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_qsv.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_vaapi.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_vdpau.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_videotoolbox.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_imgutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_intfloat.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_intreadwrite.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_lfg.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_log.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_lzo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_macros.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mastering_display_metadata.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mathematics.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_md5.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mem.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_motion_vector.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_murmur3.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_opt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_parseutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixdesc.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixelutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixfmt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_random_seed.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_rational.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_rc4.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_replaygain.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_ripemd.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_samplefmt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_sha.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_sha512.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_spherical.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_stereo3d.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_tea.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_threadmessage.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_time.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_timecode.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_timestamp.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_tree.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_twofish.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_xtea.h","//submodules/FFMpeg:ffmpeg_header_libswresample_sub_swresample.h","//submodules/FFMpeg:ffmpeg_header_libswresample_sub_version.h","//submodules/FFMpeg:libffmpeg_build","//submodules/MtProtoKit:openssl_libs","//submodules/Opus:opus_lib_file","//submodules/WebP:WebP_lib_file"],"xcconfig-paths":["buck-out/gen/AppLibrary-Debug.xcconfig","buck-out/gen/AppLibrary-Profile.xcconfig","buck-out/gen/AppLibrary-Release.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/Telegram-Debug.xcconfig","buck-out/gen/Telegram-Profile.xcconfig","buck-out/gen/Telegram-Release.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Debug.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Profile.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Release.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Debug.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Profile.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Release.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Debug.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Profile.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Release.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Debug.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Profile.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Release.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Debug.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Profile.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Release.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Debug.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Profile.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Release.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Debug.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Profile.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Release.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Debug.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Profile.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Release.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Debug.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Profile.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Release.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Debug.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Profile.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Release.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Debug.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Profile.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Release.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Debug.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Profile.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Release.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Debug.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Profile.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Release.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Debug.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Profile.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Release.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Release.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Release.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Release.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Debug.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Profile.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Release.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Debug.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Profile.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Release.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Debug.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Profile.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Release.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Debug.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Profile.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Release.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Debug.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Profile.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Release.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Debug.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Profile.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Release.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Debug.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Profile.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Release.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Debug.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Profile.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Release.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Debug.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Profile.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Release.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Debug.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Profile.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Release.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Debug.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Profile.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Release.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Debug.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Profile.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Release.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Debug.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Profile.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Release.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Debug.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Profile.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Release.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Debug.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Profile.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Release.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Debug.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Profile.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Release.xcconfig","buck-out/gen/submodules/Display/Display#shared-Debug.xcconfig","buck-out/gen/submodules/Display/Display#shared-Profile.xcconfig","buck-out/gen/submodules/Display/Display#shared-Release.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Debug.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Profile.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Release.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Debug.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Profile.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Release.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Debug.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Profile.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Release.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Debug.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Profile.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Release.xcconfig","buck-out/gen/submodules/GZip/GZip-Debug.xcconfig","buck-out/gen/submodules/GZip/GZip-Profile.xcconfig","buck-out/gen/submodules/GZip/GZip-Release.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Debug.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Profile.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Release.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Debug.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Profile.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Release.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Debug.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Profile.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Release.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Debug.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Profile.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Release.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Debug.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Profile.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Release.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Debug.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Profile.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Release.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Debug.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Profile.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Release.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Debug.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Profile.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Release.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Debug.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Profile.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Release.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Debug.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Profile.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Release.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Debug.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Profile.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Release.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Debug.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Profile.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Release.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Debug.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Profile.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Release.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Debug.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Profile.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Release.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Debug.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Profile.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Release.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Debug.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Profile.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Release.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Debug.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Profile.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Release.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Debug.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Profile.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Release.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Debug.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Profile.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Release.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Debug.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Profile.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Release.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Debug.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Profile.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Release.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Debug.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Profile.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Release.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Debug.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Profile.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Release.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Debug.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Profile.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Release.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Debug.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Profile.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Release.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Debug.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Profile.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Release.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Debug.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Profile.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Release.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Debug.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Profile.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Release.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Debug.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Profile.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Release.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Debug.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Profile.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Release.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Debug.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Profile.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Release.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Debug.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Profile.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Release.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Debug.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Profile.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Release.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Debug.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Profile.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Release.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Debug.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Profile.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Release.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Debug.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Profile.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Release.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Debug.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Profile.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Release.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Debug.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Profile.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Release.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Debug.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Profile.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Release.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Debug.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Profile.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Release.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Debug.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Profile.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Release.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Debug.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Profile.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Release.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Debug.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Profile.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Release.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Debug.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Profile.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Release.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Debug.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Profile.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Release.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Debug.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Profile.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Release.xcconfig","buck-out/gen/submodules/Opus/opus-Debug.xcconfig","buck-out/gen/submodules/Opus/opus-Profile.xcconfig","buck-out/gen/submodules/Opus/opus-Release.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Debug.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Profile.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Release.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Debug.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Profile.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Release.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Debug.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Profile.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Release.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Debug.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Profile.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Release.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Debug.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Profile.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Release.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Debug.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Profile.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Release.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Debug.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Profile.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Release.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Debug.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Profile.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Release.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Debug.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Profile.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Release.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Debug.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Profile.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Release.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Debug.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Profile.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Release.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Debug.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Profile.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Release.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Debug.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Profile.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Release.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Debug.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Profile.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Release.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Debug.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Profile.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Release.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Debug.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Profile.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Release.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Debug.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Profile.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Release.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Debug.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Profile.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Release.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Debug.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Profile.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Release.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Debug.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Profile.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Release.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Debug.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Profile.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Release.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Debug.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Profile.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Release.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Debug.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Profile.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Release.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Debug.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Profile.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Release.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Debug.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Profile.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Release.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Debug.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Profile.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Release.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Debug.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Profile.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Release.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Debug.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Profile.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Release.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Debug.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Profile.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Release.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Debug.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Profile.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Release.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Debug.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Profile.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Release.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Debug.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Profile.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Release.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Debug.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Profile.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Release.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Debug.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Profile.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Release.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Debug.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Profile.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Release.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Debug.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Profile.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Release.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Debug.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Profile.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Release.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Debug.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Profile.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Release.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Debug.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Profile.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Release.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Debug.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Profile.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Release.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Debug.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Profile.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Release.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Debug.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Profile.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Release.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Debug.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Profile.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Release.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Debug.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Profile.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Release.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Debug.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Profile.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Release.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Debug.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Profile.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Release.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Debug.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Profile.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Release.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Debug.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Profile.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Release.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Debug.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Profile.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Release.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Debug.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Profile.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Release.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Debug.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Profile.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Release.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Debug.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Profile.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Release.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Debug.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Profile.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Release.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Debug.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Profile.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Release.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Debug.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Profile.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Release.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Debug.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Profile.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Release.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Debug.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Profile.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Release.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Debug.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Profile.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Release.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Debug.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Profile.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Release.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Debug.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Profile.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Release.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Debug.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Profile.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Release.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Debug.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Profile.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Release.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Debug.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Profile.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Release.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Debug.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Profile.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Release.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Debug.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Profile.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Release.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Debug.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Profile.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Release.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Debug.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Profile.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Release.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Debug.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Profile.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Release.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Debug.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Profile.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Release.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Debug.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Profile.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Release.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Debug.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Profile.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Release.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Debug.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Profile.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Release.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Debug.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Profile.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Release.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Debug.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Profile.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Release.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Debug.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Profile.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Release.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Debug.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Profile.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Release.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Debug.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Profile.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Release.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Debug.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Profile.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Release.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Debug.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Profile.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Release.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Debug.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Profile.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Release.xcconfig"],"copy-in-xcode":[]}
\ No newline at end of file
diff --git a/Telegram_Buck.xcworkspace/contents.xcworkspacedata b/Telegram_Buck.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000..87da4a941c
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Telegram_Buck.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000..18d981003d
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Telegram_Buck.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000000..115f338bb5
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded
+
+
+
\ No newline at end of file
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+IntentsExtension.xcscheme b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+IntentsExtension.xcscheme
new file mode 100644
index 0000000000..a48bce0372
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+IntentsExtension.xcscheme
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+NotificationContentExtension.xcscheme b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+NotificationContentExtension.xcscheme
new file mode 100644
index 0000000000..e49afaf107
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+NotificationContentExtension.xcscheme
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+NotificationServiceExtension.xcscheme b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+NotificationServiceExtension.xcscheme
new file mode 100644
index 0000000000..749f43806b
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+NotificationServiceExtension.xcscheme
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+ShareExtension.xcscheme b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+ShareExtension.xcscheme
new file mode 100644
index 0000000000..df5967d397
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+ShareExtension.xcscheme
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+WidgetExtension.xcscheme b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+WidgetExtension.xcscheme
new file mode 100644
index 0000000000..e1435ba40b
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck+WidgetExtension.xcscheme
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme
new file mode 100644
index 0000000000..7d02338fcb
--- /dev/null
+++ b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme
@@ -0,0 +1,2518 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Temp/BUCK b/Temp/BUCK
new file mode 100644
index 0000000000..7c14d43f5f
--- /dev/null
+++ b/Temp/BUCK
@@ -0,0 +1,80 @@
+load("//Config:configs.bzl",
+ "app_binary_configs",
+ "library_configs",
+ "app_info_plist_substitutions",
+ "DEVELOPMENT_LANGUAGE",
+)
+
+load("//Config:buck_rule_macros.bzl",
+ "framework_binary_dependencies",
+ "framework_bundle_dependencies",
+ "glob_map",
+ "glob_sub_map",
+ "merge_maps",
+)
+
+framework_dependencies = [
+ "//submodules/MtProtoKit:MtProtoKit",
+ #"//submodules/Emoji:Emoji",
+]
+
+apple_library(
+ name = "AppLibrary",
+ visibility = [
+ "//:",
+ "//...",
+ ],
+ configs = library_configs(),
+ swift_version = native.read_config("swift", "version"),
+ srcs = [
+ "Telegram-iOS/main.m",
+ "Telegram-iOS/Application.swift"
+ ],
+ deps = [
+ "//submodules/MtProtoKit:MtProtoKitFramework",
+ ]
+)
+
+apple_binary(
+ name = "AppBinary",
+ visibility = [
+ "//:",
+ "//...",
+ ],
+ configs = app_binary_configs(),
+ swift_version = native.read_config("swift", "version"),
+ srcs = [
+ "Empty.swift",
+ ],
+ deps = [
+ ":AppLibrary",
+ ]
+)
+
+apple_bundle(
+ name = "Telegram",
+ visibility = [
+ "//:",
+ ],
+ extension = "app",
+ binary = ":AppBinary",
+ product_name = "Telegram",
+ info_plist = "Telegram-iOS/Info.plist",
+ info_plist_substitutions = app_info_plist_substitutions(),
+ deps = [
+ "//submodules/MtProtoKit:MtProtoKitFramework",
+ ]
+)
+
+# Package
+
+apple_package(
+ name = "AppPackage",
+ bundle = ":Telegram",
+)
+
+xcode_workspace_config(
+ name = "workspace",
+ workspace_name = "Telegram_Buck",
+ src_target = ":Telegram",
+)
\ No newline at end of file
diff --git a/Temp/Empty.swift b/Temp/Empty.swift
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/Temp/Empty.swift
@@ -0,0 +1 @@
+
diff --git a/Temp/Telegram-iOS/Application.swift b/Temp/Telegram-iOS/Application.swift
new file mode 100644
index 0000000000..10c08975ea
--- /dev/null
+++ b/Temp/Telegram-iOS/Application.swift
@@ -0,0 +1,5 @@
+import UIKit
+
+@objc(Application) class Application: UIApplication {
+
+}
diff --git a/Temp/Telegram-iOS/Info.plist b/Temp/Telegram-iOS/Info.plist
new file mode 100644
index 0000000000..f65788504f
--- /dev/null
+++ b/Temp/Telegram-iOS/Info.plist
@@ -0,0 +1,365 @@
+
+
+
+
+ CFBundleAllowMixedLocalizations
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleDisplayName
+ ${APP_NAME}
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIcons
+
+ CFBundleAlternateIcons
+
+ Black
+
+ CFBundleIconFiles
+
+ BlackIcon
+ BlackNotificationIcon
+
+ UIPrerenderedIcon
+
+
+ BlackClassic
+
+ CFBundleIconFiles
+
+ BlackClassicIcon
+ BlackClassicNotificationIcon
+
+ UIPrerenderedIcon
+
+
+ BlackFilled
+
+ CFBundleIconFiles
+
+ BlackFilledIcon
+
+ UIPrerenderedIcon
+
+
+ Blue
+
+ CFBundleIconFiles
+
+ BlueIcon
+ BlueNotificationIcon
+
+ UIPrerenderedIcon
+
+
+ BlueClassic
+
+ CFBundleIconFiles
+
+ BlueClassicIcon
+ BlueClassicNotificationIcon
+
+ UIPrerenderedIcon
+
+
+ BlueFilled
+
+ CFBundleIconFiles
+
+ BlueFilledIcon
+
+ UIPrerenderedIcon
+
+
+ WhiteFilled
+
+ CFBundleIconFiles
+
+ WhiteFilledIcon
+
+ UIPrerenderedIcon
+
+
+
+ CFBundlePrimaryIcon
+
+ CFBundleIconName
+ AppIconLLC
+ UIPrerenderedIcon
+
+
+
+ CFBundleIcons~ipad
+
+ CFBundleAlternateIcons
+
+ Black
+
+ CFBundleIconFiles
+
+ BlackIconIpad
+ BlackIconLargeIpad
+ BlackNotificationIcon
+
+ UIPrerenderedIcon
+
+
+ BlackClassic
+
+ CFBundleIconFiles
+
+ BlackClassicIconIpad
+ BlackClassicIconLargeIpad
+ BlackClassicNotificationIcon
+
+ UIPrerenderedIcon
+
+
+ BlackFilled
+
+ CFBundleIconFiles
+
+ BlackFilledIconIpad
+ BlackFilledIconLargeIpad
+
+ UIPrerenderedIcon
+
+
+ Blue
+
+ CFBundleIconFiles
+
+ BlueIconIpad
+ BlueIconLargeIpad
+ BlueNotificationIcon
+
+ UIPrerenderedIcon
+
+
+ BlueClassic
+
+ CFBundleIconFiles
+
+ BlueClassicIconIpad
+ BlueClassicIconLargeIpad
+ BlueClassicNotificationIcon
+
+ UIPrerenderedIcon
+
+
+ BlueFilled
+
+ CFBundleIconFiles
+
+ BlueFilledIconIpad
+ BlueFilledIconLargeIpad
+
+ UIPrerenderedIcon
+
+
+ WhiteFilled
+
+ CFBundleIconFiles
+
+ WhiteFilledIcon
+
+ UIPrerenderedIcon
+
+
+
+ CFBundlePrimaryIcon
+
+ CFBundleIconName
+ AppIconLLC
+ UIPrerenderedIcon
+
+
+
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 5.12
+ CFBundleSignature
+ ????
+ CFBundleURLTypes
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleURLSchemes
+
+ telegram
+
+
+
+ CFBundleTypeRole
+ Editor
+ CFBundleURLName
+ $(PRODUCT_BUNDLE_IDENTIFIER).compatibility
+ CFBundleURLSchemes
+
+ tg
+ $(APP_SPECIFIC_URL_SCHEME)
+
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ $(PRODUCT_BUNDLE_IDENTIFIER).dropbox
+ CFBundleURLSchemes
+
+ db-pa9wtoz9l514anx
+
+
+
+ CFBundleVersion
+ ${BUILD_NUMBER}
+ ITSAppUsesNonExemptEncryption
+
+ LSApplicationQueriesSchemes
+
+ instagram
+ comgooglemaps-x-callback
+ foursquare
+ here-location
+ yandexmaps
+ yandexnavi
+ comgooglemaps
+ youtube
+ twitter
+ vk
+ waze
+ googlechrome
+ googlechromes
+ firefox
+ touch-http
+ touch-https
+ yandexbrowser-open-url
+ vimeo
+ vine
+ coub
+ uber
+ citymapper
+ lyft
+ opera-http
+ opera-https
+ firefox-focus
+ ddgQuickLink
+ moovit
+
+ LSRequiresIPhoneOS
+
+ NSAppTransportSecurity
+
+ NSAllowsArbitraryLoads
+
+
+ NSCameraUsageDescription
+ We need this so that you can take and share photos and videos.
+ NSContactsUsageDescription
+ Telegram stores your contacts heavily encrypted in the cloud to let you connect with your friends across all your devices.
+ NSFaceIDUsageDescription
+ You can use Face ID to unlock the app.
+ NSLocationAlwaysUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map. You also need this to send locations from an Apple Watch.
+ NSLocationWhenInUseUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map.
+ NSMicrophoneUsageDescription
+ We need this so that you can record and share voice messages and videos with sound.
+ NSMotionUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map.
+ NSPhotoLibraryAddUsageDescription
+ We need this so that you can share photos and videos from your photo library.
+ NSPhotoLibraryUsageDescription
+ We need this so that you can share photos and videos from your photo library.
+ NSSiriUsageDescription
+ You can use Siri to send messages.
+ NSUserActivityTypes
+
+ INSendMessageIntent
+ RemindAboutChatIntent
+
+ UIAppFonts
+
+ SFCompactRounded-Semibold.otf
+
+ UIBackgroundModes
+
+ audio
+ fetch
+ location
+ remote-notification
+ voip
+
+ UIFileSharingEnabled
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UIRequiresPersistentWiFi
+
+ UIStatusBarStyle
+ UIStatusBarStyleDefault
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ UIViewEdgeAntialiasing
+
+ UIViewGroupOpacity
+
+ UTImportedTypeDeclarations
+
+
+ UTTypeConformsTo
+
+ public.data
+
+ UTTypeDescription
+ Telegram iOS Color Theme File
+ UTTypeIconFiles
+
+ BlueIcon@3x.png
+
+ UTTypeIdentifier
+ org.telegram.Telegram-iOS.theme
+ UTTypeTagSpecification
+
+ public.filename-extension
+
+ tgios-theme
+
+
+
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+
+
diff --git a/Temp/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements b/Temp/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements
new file mode 100644
index 0000000000..2ee56b1a9a
--- /dev/null
+++ b/Temp/Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements
@@ -0,0 +1,36 @@
+
+
+
+
+ aps-environment
+ development
+ com.apple.developer.associated-domains
+
+ applinks:telegram.me
+ applinks:t.me
+
+ com.apple.developer.icloud-container-identifiers
+
+ iCloud.org.telegram.Telegram-iOS
+
+ com.apple.developer.icloud-services
+
+ CloudKit
+ CloudDocuments
+
+ com.apple.developer.siri
+
+ com.apple.developer.ubiquity-container-identifiers
+
+ iCloud.org.telegram.Telegram-iOS
+
+ com.apple.security.application-groups
+
+ group.org.telegram.Telegram-iOS
+
+ keychain-access-groups
+
+ X834Q8SBVP.org.telegram.Telegram-iOS
+
+
+
diff --git a/Temp/Telegram-iOS/main.m b/Temp/Telegram-iOS/main.m
new file mode 100644
index 0000000000..eeef6ca7fb
--- /dev/null
+++ b/Temp/Telegram-iOS/main.m
@@ -0,0 +1,17 @@
+#import
+#import
+#import
+
+int main(int argc, char *argv[]) {
+ /*NSString *basePath = [[NSString stringWithUTF8String:argv[0]] stringByDeletingLastPathComponent];
+ void *Share = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/Share.appex/Share"] UTF8String], RTLD_LAZY);
+ void *NotificationContent = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/NotificationContent.appex/NotificationContent"] UTF8String], RTLD_LAZY);
+ sleep(1000);
+ void *NotificationService = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/NotificationService.appex/NotificationService"] UTF8String], RTLD_LAZY);
+ void *SiriIntents = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/SiriIntents.appex/SiriIntents"] UTF8String], RTLD_LAZY);
+ void *Widget = dlopen([[basePath stringByAppendingPathComponent:@"PlugIns/Widget.appex/Widget"] UTF8String], RTLD_LAZY);*/
+
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, @"Application", @"AppDelegate");
+ }
+}
diff --git a/Temp/Telegram_Buck.xcworkspace/buck-project.meta.json b/Temp/Telegram_Buck.xcworkspace/buck-project.meta.json
new file mode 100644
index 0000000000..7a5fbda8d9
--- /dev/null
+++ b/Temp/Telegram_Buck.xcworkspace/buck-project.meta.json
@@ -0,0 +1 @@
+{"required-targets":["//submodules/MtProtoKit:openssl_libs"],"xcconfig-paths":["buck-out/gen/Temp/AppLibrary-Debug.xcconfig","buck-out/gen/Temp/AppLibrary-Profile.xcconfig","buck-out/gen/Temp/AppLibrary-Release.xcconfig","buck-out/gen/Temp/Telegram-Debug.xcconfig","buck-out/gen/Temp/Telegram-Profile.xcconfig","buck-out/gen/Temp/Telegram-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKitFramework#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKitFramework#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKitFramework#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Release.xcconfig"],"copy-in-xcode":[]}
\ No newline at end of file
diff --git a/Temp/Telegram_Buck.xcworkspace/contents.xcworkspacedata b/Temp/Telegram_Buck.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000000..b2c13bdb02
--- /dev/null
+++ b/Temp/Telegram_Buck.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Temp/Telegram_Buck.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Temp/Telegram_Buck.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000000..18d981003d
--- /dev/null
+++ b/Temp/Telegram_Buck.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Temp/Telegram_Buck.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Temp/Telegram_Buck.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000000..115f338bb5
--- /dev/null
+++ b/Temp/Telegram_Buck.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded
+
+
+
\ No newline at end of file
diff --git a/Temp/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme b/Temp/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme
new file mode 100644
index 0000000000..2fbbd42372
--- /dev/null
+++ b/Temp/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Temp/Temp.xcodeproj/project.pbxproj b/Temp/Temp.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000..fa0717064c
--- /dev/null
+++ b/Temp/Temp.xcodeproj/project.pbxproj
@@ -0,0 +1,684 @@
+
+
+
+
+ archiveVersion
+ 1
+ classes
+
+
+ objectVersion
+ 46
+ objects
+
+ 1DD70E29001F47FB00000000
+
+ isa
+ PBXFileReference
+ name
+ BUCK
+ path
+ BUCK
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.script.python
+
+ 1DD70E29988E33D500000000
+
+ isa
+ PBXFileReference
+ name
+ Application.swift
+ path
+ Telegram-iOS/Application.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E29BF88817800000000
+
+ isa
+ PBXFileReference
+ name
+ main.m
+ path
+ Telegram-iOS/main.m
+ sourceTree
+ SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.c.objc
+
+ B401C979EAB5339800000000
+
+ isa
+ PBXGroup
+ name
+ Sources
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E29988E33D500000000
+ 1DD70E29BF88817800000000
+
+
+ B401C979C43AA77A00000000
+
+ isa
+ PBXGroup
+ name
+ AppLibrary
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E29001F47FB00000000
+ B401C979EAB5339800000000
+
+
+ 1DD70E294E27EDFB00000000
+
+ isa
+ PBXFileReference
+ name
+ AppLibrary-Debug.xcconfig
+ path
+ ../buck-out/gen/Temp/AppLibrary-Debug.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ 1DD70E294906F2A500000000
+
+ isa
+ PBXFileReference
+ name
+ AppLibrary-Profile.xcconfig
+ path
+ ../buck-out/gen/Temp/AppLibrary-Profile.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ 1DD70E29BC9D9E0700000000
+
+ isa
+ PBXFileReference
+ name
+ AppLibrary-Release.xcconfig
+ path
+ ../buck-out/gen/Temp/AppLibrary-Release.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ 1DD70E29A8C8657400000000
+
+ isa
+ PBXFileReference
+ name
+ Telegram-Debug.xcconfig
+ path
+ ../buck-out/gen/Temp/Telegram-Debug.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ 1DD70E297D676FDE00000000
+
+ isa
+ PBXFileReference
+ name
+ Telegram-Profile.xcconfig
+ path
+ ../buck-out/gen/Temp/Telegram-Profile.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ 1DD70E29F0FE1B4000000000
+
+ isa
+ PBXFileReference
+ name
+ Telegram-Release.xcconfig
+ path
+ ../buck-out/gen/Temp/Telegram-Release.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ B401C9792F7F325000000000
+
+ isa
+ PBXGroup
+ name
+ Buck (Do Not Modify)
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E294E27EDFB00000000
+ 1DD70E294906F2A500000000
+ 1DD70E29BC9D9E0700000000
+ 1DD70E29A8C8657400000000
+ 1DD70E297D676FDE00000000
+ 1DD70E29F0FE1B4000000000
+
+
+ B401C979B781F65D00000000
+
+ isa
+ PBXGroup
+ name
+ Configurations
+ sourceTree
+ ]]>
+ children
+
+ B401C9792F7F325000000000
+
+
+ 1DD70E296A34811900000000
+
+ isa
+ PBXFileReference
+ name
+ MtProtoKitFramework.framework
+ path
+ MtProtoKitFramework.framework
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ wrapper.framework
+
+ 1DD70E297ADFB9F200000000
+
+ isa
+ PBXFileReference
+ name
+ libAppLibrary.a
+ path
+ libAppLibrary.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29B22505DC00000000
+
+ isa
+ PBXFileReference
+ name
+ libMtProtoKit.dylib
+ path
+ libMtProtoKit.dylib
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ compiled.mach-o.dylib
+
+ B401C97968022A5500000000
+
+ isa
+ PBXGroup
+ name
+ Frameworks
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E296A34811900000000
+ 1DD70E297ADFB9F200000000
+ 1DD70E29B22505DC00000000
+
+
+ 1DD70E29D83C37D400000000
+
+ isa
+ PBXFileReference
+ name
+ Telegram.app
+ path
+ Telegram.app
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ wrapper.application
+
+ 1DD70E297ADFB9F200000001
+
+ isa
+ PBXFileReference
+ name
+ libAppLibrary.a
+ path
+ libAppLibrary.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ B401C979C806358400000000
+
+ isa
+ PBXGroup
+ name
+ Products
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E29D83C37D400000000
+ 1DD70E297ADFB9F200000001
+
+
+ 1DD70E29001F47FB00000001
+
+ isa
+ PBXFileReference
+ name
+ BUCK
+ path
+ BUCK
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.script.python
+
+ 1DD70E296ABF6A1200000000
+
+ isa
+ PBXFileReference
+ name
+ Empty.swift
+ path
+ Empty.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E2906C06BEE00000000
+
+ isa
+ PBXFileReference
+ name
+ Info.plist
+ path
+ Telegram-iOS/Info.plist
+ sourceTree
+ ]]>
+ explicitFileType
+ text.plist
+
+ B401C979EAB5339800000001
+
+ isa
+ PBXGroup
+ name
+ Sources
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E296ABF6A1200000000
+ 1DD70E2906C06BEE00000000
+
+
+ B401C979B2C34D2100000000
+
+ isa
+ PBXGroup
+ name
+ Telegram
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E29001F47FB00000001
+ B401C979EAB5339800000001
+
+
+ B401C979EFB6AC4600000000
+
+ isa
+ PBXGroup
+ name
+ mainGroup
+ sourceTree
+ ]]>
+ children
+
+ B401C979C43AA77A00000000
+ B401C979B781F65D00000000
+ B401C97968022A5500000000
+ B401C979C806358400000000
+ B401C979B2C34D2100000000
+
+
+ E7A30F04988E33D500000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29988E33D500000000
+
+ E7A30F04BF88817800000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29BF88817800000000
+
+ 1870857F0000000000000000
+
+ isa
+ PBXSourcesBuildPhase
+ files
+
+ E7A30F04988E33D500000000
+ E7A30F04BF88817800000000
+
+
+ 4952437303EDA63300000000
+
+ isa
+ XCBuildConfiguration
+ name
+ Debug
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E294E27EDFB00000000
+
+ 4952437350C7218900000000
+
+ isa
+ XCBuildConfiguration
+ name
+ Profile
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E294906F2A500000000
+
+ 49524373A439BFE700000000
+
+ isa
+ XCBuildConfiguration
+ name
+ Release
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E29BC9D9E0700000000
+
+ 218C37090000000000000000
+
+ isa
+ XCConfigurationList
+ buildConfigurations
+
+ 4952437303EDA63300000000
+ 4952437350C7218900000000
+ 49524373A439BFE700000000
+
+ defaultConfigurationIsVisible
+
+
+ E66DC04EC43AA77A00000000
+
+ isa
+ PBXNativeTarget
+ name
+ AppLibrary
+ productName
+ AppLibrary
+ productReference
+ 1DD70E297ADFB9F200000001
+ productType
+ com.apple.product-type.library.static
+ dependencies
+
+
+ buildPhases
+
+ 1870857F0000000000000000
+
+ buildConfigurationList
+ 218C37090000000000000000
+
+ E7A30F046ABF6A1200000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E296ABF6A1200000000
+
+ 1870857F0000000000000001
+
+ isa
+ PBXSourcesBuildPhase
+ files
+
+ E7A30F046ABF6A1200000000
+
+
+ E7A30F047ADFB9F200000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E297ADFB9F200000000
+
+ E7A30F04B22505DC00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29B22505DC00000000
+
+ 4F426D880000000000000000
+
+ isa
+ PBXFrameworksBuildPhase
+ files
+
+ E7A30F047ADFB9F200000000
+ E7A30F04B22505DC00000000
+
+
+ E7A30F04B22505DC00000001
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29B22505DC00000000
+ settings
+
+ ATTRIBUTES
+
+ CodeSignOnCopy
+ RemoveHeadersOnCopy
+
+
+
+ E7A30F046A34811900000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E296A34811900000000
+ settings
+
+ ATTRIBUTES
+
+ CodeSignOnCopy
+ RemoveHeadersOnCopy
+
+
+
+ FAF5FAC90000000000000000
+
+ isa
+ PBXCopyFilesBuildPhase
+ files
+
+ E7A30F04B22505DC00000001
+ E7A30F046A34811900000000
+
+ dstSubfolderSpec
+ 10
+ dstPath
+
+
+ 4952437303EDA63300000001
+
+ isa
+ XCBuildConfiguration
+ name
+ Debug
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E29A8C8657400000000
+
+ 4952437350C7218900000001
+
+ isa
+ XCBuildConfiguration
+ name
+ Profile
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E297D676FDE00000000
+
+ 49524373A439BFE700000001
+
+ isa
+ XCBuildConfiguration
+ name
+ Release
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E29F0FE1B4000000000
+
+ 218C37090000000000000001
+
+ isa
+ XCConfigurationList
+ buildConfigurations
+
+ 4952437303EDA63300000001
+ 4952437350C7218900000001
+ 49524373A439BFE700000001
+
+ defaultConfigurationIsVisible
+
+
+ E66DC04EB2C34D2100000000
+
+ isa
+ PBXNativeTarget
+ name
+ Telegram
+ productName
+ Telegram
+ productReference
+ 1DD70E29D83C37D400000000
+ productType
+ com.apple.product-type.application
+ dependencies
+
+
+ buildPhases
+
+ 1870857F0000000000000001
+ 4F426D880000000000000000
+ FAF5FAC90000000000000000
+
+ buildConfigurationList
+ 218C37090000000000000001
+
+ 4952437303EDA63300000002
+
+ isa
+ XCBuildConfiguration
+ name
+ Debug
+ buildSettings
+
+
+
+ 4952437350C7218900000002
+
+ isa
+ XCBuildConfiguration
+ name
+ Profile
+ buildSettings
+
+
+
+ 49524373A439BFE700000002
+
+ isa
+ XCBuildConfiguration
+ name
+ Release
+ buildSettings
+
+
+
+ 218C37090000000000000002
+
+ isa
+ XCConfigurationList
+ buildConfigurations
+
+ 4952437303EDA63300000002
+ 4952437350C7218900000002
+ 49524373A439BFE700000002
+
+ defaultConfigurationIsVisible
+
+
+ 96C847930027B7F400000000
+
+ isa
+ PBXProject
+ mainGroup
+ B401C979EFB6AC4600000000
+ targets
+
+ E66DC04EC43AA77A00000000
+ E66DC04EB2C34D2100000000
+
+ buildConfigurationList
+ 218C37090000000000000002
+ compatibilityVersion
+ Xcode 3.2
+ attributes
+
+ LastUpgradeCheck
+ 9999
+
+
+
+ rootObject
+ 96C847930027B7F400000000
+
+
\ No newline at end of file
diff --git a/Temp/Temp.xcodeproj/xcshareddata/xcschemes/Temp.xcscheme b/Temp/Temp.xcodeproj/xcshareddata/xcschemes/Temp.xcscheme
new file mode 100644
index 0000000000..c475340c95
--- /dev/null
+++ b/Temp/Temp.xcodeproj/xcshareddata/xcschemes/Temp.xcscheme
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Watch/App/Info.plist b/Watch/App/Info.plist
index dbf2e283c9..70f8f1258b 100644
--- a/Watch/App/Info.plist
+++ b/Watch/App/Info.plist
@@ -17,9 +17,13 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 5.11
+ 5.12
CFBundleVersion
${BUILD_NUMBER}
+ UIDeviceFamily
+
+ 4
+
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
diff --git a/Watch/BUCK b/Watch/BUCK
deleted file mode 100644
index 57366e6538..0000000000
--- a/Watch/BUCK
+++ /dev/null
@@ -1,76 +0,0 @@
-load('//tools:buck_utils.bzl', 'config_with_updated_linker_flags', 'configs_with_config', 'combined_config')
-load('//tools:buck_defs.bzl', 'SHARED_CONFIGS', 'EXTENSION_LIB_SPECIFIC_CONFIG')
-
-apple_library(
- name = 'WatchUtils',
- srcs = [
- 'Bridge/TGBridgeCommon.m',
- 'Bridge/TGBridgeContactMediaAttachment.m',
- 'Bridge/TGBridgeVideoMediaAttachment.m',
- 'Bridge/TGBridgeSubscriptions.m',
- 'Bridge/TGBridgeLocationVenue.m',
- 'Bridge/TGBridgeImageMediaAttachment.m',
- 'Bridge/TGBridgeBotInfo.m',
- 'Bridge/TGBridgeChatMessages.m',
- 'Bridge/TGBridgeMessage.m',
- 'Bridge/TGBridgeUnsupportedMediaAttachment.m',
- 'Bridge/TGBridgeChat.m',
- 'Bridge/TGBridgeForwardedMessageMediaAttachment.m',
- 'Bridge/TGBridgeMessageEntities.m',
- 'Bridge/TGBridgeLocationMediaAttachment.m',
- 'Bridge/TGBridgeMessageEntitiesAttachment.m',
- 'Bridge/TGBridgeReplyMarkupMediaAttachment.m',
- 'Bridge/TGBridgeWebPageMediaAttachment.m',
- 'Bridge/TGBridgeDocumentMediaAttachment.m',
- 'Bridge/TGBridgeActionMediaAttachment.m',
- 'Bridge/TGBridgeContext.m',
- 'Bridge/TGBridgeMediaAttachment.m',
- 'Bridge/TGBridgeUser.m',
- 'Bridge/TGBridgeBotCommandInfo.m',
- 'Bridge/TGBridgeAudioMediaAttachment.m',
- 'Bridge/TGBridgeReplyMessageMediaAttachment.m',
- ],
- headers = glob([
- 'Bridge/*.h',
- 'Extension/*.h',
- ]),
- header_namespace = 'WatchUtils',
- exported_headers = [
- 'Bridge/TGBridgeCommon.h',
- 'Bridge/TGBridgeContactMediaAttachment.h',
- 'Bridge/TGBridgeVideoMediaAttachment.h',
- 'Bridge/TGBridgeSubscriptions.h',
- 'Bridge/TGBridgeLocationVenue.h',
- 'Bridge/TGBridgeImageMediaAttachment.h',
- 'Bridge/TGBridgeBotInfo.h',
- 'Bridge/TGBridgeChatMessages.h',
- 'Bridge/TGBridgeMessage.h',
- 'Bridge/TGBridgeUnsupportedMediaAttachment.h',
- 'Bridge/TGBridgeChat.h',
- 'Bridge/TGBridgeForwardedMessageMediaAttachment.h',
- 'Bridge/TGBridgeMessageEntities.h',
- 'Bridge/TGBridgeLocationMediaAttachment.h',
- 'Bridge/TGBridgeMessageEntitiesAttachment.h',
- 'Bridge/TGBridgeReplyMarkupMediaAttachment.h',
- 'Bridge/TGBridgeWebPageMediaAttachment.h',
- 'Bridge/TGBridgeDocumentMediaAttachment.h',
- 'Bridge/TGBridgeActionMediaAttachment.h',
- 'Bridge/TGBridgeContext.h',
- 'Bridge/TGBridgeMediaAttachment.h',
- 'Bridge/TGBridgeUser.h',
- 'Bridge/TGBridgeBotCommandInfo.h',
- 'Bridge/TGBridgeAudioMediaAttachment.h',
- 'Bridge/TGBridgeReplyMessageMediaAttachment.h',
- ],
- modular = True,
- configs = configs_with_config(combined_config([SHARED_CONFIGS, EXTENSION_LIB_SPECIFIC_CONFIG])),
- compiler_flags = [
- '-w',
- ],
- preprocessor_flags = ['-fobjc-arc'],
- visibility = ['PUBLIC'],
- frameworks = [
- '$SDKROOT/System/Library/Frameworks/Foundation.framework',
- '$SDKROOT/System/Library/Frameworks/UIKit.framework',
- ],
-)
diff --git a/Watch/Bridge/TGBridgeBotInfo+TGBotInfo.h b/Watch/Bridge/TGBridgeBotInfo+TGBotInfo.h
deleted file mode 100644
index be8b1097ba..0000000000
--- a/Watch/Bridge/TGBridgeBotInfo+TGBotInfo.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#import "TGBridgeBotInfo.h"
-
-@class TGBotInfo;
-
-@interface TGBridgeBotInfo (TGBotInfo)
-
-+ (TGBridgeBotInfo *)botInfoWithTGBotInfo:(TGBotInfo *)botInfo userId:(int32_t)userId;
-
-@end
diff --git a/Watch/Bridge/TGBridgeBotInfo+TGBotInfo.m b/Watch/Bridge/TGBridgeBotInfo+TGBotInfo.m
deleted file mode 100644
index 8f48d0d515..0000000000
--- a/Watch/Bridge/TGBridgeBotInfo+TGBotInfo.m
+++ /dev/null
@@ -1,29 +0,0 @@
-#import "TGBridgeBotInfo+TGBotInfo.h"
-
-#import
-
-#import "TGBridgeBotCommandInfo+TGBotCommandInfo.h"
-
-@implementation TGBridgeBotInfo (TGBotInfo)
-
-+ (TGBridgeBotInfo *)botInfoWithTGBotInfo:(TGBotInfo *)botInfo userId:(int32_t)userId
-{
- TGBridgeBotInfo *bridgeBotInfo = [[TGBridgeBotInfo alloc] init];
- bridgeBotInfo->_version = botInfo.version;
- bridgeBotInfo->_userId = userId;
- bridgeBotInfo->_shortDescription = botInfo.shortDescription;
- bridgeBotInfo->_botDescription = botInfo.botDescription;
-
- NSMutableArray *commandList = [[NSMutableArray alloc] init];
- for (TGBotComandInfo *commandInfo in botInfo.commandList)
- {
- TGBridgeBotCommandInfo *bridgeCommandInfo = [TGBridgeBotCommandInfo botCommandInfoWithTGBotCommandInfo:commandInfo];
- if (bridgeCommandInfo != nil)
- [commandList addObject:bridgeCommandInfo];
- }
- bridgeBotInfo->_commandList = commandList;
-
- return bridgeBotInfo;
-}
-
-@end
diff --git a/Watch/Bridge/TGBridgeImageInfo+TGImageInfo.h b/Watch/Bridge/TGBridgeImageInfo+TGImageInfo.h
deleted file mode 100644
index b1786a480d..0000000000
--- a/Watch/Bridge/TGBridgeImageInfo+TGImageInfo.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#import "TGBridgeImageInfo.h"
-
-@class TGImageInfo;
-
-@interface TGBridgeImageInfo (TGImageInfo)
-
-+ (TGBridgeImageInfo *)imageInfoWithTGImageInfo:(TGImageInfo *)imageInfo;
-
-+ (TGImageInfo *)tgImageInfoWithBridgeImageInfo:(TGBridgeImageInfo *)bridgeImageInfo;
-
-@end
diff --git a/Watch/Bridge/TGBridgeImageInfo+TGImageInfo.m b/Watch/Bridge/TGBridgeImageInfo+TGImageInfo.m
deleted file mode 100644
index 705a71d383..0000000000
--- a/Watch/Bridge/TGBridgeImageInfo+TGImageInfo.m
+++ /dev/null
@@ -1,43 +0,0 @@
-#import "TGBridgeImageInfo+TGImageInfo.h"
-
-#import
-
-@implementation TGBridgeImageInfo (TGImageInfo)
-
-+ (TGBridgeImageInfo *)imageInfoWithTGImageInfo:(TGImageInfo *)imageInfo
-{
- if (imageInfo == nil)
- return nil;
-
- TGBridgeImageInfo *bridgeImageInfo = [[TGBridgeImageInfo alloc] init];
- NSDictionary *allSizes = imageInfo.allSizes;
-
- NSMutableArray *bridgeEntries = [[NSMutableArray alloc] init];
- for (NSString *url in allSizes.allKeys)
- {
- TGBridgeImageSizeInfo *bridgeEntry = [[TGBridgeImageSizeInfo alloc] init];
- bridgeEntry.url = url;
- bridgeEntry.dimensions = [allSizes[url] CGSizeValue];
-
- [bridgeEntries addObject:bridgeEntry];
- }
-
- bridgeImageInfo->_entries = bridgeEntries;
-
- return bridgeImageInfo;
-}
-
-+ (TGImageInfo *)tgImageInfoWithBridgeImageInfo:(TGBridgeImageInfo *)bridgeImageInfo
-{
- if (bridgeImageInfo == nil)
- return nil;
-
- TGImageInfo *imageInfo = [[TGImageInfo alloc] init];
-
- for (TGBridgeImageSizeInfo *entry in bridgeImageInfo.entries)
- [imageInfo addImageWithSize:entry.dimensions url:entry.url];
-
- return imageInfo;
-}
-
-@end
diff --git a/Watch/Bridge/TGBridgeMessageEntity+TGMessageEntity.h b/Watch/Bridge/TGBridgeMessageEntity+TGMessageEntity.h
deleted file mode 100644
index 645a079e35..0000000000
--- a/Watch/Bridge/TGBridgeMessageEntity+TGMessageEntity.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#import "TGBridgeMessageEntities.h"
-
-#import
-
-@interface TGBridgeMessageEntity (TGMessageEntity)
-
-+ (TGBridgeMessageEntity *)entityWithTGMessageEntity:(TGMessageEntity *)entity;
-
-@end
diff --git a/Watch/Bridge/TGBridgeMessageEntity+TGMessageEntity.m b/Watch/Bridge/TGBridgeMessageEntity+TGMessageEntity.m
deleted file mode 100644
index 4fccef8cd1..0000000000
--- a/Watch/Bridge/TGBridgeMessageEntity+TGMessageEntity.m
+++ /dev/null
@@ -1,38 +0,0 @@
-#import "TGBridgeMessageEntity+TGMessageEntity.h"
-
-#import
-
-@implementation TGBridgeMessageEntity (TGMessageEntity)
-
-+ (TGBridgeMessageEntity *)entityWithTGMessageEntity:(TGMessageEntity *)entity
-{
- Class bridgeEntityClass = nil;
-
- if ([entity isKindOfClass:[TGMessageEntityUrl class]])
- bridgeEntityClass = [TGBridgeMessageEntityUrl class];
- else if ([entity isKindOfClass:[TGMessageEntityEmail class]])
- bridgeEntityClass = [TGBridgeMessageEntityEmail class];
- else if ([entity isKindOfClass:[TGMessageEntityTextUrl class]])
- bridgeEntityClass = [TGBridgeMessageEntityTextUrl class];
- else if ([entity isKindOfClass:[TGMessageEntityMention class]])
- bridgeEntityClass = [TGBridgeMessageEntityMention class];
- else if ([entity isKindOfClass:[TGMessageEntityHashtag class]])
- bridgeEntityClass = [TGBridgeMessageEntityHashtag class];
- else if ([entity isKindOfClass:[TGMessageEntityBotCommand class]])
- bridgeEntityClass = [TGBridgeMessageEntityBotCommand class];
- else if ([entity isKindOfClass:[TGMessageEntityBold class]])
- bridgeEntityClass = [TGBridgeMessageEntityBold class];
- else if ([entity isKindOfClass:[TGMessageEntityItalic class]])
- bridgeEntityClass = [TGBridgeMessageEntityItalic class];
- else if ([entity isKindOfClass:[TGMessageEntityCode class]])
- bridgeEntityClass = [TGBridgeMessageEntityCode class];
- else if ([entity isKindOfClass:[TGMessageEntityPre class]])
- bridgeEntityClass = [TGBridgeMessageEntityPre class];
-
- if (bridgeEntityClass != nil)
- return [bridgeEntityClass entitityWithRange:entity.range];
-
- return nil;
-}
-
-@end
diff --git a/Watch/Bridge/TGBridgeStickerPack+TGStickerPack.h b/Watch/Bridge/TGBridgeStickerPack+TGStickerPack.h
deleted file mode 100644
index 1922da7917..0000000000
--- a/Watch/Bridge/TGBridgeStickerPack+TGStickerPack.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#import "TGBridgeStickerPack.h"
-
-@class TGStickerPack;
-
-@interface TGBridgeStickerPack (TGStickerPack)
-
-+ (TGBridgeStickerPack *)stickerPackWithTGStickerPack:(TGStickerPack *)stickerPack;
-
-@end
diff --git a/Watch/Bridge/TGBridgeStickerPack+TGStickerPack.m b/Watch/Bridge/TGBridgeStickerPack+TGStickerPack.m
deleted file mode 100644
index 219e0cd78d..0000000000
--- a/Watch/Bridge/TGBridgeStickerPack+TGStickerPack.m
+++ /dev/null
@@ -1,26 +0,0 @@
-#import "TGBridgeStickerPack+TGStickerPack.h"
-#import
-#import "TGBridgeDocumentMediaAttachment+TGDocumentMediaAttachment.h"
-
-@implementation TGBridgeStickerPack (TGStickerPack)
-
-+ (TGBridgeStickerPack *)stickerPackWithTGStickerPack:(TGStickerPack *)stickerPack
-{
- TGBridgeStickerPack *bridgeStickerPack = [[TGBridgeStickerPack alloc] init];
- bridgeStickerPack->_builtIn = [stickerPack.packReference isKindOfClass:[TGStickerPackBuiltinReference class]];
- bridgeStickerPack->_title = stickerPack.title;
-
- NSMutableArray *bridgeDocuments = [[NSMutableArray alloc] init];
- for (TGDocumentMediaAttachment *document in stickerPack.documents)
- {
- TGBridgeDocumentMediaAttachment *bridgeDocument = [TGBridgeDocumentMediaAttachment attachmentWithTGDocumentMediaAttachment:document];
- if (bridgeDocument != nil)
- [bridgeDocuments addObject:bridgeDocument];
- }
-
- bridgeStickerPack->_documents = bridgeDocuments;
-
- return bridgeStickerPack;
-}
-
-@end
diff --git a/Watch/Bridge/TGBridgeUser+TGUser.h b/Watch/Bridge/TGBridgeUser+TGUser.h
deleted file mode 100644
index 15617d77b3..0000000000
--- a/Watch/Bridge/TGBridgeUser+TGUser.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#import "TGBridgeUser.h"
-
-@class TGUser;
-@class TGBotInfo;
-
-@interface TGBridgeUser (TGUser)
-
-+ (TGBridgeUser *)userWithTGUser:(TGUser *)user;
-
-@end
diff --git a/Watch/Bridge/TGBridgeUser+TGUser.m b/Watch/Bridge/TGBridgeUser+TGUser.m
deleted file mode 100644
index a57b55c4fc..0000000000
--- a/Watch/Bridge/TGBridgeUser+TGUser.m
+++ /dev/null
@@ -1,34 +0,0 @@
-#import "TGBridgeUser+TGUser.h"
-
-#import
-
-#import "TGBridgeBotInfo+TGBotInfo.h"
-
-@implementation TGBridgeUser (TGUser)
-
-+ (TGBridgeUser *)userWithTGUser:(TGUser *)user
-{
- if (user == nil)
- return nil;
-
- TGBridgeUser *bridgeUser = [[TGBridgeUser alloc] init];
- bridgeUser->_identifier = user.uid;
- bridgeUser->_firstName = user.firstName;
- bridgeUser->_lastName = user.lastName;
- bridgeUser->_userName = user.userName;
- bridgeUser->_phoneNumber = user.phoneNumber;
- if (user.phoneNumber != nil)
- bridgeUser->_prettyPhoneNumber = [TGPhoneUtils formatPhone:user.phoneNumber forceInternational:false];
- bridgeUser->_online = user.presence.online;
- bridgeUser->_lastSeen = user.presence.lastSeen;
- bridgeUser->_photoSmall = user.photoUrlSmall;
- bridgeUser->_photoBig = user.photoUrlBig;
- bridgeUser->_kind = user.kind;
- bridgeUser->_botKind = user.botKind;
- bridgeUser->_botVersion = user.botInfoVersion;
- bridgeUser->_verified = user.isVerified;
-
- return bridgeUser;
-}
-
-@end
diff --git a/Watch/Extension/Info.plist b/Watch/Extension/Info.plist
index 08c256367e..963171e6e6 100644
--- a/Watch/Extension/Info.plist
+++ b/Watch/Extension/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 5.11
+ 5.12
CFBundleVersion
${BUILD_NUMBER}
NSExtension
diff --git a/Watch/Extension/SSignalKit/SAtomic.h b/Watch/Extension/SSignalKit/SAtomic.h
new file mode 100644
index 0000000000..6d3e35b4dc
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SAtomic.h
@@ -0,0 +1,12 @@
+#import
+
+@interface SAtomic : NSObject
+
+- (instancetype)initWithValue:(id)value;
+- (instancetype)initWithValue:(id)value recursive:(bool)recursive;
+- (id)swap:(id)newValue;
+- (id)value;
+- (id)modify:(id (^)(id))f;
+- (id)with:(id (^)(id))f;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SAtomic.m b/Watch/Extension/SSignalKit/SAtomic.m
new file mode 100644
index 0000000000..5f7f3d1032
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SAtomic.m
@@ -0,0 +1,93 @@
+#import "SAtomic.h"
+
+#import
+
+@interface SAtomic ()
+{
+ pthread_mutex_t _lock;
+ pthread_mutexattr_t _attr;
+ bool _isRecursive;
+ id _value;
+}
+
+@end
+
+@implementation SAtomic
+
+- (instancetype)initWithValue:(id)value
+{
+ self = [super init];
+ if (self != nil)
+ {
+ pthread_mutex_init(&_lock, NULL);
+ _value = value;
+ }
+ return self;
+}
+
+- (instancetype)initWithValue:(id)value recursive:(bool)recursive {
+ self = [super init];
+ if (self != nil)
+ {
+ _isRecursive = recursive;
+
+ if (recursive) {
+ pthread_mutexattr_init(&_attr);
+ pthread_mutexattr_settype(&_attr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&_lock, &_attr);
+ } else {
+ pthread_mutex_init(&_lock, NULL);
+ }
+
+ _value = value;
+ }
+ return self;
+}
+
+- (void)dealloc {
+ if (_isRecursive) {
+ pthread_mutexattr_destroy(&_attr);
+ }
+ pthread_mutex_destroy(&_lock);
+}
+
+- (id)swap:(id)newValue
+{
+ id previousValue = nil;
+ pthread_mutex_lock(&_lock);
+ previousValue = _value;
+ _value = newValue;
+ pthread_mutex_unlock(&_lock);
+ return previousValue;
+}
+
+- (id)value
+{
+ id previousValue = nil;
+ pthread_mutex_lock(&_lock);
+ previousValue = _value;
+ pthread_mutex_unlock(&_lock);
+
+ return previousValue;
+}
+
+- (id)modify:(id (^)(id))f
+{
+ id newValue = nil;
+ pthread_mutex_lock(&_lock);
+ newValue = f(_value);
+ _value = newValue;
+ pthread_mutex_unlock(&_lock);
+ return newValue;
+}
+
+- (id)with:(id (^)(id))f
+{
+ id result = nil;
+ pthread_mutex_lock(&_lock);
+ result = f(_value);
+ pthread_mutex_unlock(&_lock);
+ return result;
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SBag.h b/Watch/Extension/SSignalKit/SBag.h
new file mode 100644
index 0000000000..7b79ead30f
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SBag.h
@@ -0,0 +1,11 @@
+#import
+
+@interface SBag : NSObject
+
+- (NSInteger)addItem:(id)item;
+- (void)enumerateItems:(void (^)(id))block;
+- (void)removeItem:(NSInteger)key;
+- (bool)isEmpty;
+- (NSArray *)copyItems;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SBag.m b/Watch/Extension/SSignalKit/SBag.m
new file mode 100644
index 0000000000..c83f206235
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SBag.m
@@ -0,0 +1,74 @@
+#import "SBag.h"
+
+@interface SBag ()
+{
+ NSInteger _nextKey;
+ NSMutableArray *_items;
+ NSMutableArray *_itemKeys;
+}
+
+@end
+
+@implementation SBag
+
+- (instancetype)init
+{
+ self = [super init];
+ if (self != nil)
+ {
+ _items = [[NSMutableArray alloc] init];
+ _itemKeys = [[NSMutableArray alloc] init];
+ }
+ return self;
+}
+
+- (NSInteger)addItem:(id)item
+{
+ if (item == nil)
+ return -1;
+
+ NSInteger key = _nextKey;
+ [_items addObject:item];
+ [_itemKeys addObject:@(key)];
+ _nextKey++;
+
+ return key;
+}
+
+- (void)enumerateItems:(void (^)(id))block
+{
+ if (block)
+ {
+ for (id item in _items)
+ {
+ block(item);
+ }
+ }
+}
+
+- (void)removeItem:(NSInteger)key
+{
+ NSUInteger index = 0;
+ for (NSNumber *itemKey in _itemKeys)
+ {
+ if ([itemKey integerValue] == key)
+ {
+ [_items removeObjectAtIndex:index];
+ [_itemKeys removeObjectAtIndex:index];
+ break;
+ }
+ index++;
+ }
+}
+
+- (bool)isEmpty
+{
+ return _items.count == 0;
+}
+
+- (NSArray *)copyItems
+{
+ return [[NSArray alloc] initWithArray:_items];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SBlockDisposable.h b/Watch/Extension/SSignalKit/SBlockDisposable.h
new file mode 100644
index 0000000000..2914604cba
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SBlockDisposable.h
@@ -0,0 +1,7 @@
+#import
+
+@interface SBlockDisposable : NSObject
+
+- (instancetype)initWithBlock:(void (^)())block;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SBlockDisposable.m b/Watch/Extension/SSignalKit/SBlockDisposable.m
new file mode 100644
index 0000000000..b8d1f989d4
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SBlockDisposable.m
@@ -0,0 +1,58 @@
+#import "SBlockDisposable.h"
+
+#import
+#import
+
+@interface SBlockDisposable ()
+{
+ void *_block;
+}
+
+@end
+
+@implementation SBlockDisposable
+
+- (instancetype)initWithBlock:(void (^)())block
+{
+ self = [super init];
+ if (self != nil)
+ {
+ _block = (__bridge_retained void *)[block copy];
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ void *block = _block;
+ if (block != NULL)
+ {
+ if (OSAtomicCompareAndSwapPtr(block, 0, &_block))
+ {
+ if (block != nil)
+ {
+ __strong id strongBlock = (__bridge_transfer id)block;
+ strongBlock = nil;
+ }
+ }
+ }
+}
+
+- (void)dispose
+{
+ void *block = _block;
+ if (block != NULL)
+ {
+ if (OSAtomicCompareAndSwapPtr(block, 0, &_block))
+ {
+ if (block != nil)
+ {
+ __strong id strongBlock = (__bridge_transfer id)block;
+ ((dispatch_block_t)strongBlock)();
+ strongBlock = nil;
+ }
+ }
+ }
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SDisposable.h b/Watch/Extension/SSignalKit/SDisposable.h
new file mode 100644
index 0000000000..49d9762dae
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SDisposable.h
@@ -0,0 +1,7 @@
+#import
+
+@protocol SDisposable
+
+- (void)dispose;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SDisposableSet.h b/Watch/Extension/SSignalKit/SDisposableSet.h
new file mode 100644
index 0000000000..7d7515c968
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SDisposableSet.h
@@ -0,0 +1,10 @@
+#import
+
+@class SSignal;
+
+@interface SDisposableSet : NSObject
+
+- (void)add:(id)disposable;
+- (void)remove:(id)disposable;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SDisposableSet.m b/Watch/Extension/SSignalKit/SDisposableSet.m
new file mode 100644
index 0000000000..18cb3be965
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SDisposableSet.m
@@ -0,0 +1,95 @@
+#import "SDisposableSet.h"
+
+#import "SSignal.h"
+
+#import
+
+@interface SDisposableSet ()
+{
+ OSSpinLock _lock;
+ bool _disposed;
+ id _singleDisposable;
+ NSArray *_multipleDisposables;
+}
+
+@end
+
+@implementation SDisposableSet
+
+- (void)add:(id)disposable
+{
+ if (disposable == nil)
+ return;
+
+ bool dispose = false;
+
+ OSSpinLockLock(&_lock);
+ dispose = _disposed;
+ if (!dispose)
+ {
+ if (_multipleDisposables != nil)
+ {
+ NSMutableArray *multipleDisposables = [[NSMutableArray alloc] initWithArray:_multipleDisposables];
+ [multipleDisposables addObject:disposable];
+ _multipleDisposables = multipleDisposables;
+ }
+ else if (_singleDisposable != nil)
+ {
+ NSMutableArray *multipleDisposables = [[NSMutableArray alloc] initWithObjects:_singleDisposable, disposable, nil];
+ _multipleDisposables = multipleDisposables;
+ _singleDisposable = nil;
+ }
+ else
+ {
+ _singleDisposable = disposable;
+ }
+ }
+ OSSpinLockUnlock(&_lock);
+
+ if (dispose)
+ [disposable dispose];
+}
+
+- (void)remove:(id)disposable {
+ OSSpinLockLock(&_lock);
+ if (_multipleDisposables != nil)
+ {
+ NSMutableArray *multipleDisposables = [[NSMutableArray alloc] initWithArray:_multipleDisposables];
+ [multipleDisposables removeObject:disposable];
+ _multipleDisposables = multipleDisposables;
+ }
+ else if (_singleDisposable == disposable)
+ {
+ _singleDisposable = nil;
+ }
+ OSSpinLockUnlock(&_lock);
+}
+
+- (void)dispose
+{
+ id singleDisposable = nil;
+ NSArray *multipleDisposables = nil;
+
+ OSSpinLockLock(&_lock);
+ if (!_disposed)
+ {
+ _disposed = true;
+ singleDisposable = _singleDisposable;
+ multipleDisposables = _multipleDisposables;
+ _singleDisposable = nil;
+ _multipleDisposables = nil;
+ }
+ OSSpinLockUnlock(&_lock);
+
+ if (singleDisposable != nil)
+ [singleDisposable dispose];
+ if (multipleDisposables != nil)
+ {
+ for (id disposable in multipleDisposables)
+ {
+ [disposable dispose];
+ }
+ }
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SMetaDisposable.h b/Watch/Extension/SSignalKit/SMetaDisposable.h
new file mode 100644
index 0000000000..8938f9eacb
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SMetaDisposable.h
@@ -0,0 +1,7 @@
+#import
+
+@interface SMetaDisposable : NSObject
+
+- (void)setDisposable:(id)disposable;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SMetaDisposable.m b/Watch/Extension/SSignalKit/SMetaDisposable.m
new file mode 100644
index 0000000000..4e9c8e4fab
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SMetaDisposable.m
@@ -0,0 +1,53 @@
+#import "SMetaDisposable.h"
+
+#import
+
+@interface SMetaDisposable ()
+{
+ OSSpinLock _lock;
+ bool _disposed;
+ id _disposable;
+}
+
+@end
+
+@implementation SMetaDisposable
+
+- (void)setDisposable:(id)disposable
+{
+ id previousDisposable = nil;
+ bool dispose = false;
+
+ OSSpinLockLock(&_lock);
+ dispose = _disposed;
+ if (!dispose)
+ {
+ previousDisposable = _disposable;
+ _disposable = disposable;
+ }
+ OSSpinLockUnlock(&_lock);
+
+ if (previousDisposable != nil)
+ [previousDisposable dispose];
+
+ if (dispose)
+ [disposable dispose];
+}
+
+- (void)dispose
+{
+ id disposable = nil;
+
+ OSSpinLockLock(&_lock);
+ if (!_disposed)
+ {
+ disposable = _disposable;
+ _disposed = true;
+ }
+ OSSpinLockUnlock(&_lock);
+
+ if (disposable != nil)
+ [disposable dispose];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SMulticastSignalManager.h b/Watch/Extension/SSignalKit/SMulticastSignalManager.h
new file mode 100644
index 0000000000..243f015a52
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SMulticastSignalManager.h
@@ -0,0 +1,11 @@
+#import
+
+@interface SMulticastSignalManager : NSObject
+
+- (SSignal *)multicastedSignalForKey:(NSString *)key producer:(SSignal *(^)())producer;
+- (void)startStandaloneSignalIfNotRunningForKey:(NSString *)key producer:(SSignal *(^)())producer;
+
+- (SSignal *)multicastedPipeForKey:(NSString *)key;
+- (void)putNext:(id)next toMulticastedPipeForKey:(NSString *)key;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SMulticastSignalManager.m b/Watch/Extension/SSignalKit/SMulticastSignalManager.m
new file mode 100644
index 0000000000..1094852dd5
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SMulticastSignalManager.m
@@ -0,0 +1,171 @@
+#import "SMulticastSignalManager.h"
+
+#import "SSignal+Multicast.h"
+#import "SSignal+SideEffects.h"
+#import "SBag.h"
+#import "SMetaDisposable.h"
+#import "SBlockDisposable.h"
+
+#import
+
+@interface SMulticastSignalManager ()
+{
+ OSSpinLock _lock;
+ NSMutableDictionary *_multicastSignals;
+ NSMutableDictionary *_standaloneSignalDisposables;
+ NSMutableDictionary *_pipeListeners;
+}
+
+@end
+
+@implementation SMulticastSignalManager
+
+- (instancetype)init
+{
+ self = [super init];
+ if (self != nil)
+ {
+ _multicastSignals = [[NSMutableDictionary alloc] init];
+ _standaloneSignalDisposables = [[NSMutableDictionary alloc] init];
+ _pipeListeners = [[NSMutableDictionary alloc] init];
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ NSArray *disposables = nil;
+ OSSpinLockLock(&_lock);
+ disposables = [_standaloneSignalDisposables allValues];
+ OSSpinLockUnlock(&_lock);
+
+ for (id disposable in disposables)
+ {
+ [disposable dispose];
+ }
+}
+
+- (SSignal *)multicastedSignalForKey:(NSString *)key producer:(SSignal *(^)())producer
+{
+ if (key == nil)
+ {
+ if (producer)
+ return producer();
+ else
+ return nil;
+ }
+
+ SSignal *signal = nil;
+ OSSpinLockLock(&_lock);
+ signal = _multicastSignals[key];
+ if (signal == nil)
+ {
+ __weak SMulticastSignalManager *weakSelf = self;
+ if (producer)
+ signal = producer();
+ if (signal != nil)
+ {
+ signal = [[signal onDispose:^
+ {
+ __strong SMulticastSignalManager *strongSelf = weakSelf;
+ if (strongSelf != nil)
+ {
+ OSSpinLockLock(&strongSelf->_lock);
+ [strongSelf->_multicastSignals removeObjectForKey:key];
+ OSSpinLockUnlock(&strongSelf->_lock);
+ }
+ }] multicast];
+ _multicastSignals[key] = signal;
+ }
+ }
+ OSSpinLockUnlock(&_lock);
+
+ return signal;
+}
+
+- (void)startStandaloneSignalIfNotRunningForKey:(NSString *)key producer:(SSignal *(^)())producer
+{
+ if (key == nil)
+ return;
+
+ bool produce = false;
+ OSSpinLockLock(&_lock);
+ if (_standaloneSignalDisposables[key] == nil)
+ {
+ _standaloneSignalDisposables[key] = [[SMetaDisposable alloc] init];
+ produce = true;
+ }
+ OSSpinLockUnlock(&_lock);
+
+ if (produce)
+ {
+ __weak SMulticastSignalManager *weakSelf = self;
+ id disposable = [producer() startWithNext:nil error:^(__unused id error)
+ {
+ __strong SMulticastSignalManager *strongSelf = weakSelf;
+ if (strongSelf != nil)
+ {
+ OSSpinLockLock(&strongSelf->_lock);
+ [strongSelf->_standaloneSignalDisposables removeObjectForKey:key];
+ OSSpinLockUnlock(&strongSelf->_lock);
+ }
+ } completed:^
+ {
+ __strong SMulticastSignalManager *strongSelf = weakSelf;
+ if (strongSelf != nil)
+ {
+ OSSpinLockLock(&strongSelf->_lock);
+ [strongSelf->_standaloneSignalDisposables removeObjectForKey:key];
+ OSSpinLockUnlock(&strongSelf->_lock);
+ }
+ }];
+
+ OSSpinLockLock(&_lock);
+ [(SMetaDisposable *)_standaloneSignalDisposables[key] setDisposable:disposable];
+ OSSpinLockUnlock(&_lock);
+ }
+}
+
+- (SSignal *)multicastedPipeForKey:(NSString *)key
+{
+ return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber)
+ {
+ OSSpinLockLock(&_lock);
+ SBag *bag = _pipeListeners[key];
+ if (bag == nil)
+ {
+ bag = [[SBag alloc] init];
+ _pipeListeners[key] = bag;
+ }
+ NSInteger index = [bag addItem:[^(id next)
+ {
+ [subscriber putNext:next];
+ } copy]];
+ OSSpinLockUnlock(&_lock);
+
+ return [[SBlockDisposable alloc] initWithBlock:^
+ {
+ OSSpinLockLock(&_lock);
+ SBag *bag = _pipeListeners[key];
+ [bag removeItem:index];
+ if ([bag isEmpty]) {
+ [_pipeListeners removeObjectForKey:key];
+ }
+ OSSpinLockUnlock(&_lock);
+ }];
+ }];
+}
+
+- (void)putNext:(id)next toMulticastedPipeForKey:(NSString *)key
+{
+ OSSpinLockLock(&_lock);
+ NSArray *pipeListeners = [(SBag *)_pipeListeners[key] copyItems];
+ OSSpinLockUnlock(&_lock);
+
+ for (void (^listener)(id) in pipeListeners)
+ {
+ listener(next);
+ }
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SQueue.h b/Watch/Extension/SSignalKit/SQueue.h
new file mode 100644
index 0000000000..228334c888
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SQueue.h
@@ -0,0 +1,19 @@
+#import
+
+@interface SQueue : NSObject
+
++ (SQueue *)mainQueue;
++ (SQueue *)concurrentDefaultQueue;
++ (SQueue *)concurrentBackgroundQueue;
+
++ (SQueue *)wrapConcurrentNativeQueue:(dispatch_queue_t)nativeQueue;
+
+- (void)dispatch:(dispatch_block_t)block;
+- (void)dispatchSync:(dispatch_block_t)block;
+- (void)dispatch:(dispatch_block_t)block synchronous:(bool)synchronous;
+
+- (dispatch_queue_t)_dispatch_queue;
+
+- (bool)isCurrentQueue;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SQueue.m b/Watch/Extension/SSignalKit/SQueue.m
new file mode 100644
index 0000000000..d5b5553af8
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SQueue.m
@@ -0,0 +1,124 @@
+#import "SQueue.h"
+
+static const void *SQueueSpecificKey = &SQueueSpecificKey;
+
+@interface SQueue ()
+{
+ dispatch_queue_t _queue;
+ void *_queueSpecific;
+ bool _specialIsMainQueue;
+}
+
+@end
+
+@implementation SQueue
+
++ (SQueue *)mainQueue
+{
+ static SQueue *queue = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^
+ {
+ queue = [[SQueue alloc] initWithNativeQueue:dispatch_get_main_queue() queueSpecific:NULL];
+ queue->_specialIsMainQueue = true;
+ });
+
+ return queue;
+}
+
++ (SQueue *)concurrentDefaultQueue
+{
+ static SQueue *queue = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^
+ {
+ queue = [[SQueue alloc] initWithNativeQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) queueSpecific:NULL];
+ });
+
+ return queue;
+}
+
++ (SQueue *)concurrentBackgroundQueue
+{
+ static SQueue *queue = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^
+ {
+ queue = [[SQueue alloc] initWithNativeQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0) queueSpecific:NULL];
+ });
+
+ return queue;
+}
+
++ (SQueue *)wrapConcurrentNativeQueue:(dispatch_queue_t)nativeQueue
+{
+ return [[SQueue alloc] initWithNativeQueue:nativeQueue queueSpecific:NULL];
+}
+
+- (instancetype)init
+{
+ dispatch_queue_t queue = dispatch_queue_create(NULL, NULL);
+ dispatch_queue_set_specific(queue, SQueueSpecificKey, (__bridge void *)self, NULL);
+ return [self initWithNativeQueue:queue queueSpecific:(__bridge void *)self];
+}
+
+- (instancetype)initWithNativeQueue:(dispatch_queue_t)queue queueSpecific:(void *)queueSpecific
+{
+ self = [super init];
+ if (self != nil)
+ {
+ _queue = queue;
+ _queueSpecific = queueSpecific;
+ }
+ return self;
+}
+
+- (dispatch_queue_t)_dispatch_queue
+{
+ return _queue;
+}
+
+- (void)dispatch:(dispatch_block_t)block
+{
+ if (_queueSpecific != NULL && dispatch_get_specific(SQueueSpecificKey) == _queueSpecific)
+ block();
+ else if (_specialIsMainQueue && [NSThread isMainThread])
+ block();
+ else
+ dispatch_async(_queue, block);
+}
+
+- (void)dispatchSync:(dispatch_block_t)block
+{
+ if (_queueSpecific != NULL && dispatch_get_specific(SQueueSpecificKey) == _queueSpecific)
+ block();
+ else if (_specialIsMainQueue && [NSThread isMainThread])
+ block();
+ else
+ dispatch_sync(_queue, block);
+}
+
+- (void)dispatch:(dispatch_block_t)block synchronous:(bool)synchronous {
+ if (_queueSpecific != NULL && dispatch_get_specific(SQueueSpecificKey) == _queueSpecific)
+ block();
+ else if (_specialIsMainQueue && [NSThread isMainThread])
+ block();
+ else {
+ if (synchronous) {
+ dispatch_sync(_queue, block);
+ } else {
+ dispatch_async(_queue, block);
+ }
+ }
+}
+
+- (bool)isCurrentQueue
+{
+ if (_queueSpecific != NULL && dispatch_get_specific(SQueueSpecificKey) == _queueSpecific)
+ return true;
+ else if (_specialIsMainQueue && [NSThread isMainThread])
+ return true;
+ return false;
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Accumulate.h b/Watch/Extension/SSignalKit/SSignal+Accumulate.h
new file mode 100644
index 0000000000..1ea8a51ed0
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Accumulate.h
@@ -0,0 +1,8 @@
+#import
+
+@interface SSignal (Accumulate)
+
+- (SSignal *)reduceLeft:(id)value with:(id (^)(id, id))f;
+- (SSignal *)reduceLeftWithPassthrough:(id)value with:(id (^)(id, id, void (^)(id)))f;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Accumulate.m b/Watch/Extension/SSignalKit/SSignal+Accumulate.m
new file mode 100644
index 0000000000..e237e204d0
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Accumulate.m
@@ -0,0 +1,52 @@
+#import "SSignal+Accumulate.h"
+
+@implementation SSignal (Accumulate)
+
+- (SSignal *)reduceLeft:(id)value with:(id (^)(id, id))f
+{
+ return [[SSignal alloc] initWithGenerator:^(SSubscriber *subscriber)
+ {
+ __block id intermediateResult = value;
+
+ return [self startWithNext:^(id next)
+ {
+ intermediateResult = f(intermediateResult, next);
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ if (intermediateResult != nil)
+ [subscriber putNext:intermediateResult];
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+- (SSignal *)reduceLeftWithPassthrough:(id)value with:(id (^)(id, id, void (^)(id)))f
+{
+ return [[SSignal alloc] initWithGenerator:^(SSubscriber *subscriber)
+ {
+ __block id intermediateResult = value;
+
+ void (^emit)(id) = ^(id next)
+ {
+ [subscriber putNext:next];
+ };
+
+ return [self startWithNext:^(id next)
+ {
+ intermediateResult = f(intermediateResult, next, emit);
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ if (intermediateResult != nil)
+ [subscriber putNext:intermediateResult];
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Catch.h b/Watch/Extension/SSignalKit/SSignal+Catch.h
new file mode 100644
index 0000000000..dc8898c062
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Catch.h
@@ -0,0 +1,9 @@
+#import
+
+@interface SSignal (Catch)
+
+- (SSignal *)catch:(SSignal *(^)(id error))f;
+- (SSignal *)restart;
+- (SSignal *)retryIf:(bool (^)(id error))predicate;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Catch.m b/Watch/Extension/SSignalKit/SSignal+Catch.m
new file mode 100644
index 0000000000..f61e277750
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Catch.m
@@ -0,0 +1,147 @@
+#import "SSignal+Catch.h"
+
+#import "SMetaDisposable.h"
+#import "SDisposableSet.h"
+#import "SBlockDisposable.h"
+#import "SAtomic.h"
+
+@implementation SSignal (Catch)
+
+- (SSignal *)catch:(SSignal *(^)(id error))f
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ SDisposableSet *disposable = [[SDisposableSet alloc] init];
+
+ [disposable add:[self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ SSignal *signal = f(error);
+ [disposable add:[signal startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }]];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }]];
+
+ return disposable;
+ }];
+}
+
+static dispatch_block_t recursiveBlock(void (^block)(dispatch_block_t recurse))
+{
+ return ^
+ {
+ block(recursiveBlock(block));
+ };
+}
+
+- (SSignal *)restart
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ SAtomic *shouldRestart = [[SAtomic alloc] initWithValue:@true];
+
+ SMetaDisposable *currentDisposable = [[SMetaDisposable alloc] init];
+
+ void (^start)() = recursiveBlock(^(dispatch_block_t recurse)
+ {
+ NSNumber *currentShouldRestart = [shouldRestart with:^id(NSNumber *current)
+ {
+ return current;
+ }];
+
+ if ([currentShouldRestart boolValue])
+ {
+ id disposable = [self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ recurse();
+ }];
+ [currentDisposable setDisposable:disposable];
+ }
+ });
+
+ start();
+
+ return [[SBlockDisposable alloc] initWithBlock:^
+ {
+ [currentDisposable dispose];
+
+ [shouldRestart modify:^id(__unused id current)
+ {
+ return @false;
+ }];
+ }];
+ }];
+}
+
+- (SSignal *)retryIf:(bool (^)(id error))predicate {
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ SAtomic *shouldRestart = [[SAtomic alloc] initWithValue:@true];
+
+ SMetaDisposable *currentDisposable = [[SMetaDisposable alloc] init];
+
+ void (^start)() = recursiveBlock(^(dispatch_block_t recurse)
+ {
+ NSNumber *currentShouldRestart = [shouldRestart with:^id(NSNumber *current)
+ {
+ return current;
+ }];
+
+ if ([currentShouldRestart boolValue])
+ {
+ id disposable = [self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ if (predicate(error)) {
+ recurse();
+ } else {
+ [subscriber putError:error];
+ }
+ } completed:^
+ {
+ [shouldRestart modify:^id(__unused id current) {
+ return @false;
+ }];
+ [subscriber putCompletion];
+ }];
+ [currentDisposable setDisposable:disposable];
+ } else {
+ [subscriber putCompletion];
+ }
+ });
+
+ start();
+
+ return [[SBlockDisposable alloc] initWithBlock:^
+ {
+ [currentDisposable dispose];
+
+ [shouldRestart modify:^id(__unused id current)
+ {
+ return @false;
+ }];
+ }];
+ }];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Combine.h b/Watch/Extension/SSignalKit/SSignal+Combine.h
new file mode 100644
index 0000000000..d84e065311
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Combine.h
@@ -0,0 +1,10 @@
+#import
+
+@interface SSignal (Combine)
+
++ (SSignal *)combineSignals:(NSArray *)signals;
++ (SSignal *)combineSignals:(NSArray *)signals withInitialStates:(NSArray *)initialStates;
+
++ (SSignal *)mergeSignals:(NSArray *)signals;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Combine.m b/Watch/Extension/SSignalKit/SSignal+Combine.m
new file mode 100644
index 0000000000..4df70c113d
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Combine.m
@@ -0,0 +1,177 @@
+#import "SSignal+Combine.h"
+
+#import "SAtomic.h"
+#import "SDisposableSet.h"
+#import "SSignal+Single.h"
+
+@interface SSignalCombineState : NSObject
+
+@property (nonatomic, strong, readonly) NSDictionary *latestValues;
+@property (nonatomic, strong, readonly) NSArray *completedStatuses;
+@property (nonatomic) bool error;
+
+@end
+
+@implementation SSignalCombineState
+
+- (instancetype)initWithLatestValues:(NSDictionary *)latestValues completedStatuses:(NSArray *)completedStatuses error:(bool)error
+{
+ self = [super init];
+ if (self != nil)
+ {
+ _latestValues = latestValues;
+ _completedStatuses = completedStatuses;
+ _error = error;
+ }
+ return self;
+}
+
+@end
+
+@implementation SSignal (Combine)
+
++ (SSignal *)combineSignals:(NSArray *)signals
+{
+ if (signals.count == 0)
+ return [SSignal single:@[]];
+ else
+ return [self combineSignals:signals withInitialStates:nil];
+}
+
++ (SSignal *)combineSignals:(NSArray *)signals withInitialStates:(NSArray *)initialStates
+{
+ return [[SSignal alloc] initWithGenerator:^(SSubscriber *subscriber)
+ {
+ NSMutableArray *completedStatuses = [[NSMutableArray alloc] init];
+ for (NSUInteger i = 0; i < signals.count; i++)
+ {
+ [completedStatuses addObject:@false];
+ }
+ NSMutableDictionary *initialLatestValues = [[NSMutableDictionary alloc] init];
+ for (NSUInteger i = 0; i < initialStates.count; i++)
+ {
+ initialLatestValues[@(i)] = initialStates[i];
+ }
+ SAtomic *combineState = [[SAtomic alloc] initWithValue:[[SSignalCombineState alloc] initWithLatestValues:initialLatestValues completedStatuses:completedStatuses error:false]];
+
+ SDisposableSet *compositeDisposable = [[SDisposableSet alloc] init];
+
+ NSUInteger index = 0;
+ NSUInteger count = signals.count;
+ for (SSignal *signal in signals)
+ {
+ id disposable = [signal startWithNext:^(id next)
+ {
+ SSignalCombineState *currentState = [combineState modify:^id(SSignalCombineState *state)
+ {
+ NSMutableDictionary *latestValues = [[NSMutableDictionary alloc] initWithDictionary:state.latestValues];
+ latestValues[@(index)] = next;
+ return [[SSignalCombineState alloc] initWithLatestValues:latestValues completedStatuses:state.completedStatuses error:state.error];
+ }];
+ NSMutableArray *latestValues = [[NSMutableArray alloc] init];
+ for (NSUInteger i = 0; i < count; i++)
+ {
+ id value = currentState.latestValues[@(i)];
+ if (value == nil)
+ {
+ latestValues = nil;
+ break;
+ }
+ latestValues[i] = value;
+ }
+ if (latestValues != nil)
+ [subscriber putNext:latestValues];
+ }
+ error:^(id error)
+ {
+ __block bool hadError = false;
+ [combineState modify:^id(SSignalCombineState *state)
+ {
+ hadError = state.error;
+ return [[SSignalCombineState alloc] initWithLatestValues:state.latestValues completedStatuses:state.completedStatuses error:true];
+ }];
+ if (!hadError)
+ [subscriber putError:error];
+ } completed:^
+ {
+ __block bool wasCompleted = false;
+ __block bool isCompleted = false;
+ [combineState modify:^id(SSignalCombineState *state)
+ {
+ NSMutableArray *completedStatuses = [[NSMutableArray alloc] initWithArray:state.completedStatuses];
+ bool everyStatusWasCompleted = true;
+ for (NSNumber *nStatus in completedStatuses)
+ {
+ if (![nStatus boolValue])
+ {
+ everyStatusWasCompleted = false;
+ break;
+ }
+ }
+ completedStatuses[index] = @true;
+ bool everyStatusIsCompleted = true;
+ for (NSNumber *nStatus in completedStatuses)
+ {
+ if (![nStatus boolValue])
+ {
+ everyStatusIsCompleted = false;
+ break;
+ }
+ }
+
+ wasCompleted = everyStatusWasCompleted;
+ isCompleted = everyStatusIsCompleted;
+
+ return [[SSignalCombineState alloc] initWithLatestValues:state.latestValues completedStatuses:completedStatuses error:state.error];
+ }];
+ if (!wasCompleted && isCompleted)
+ [subscriber putCompletion];
+ }];
+ [compositeDisposable add:disposable];
+ index++;
+ }
+
+ return compositeDisposable;
+ }];
+}
+
++ (SSignal *)mergeSignals:(NSArray *)signals
+{
+ if (signals.count == 0)
+ return [SSignal complete];
+
+ return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber)
+ {
+ SDisposableSet *disposables = [[SDisposableSet alloc] init];
+ SAtomic *completedStates = [[SAtomic alloc] initWithValue:[[NSSet alloc] init]];
+
+ NSInteger index = -1;
+ NSUInteger count = signals.count;
+ for (SSignal *signal in signals)
+ {
+ index++;
+
+ id disposable = [signal startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ NSSet *set = [completedStates modify:^id(NSSet *set)
+ {
+ return [set setByAddingObject:@(index)];
+ }];
+ if (set.count == count)
+ [subscriber putCompletion];
+ }];
+
+ [disposables add:disposable];
+ }
+
+ return disposables;
+ }];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Dispatch.h b/Watch/Extension/SSignalKit/SSignal+Dispatch.h
new file mode 100644
index 0000000000..a22679b372
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Dispatch.h
@@ -0,0 +1,14 @@
+#import
+
+#import
+#import
+
+@interface SSignal (Dispatch)
+
+- (SSignal *)deliverOn:(SQueue *)queue;
+- (SSignal *)deliverOnThreadPool:(SThreadPool *)threadPool;
+- (SSignal *)startOn:(SQueue *)queue;
+- (SSignal *)startOnThreadPool:(SThreadPool *)threadPool;
+- (SSignal *)throttleOn:(SQueue *)queue delay:(NSTimeInterval)delay;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Dispatch.m b/Watch/Extension/SSignalKit/SSignal+Dispatch.m
new file mode 100644
index 0000000000..3929f07eff
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Dispatch.m
@@ -0,0 +1,212 @@
+#import "SSignal+Dispatch.h"
+#import "SAtomic.h"
+#import "STimer.h"
+#import "SBlockDisposable.h"
+#import "SMetaDisposable.h"
+
+@interface SSignal_ThrottleContainer : NSObject
+
+@property (nonatomic, strong, readonly) id value;
+@property (nonatomic, readonly) bool committed;
+@property (nonatomic, readonly) bool last;
+
+@end
+
+@implementation SSignal_ThrottleContainer
+
+- (instancetype)initWithValue:(id)value committed:(bool)committed last:(bool)last {
+ self = [super init];
+ if (self != nil) {
+ _value = value;
+ _committed = committed;
+ _last = last;
+ }
+ return self;
+}
+
+@end
+
+@implementation SSignal (Dispatch)
+
+- (SSignal *)deliverOn:(SQueue *)queue
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ return [self startWithNext:^(id next)
+ {
+ [queue dispatch:^
+ {
+ [subscriber putNext:next];
+ }];
+ } error:^(id error)
+ {
+ [queue dispatch:^
+ {
+ [subscriber putError:error];
+ }];
+ } completed:^
+ {
+ [queue dispatch:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+ }];
+}
+
+- (SSignal *)deliverOnThreadPool:(SThreadPool *)threadPool
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ SThreadPoolQueue *queue = [threadPool nextQueue];
+ return [self startWithNext:^(id next)
+ {
+ SThreadPoolTask *task = [[SThreadPoolTask alloc] initWithBlock:^(bool (^cancelled)())
+ {
+ if (!cancelled())
+ [subscriber putNext:next];
+ }];
+ [queue addTask:task];
+ } error:^(id error)
+ {
+ SThreadPoolTask *task = [[SThreadPoolTask alloc] initWithBlock:^(bool (^cancelled)())
+ {
+ if (!cancelled())
+ [subscriber putError:error];
+ }];
+ [queue addTask:task];
+ } completed:^
+ {
+ SThreadPoolTask *task = [[SThreadPoolTask alloc] initWithBlock:^(bool (^cancelled)())
+ {
+ if (!cancelled())
+ [subscriber putCompletion];
+ }];
+ [queue addTask:task];
+ }];
+ }];
+}
+
+- (SSignal *)startOn:(SQueue *)queue
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ __block bool isCancelled = false;
+ SMetaDisposable *disposable = [[SMetaDisposable alloc] init];
+ [disposable setDisposable:[[SBlockDisposable alloc] initWithBlock:^
+ {
+ isCancelled = true;
+ }]];
+
+ [queue dispatch:^
+ {
+ if (!isCancelled)
+ {
+ [disposable setDisposable:[self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }]];
+ }
+ }];
+
+ return disposable;
+ }];
+}
+
+- (SSignal *)startOnThreadPool:(SThreadPool *)threadPool
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ SMetaDisposable *disposable = [[SMetaDisposable alloc] init];
+
+ SThreadPoolTask *task = [[SThreadPoolTask alloc] initWithBlock:^(bool (^cancelled)())
+ {
+ if (cancelled && cancelled())
+ return;
+
+ [disposable setDisposable:[self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }]];
+ }];
+
+ [disposable setDisposable:[[SBlockDisposable alloc] initWithBlock:^
+ {
+ [task cancel];
+ }]];
+
+ [threadPool addTask:task];
+
+ return disposable;
+ }];
+}
+
+- (SSignal *)throttleOn:(SQueue *)queue delay:(NSTimeInterval)delay
+{
+ return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber) {
+ SAtomic *value = [[SAtomic alloc] initWithValue:nil];
+ STimer *timer = [[STimer alloc] initWithTimeout:delay repeat:false completion:^{
+ [value modify:^id(SSignal_ThrottleContainer *container) {
+ if (container != nil) {
+ if (!container.committed) {
+ [subscriber putNext:container.value];
+ container = [[SSignal_ThrottleContainer alloc] initWithValue:container.value committed:true last:container.last];
+ }
+
+ if (container.last) {
+ [subscriber putCompletion];
+ }
+ }
+ return container;
+ }];
+ } queue:queue];
+
+ return [[self deliverOn:queue] startWithNext:^(id next) {
+ [value modify:^id(SSignal_ThrottleContainer *container) {
+ if (container == nil) {
+ container = [[SSignal_ThrottleContainer alloc] initWithValue:next committed:false last:false];
+ }
+ return container;
+ }];
+ [timer invalidate];
+ [timer start];
+ } error:^(id error) {
+ [timer invalidate];
+ [subscriber putError:error];
+ } completed:^{
+ [timer invalidate];
+ __block bool start = false;
+ [value modify:^id(SSignal_ThrottleContainer *container) {
+ bool wasCommitted = false;
+ if (container == nil) {
+ wasCommitted = true;
+ container = [[SSignal_ThrottleContainer alloc] initWithValue:nil committed:true last:true];
+ } else {
+ wasCommitted = container.committed;
+ container = [[SSignal_ThrottleContainer alloc] initWithValue:container.value committed:container.committed last:true];
+ }
+ start = wasCommitted;
+ return container;
+ }];
+ if (start) {
+ [timer start];
+ } else {
+ [timer fireAndInvalidate];
+ }
+ }];
+ }];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Mapping.h b/Watch/Extension/SSignalKit/SSignal+Mapping.h
new file mode 100644
index 0000000000..81a16816e2
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Mapping.h
@@ -0,0 +1,9 @@
+#import
+
+@interface SSignal (Mapping)
+
+- (SSignal *)map:(id (^)(id))f;
+- (SSignal *)filter:(bool (^)(id))f;
+- (SSignal *)ignoreRepeated;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Mapping.m b/Watch/Extension/SSignalKit/SSignal+Mapping.m
new file mode 100644
index 0000000000..cd3a3ece0a
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Mapping.m
@@ -0,0 +1,83 @@
+#import "SSignal+Mapping.h"
+
+#import "SAtomic.h"
+
+@interface SSignalIgnoreRepeatedState: NSObject
+
+@property (nonatomic, strong) id value;
+@property (nonatomic) bool hasValue;
+
+@end
+
+@implementation SSignalIgnoreRepeatedState
+
+@end
+
+@implementation SSignal (Mapping)
+
+- (SSignal *)map:(id (^)(id))f
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ return [self startWithNext:^(id next)
+ {
+ [subscriber putNext:f(next)];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+- (SSignal *)filter:(bool (^)(id))f
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ return [self startWithNext:^(id next)
+ {
+ if (f(next))
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+- (SSignal *)ignoreRepeated {
+ return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber) {
+ SAtomic *state = [[SAtomic alloc] initWithValue:[[SSignalIgnoreRepeatedState alloc] init]];
+
+ return [self startWithNext:^(id next) {
+ bool shouldPassthrough = [[state with:^id(SSignalIgnoreRepeatedState *state) {
+ if (!state.hasValue) {
+ state.hasValue = true;
+ state.value = next;
+ return @true;
+ } else if ((state.value == nil && next == nil) || [(id)state.value isEqual:next]) {
+ return @false;
+ }
+ state.value = next;
+ return @true;
+ }] boolValue];
+
+ if (shouldPassthrough) {
+ [subscriber putNext:next];
+ }
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Meta.h b/Watch/Extension/SSignalKit/SSignal+Meta.h
new file mode 100644
index 0000000000..2d90df13f8
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Meta.h
@@ -0,0 +1,22 @@
+#import
+
+@class SQueue;
+
+@interface SSignal (Meta)
+
+- (SSignal *)switchToLatest;
+- (SSignal *)mapToSignal:(SSignal *(^)(id))f;
+- (SSignal *)mapToQueue:(SSignal *(^)(id))f;
+- (SSignal *)mapToThrottled:(SSignal *(^)(id))f;
+- (SSignal *)then:(SSignal *)signal;
+- (SSignal *)queue;
+- (SSignal *)throttled;
++ (SSignal *)defer:(SSignal *(^)())generator;
+
+@end
+
+@interface SSignalQueue : NSObject
+
+- (SSignal *)enqueue:(SSignal *)signal;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Meta.m b/Watch/Extension/SSignalKit/SSignal+Meta.m
new file mode 100644
index 0000000000..f6ad4124e6
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Meta.m
@@ -0,0 +1,325 @@
+#import "SSignal+Meta.h"
+
+#import "SDisposableSet.h"
+#import "SMetaDisposable.h"
+#import "SSignal+Mapping.h"
+#import "SAtomic.h"
+#import "SSignal+Pipe.h"
+
+#import
+
+@interface SSignalQueueState : NSObject
+{
+ OSSpinLock _lock;
+ bool _executingSignal;
+ bool _terminated;
+
+ id _disposable;
+ SMetaDisposable *_currentDisposable;
+ SSubscriber *_subscriber;
+
+ NSMutableArray *_queuedSignals;
+ bool _queueMode;
+ bool _throttleMode;
+}
+
+@end
+
+@implementation SSignalQueueState
+
+- (instancetype)initWithSubscriber:(SSubscriber *)subscriber queueMode:(bool)queueMode throttleMode:(bool)throttleMode
+{
+ self = [super init];
+ if (self != nil)
+ {
+ _subscriber = subscriber;
+ _currentDisposable = [[SMetaDisposable alloc] init];
+ _queuedSignals = queueMode ? [[NSMutableArray alloc] init] : nil;
+ _queueMode = queueMode;
+ _throttleMode = throttleMode;
+ }
+ return self;
+}
+
+- (void)beginWithDisposable:(id)disposable
+{
+ _disposable = disposable;
+}
+
+- (void)enqueueSignal:(SSignal *)signal
+{
+ bool startSignal = false;
+ OSSpinLockLock(&_lock);
+ if (_queueMode && _executingSignal) {
+ if (_throttleMode) {
+ [_queuedSignals removeAllObjects];
+ }
+ [_queuedSignals addObject:signal];
+ }
+ else
+ {
+ _executingSignal = true;
+ startSignal = true;
+ }
+ OSSpinLockUnlock(&_lock);
+
+ if (startSignal)
+ {
+ __weak SSignalQueueState *weakSelf = self;
+ id disposable = [signal startWithNext:^(id next)
+ {
+ [_subscriber putNext:next];
+ } error:^(id error)
+ {
+ [_subscriber putError:error];
+ } completed:^
+ {
+ __strong SSignalQueueState *strongSelf = weakSelf;
+ if (strongSelf != nil) {
+ [strongSelf headCompleted];
+ }
+ }];
+
+ [_currentDisposable setDisposable:disposable];
+ }
+}
+
+- (void)headCompleted
+{
+ SSignal *nextSignal = nil;
+
+ bool terminated = false;
+ OSSpinLockLock(&_lock);
+ _executingSignal = false;
+
+ if (_queueMode)
+ {
+ if (_queuedSignals.count != 0)
+ {
+ nextSignal = _queuedSignals[0];
+ [_queuedSignals removeObjectAtIndex:0];
+ _executingSignal = true;
+ }
+ else
+ terminated = _terminated;
+ }
+ else
+ terminated = _terminated;
+ OSSpinLockUnlock(&_lock);
+
+ if (terminated)
+ [_subscriber putCompletion];
+ else if (nextSignal != nil)
+ {
+ __weak SSignalQueueState *weakSelf = self;
+ id disposable = [nextSignal startWithNext:^(id next)
+ {
+ [_subscriber putNext:next];
+ } error:^(id error)
+ {
+ [_subscriber putError:error];
+ } completed:^
+ {
+ __strong SSignalQueueState *strongSelf = weakSelf;
+ if (strongSelf != nil) {
+ [strongSelf headCompleted];
+ }
+ }];
+
+ [_currentDisposable setDisposable:disposable];
+ }
+}
+
+- (void)beginCompletion
+{
+ bool executingSignal = false;
+ OSSpinLockLock(&_lock);
+ executingSignal = _executingSignal;
+ _terminated = true;
+ OSSpinLockUnlock(&_lock);
+
+ if (!executingSignal)
+ [_subscriber putCompletion];
+}
+
+- (void)dispose
+{
+ [_currentDisposable dispose];
+ [_disposable dispose];
+}
+
+@end
+
+@implementation SSignal (Meta)
+
+- (SSignal *)switchToLatest
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ SSignalQueueState *state = [[SSignalQueueState alloc] initWithSubscriber:subscriber queueMode:false throttleMode:false];
+
+ [state beginWithDisposable:[self startWithNext:^(id next)
+ {
+ [state enqueueSignal:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [state beginCompletion];
+ }]];
+
+ return state;
+ }];
+}
+
+- (SSignal *)mapToSignal:(SSignal *(^)(id))f
+{
+ return [[self map:f] switchToLatest];
+}
+
+- (SSignal *)mapToQueue:(SSignal *(^)(id))f
+{
+ return [[self map:f] queue];
+}
+
+- (SSignal *)mapToThrottled:(SSignal *(^)(id))f {
+ return [[self map:f] throttled];
+}
+
+- (SSignal *)then:(SSignal *)signal
+{
+ return [[SSignal alloc] initWithGenerator:^(SSubscriber *subscriber)
+ {
+ SDisposableSet *compositeDisposable = [[SDisposableSet alloc] init];
+
+ SMetaDisposable *currentDisposable = [[SMetaDisposable alloc] init];
+ [compositeDisposable add:currentDisposable];
+
+ [currentDisposable setDisposable:[self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [compositeDisposable add:[signal startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }]];
+ }]];
+
+ return compositeDisposable;
+ }];
+}
+
+- (SSignal *)queue
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ SSignalQueueState *state = [[SSignalQueueState alloc] initWithSubscriber:subscriber queueMode:true throttleMode:false];
+
+ [state beginWithDisposable:[self startWithNext:^(id next)
+ {
+ [state enqueueSignal:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [state beginCompletion];
+ }]];
+
+ return state;
+ }];
+}
+
+- (SSignal *)throttled {
+ return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber) {
+ SSignalQueueState *state = [[SSignalQueueState alloc] initWithSubscriber:subscriber queueMode:true throttleMode:true];
+ [state beginWithDisposable:[self startWithNext:^(id next)
+ {
+ [state enqueueSignal:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [state beginCompletion];
+ }]];
+
+ return state;
+ }];
+}
+
++ (SSignal *)defer:(SSignal *(^)())generator
+{
+ return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber)
+ {
+ return [generator() startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+@end
+
+@interface SSignalQueue () {
+ SPipe *_pipe;
+ id _disposable;
+}
+
+@end
+
+@implementation SSignalQueue
+
+- (instancetype)init {
+ self = [super init];
+ if (self != nil) {
+ _pipe = [[SPipe alloc] init];
+ _disposable = [[_pipe.signalProducer() queue] startWithNext:nil];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [_disposable dispose];
+}
+
+- (SSignal *)enqueue:(SSignal *)signal {
+ return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber) {
+ SPipe *disposePipe = [[SPipe alloc] init];
+
+ SSignal *proxy = [[[[signal onNext:^(id next) {
+ [subscriber putNext:next];
+ }] onError:^(id error) {
+ [subscriber putError:error];
+ }] onCompletion:^{
+ [subscriber putCompletion];
+ }] catch:^SSignal *(__unused id error) {
+ return [SSignal complete];
+ }];
+
+ _pipe.sink([proxy takeUntilReplacement:disposePipe.signalProducer()]);
+
+ return [[SBlockDisposable alloc] initWithBlock:^{
+ disposePipe.sink([SSignal complete]);
+ }];
+ }];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Multicast.h b/Watch/Extension/SSignalKit/SSignal+Multicast.h
new file mode 100644
index 0000000000..e0720cc103
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Multicast.h
@@ -0,0 +1,7 @@
+#import
+
+@interface SSignal (Multicast)
+
+- (SSignal *)multicast;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Multicast.m b/Watch/Extension/SSignalKit/SSignal+Multicast.m
new file mode 100644
index 0000000000..92976cff4a
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Multicast.m
@@ -0,0 +1,158 @@
+#import "SSignal+Multicast.h"
+
+#import
+#import "SBag.h"
+#import "SBlockDisposable.h"
+
+typedef enum {
+ SSignalMulticastStateReady,
+ SSignalMulticastStateStarted,
+ SSignalMulticastStateCompleted
+} SSignalMulticastState;
+
+@interface SSignalMulticastSubscribers : NSObject
+{
+ volatile OSSpinLock _lock;
+ SBag *_subscribers;
+ SSignalMulticastState _state;
+ id _disposable;
+}
+
+@end
+
+@implementation SSignalMulticastSubscribers
+
+- (instancetype)init
+{
+ self = [super init];
+ if (self != nil)
+ {
+ _subscribers = [[SBag alloc] init];
+ }
+ return self;
+}
+
+- (void)setDisposable:(id)disposable
+{
+ [_disposable dispose];
+ _disposable = disposable;
+}
+
+- (id)addSubscriber:(SSubscriber *)subscriber start:(bool *)start
+{
+ OSSpinLockLock(&_lock);
+ NSInteger index = [_subscribers addItem:subscriber];
+ switch (_state) {
+ case SSignalMulticastStateReady:
+ *start = true;
+ _state = SSignalMulticastStateStarted;
+ break;
+ default:
+ break;
+ }
+ OSSpinLockUnlock(&_lock);
+
+ return [[SBlockDisposable alloc] initWithBlock:^
+ {
+ [self remove:index];
+ }];
+}
+
+- (void)remove:(NSInteger)index
+{
+ id currentDisposable = nil;
+
+ OSSpinLockLock(&_lock);
+ [_subscribers removeItem:index];
+ switch (_state) {
+ case SSignalMulticastStateStarted:
+ if ([_subscribers isEmpty])
+ {
+ currentDisposable = _disposable;
+ _disposable = nil;
+ }
+ break;
+ default:
+ break;
+ }
+ OSSpinLockUnlock(&_lock);
+
+ [currentDisposable dispose];
+}
+
+- (void)notifyNext:(id)next
+{
+ NSArray *currentSubscribers = nil;
+ OSSpinLockLock(&_lock);
+ currentSubscribers = [_subscribers copyItems];
+ OSSpinLockUnlock(&_lock);
+
+ for (SSubscriber *subscriber in currentSubscribers)
+ {
+ [subscriber putNext:next];
+ }
+}
+
+- (void)notifyError:(id)error
+{
+ NSArray *currentSubscribers = nil;
+ OSSpinLockLock(&_lock);
+ currentSubscribers = [_subscribers copyItems];
+ _state = SSignalMulticastStateCompleted;
+ OSSpinLockUnlock(&_lock);
+
+ for (SSubscriber *subscriber in currentSubscribers)
+ {
+ [subscriber putError:error];
+ }
+}
+
+- (void)notifyCompleted
+{
+ NSArray *currentSubscribers = nil;
+ OSSpinLockLock(&_lock);
+ currentSubscribers = [_subscribers copyItems];
+ _state = SSignalMulticastStateCompleted;
+ OSSpinLockUnlock(&_lock);
+
+ for (SSubscriber *subscriber in currentSubscribers)
+ {
+ [subscriber putCompletion];
+ }
+}
+
+@end
+
+@implementation SSignal (Multicast)
+
+- (SSignal *)multicast
+{
+ SSignalMulticastSubscribers *subscribers = [[SSignalMulticastSubscribers alloc] init];
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ bool start = false;
+ id currentDisposable = [subscribers addSubscriber:subscriber start:&start];
+ if (start)
+ {
+ id disposable = [self startWithNext:^(id next)
+ {
+ [subscribers notifyNext:next];
+ } error:^(id error)
+ {
+ [subscribers notifyError:error];
+ } completed:^
+ {
+ [subscribers notifyCompleted];
+ }];
+
+ [subscribers setDisposable:[[SBlockDisposable alloc] initWithBlock:^
+ {
+ [disposable dispose];
+ }]];
+ }
+
+ return currentDisposable;
+ }];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Pipe.h b/Watch/Extension/SSignalKit/SSignal+Pipe.h
new file mode 100644
index 0000000000..2a21ee4cf7
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Pipe.h
@@ -0,0 +1,11 @@
+#import
+
+@interface SPipe : NSObject
+
+@property (nonatomic, copy, readonly) SSignal *(^signalProducer)();
+@property (nonatomic, copy, readonly) void (^sink)(id);
+
+- (instancetype)initWithReplay:(bool)replay;
+
+@end
+
diff --git a/Watch/Extension/SSignalKit/SSignal+Pipe.m b/Watch/Extension/SSignalKit/SSignal+Pipe.m
new file mode 100644
index 0000000000..ab9496a2d2
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Pipe.m
@@ -0,0 +1,103 @@
+#import "SSignal+Pipe.h"
+
+#import "SBlockDisposable.h"
+#import "SAtomic.h"
+#import "SBag.h"
+
+@interface SPipeReplayState : NSObject
+
+@property (nonatomic, readonly) bool hasReceivedValue;
+@property (nonatomic, strong, readonly) id recentValue;
+
+@end
+
+@implementation SPipeReplayState
+
+- (instancetype)initWithReceivedValue:(bool)receivedValue recentValue:(id)recentValue
+{
+ self = [super init];
+ if (self != nil)
+ {
+ _hasReceivedValue = receivedValue;
+ _recentValue = recentValue;
+ }
+ return self;
+}
+
+@end
+
+@implementation SPipe
+
+- (instancetype)init
+{
+ return [self initWithReplay:false];
+}
+
+- (instancetype)initWithReplay:(bool)replay
+{
+ self = [super init];
+ if (self != nil)
+ {
+ SAtomic *subscribers = [[SAtomic alloc] initWithValue:[[SBag alloc] init]];
+ SAtomic *replayState = replay ? [[SAtomic alloc] initWithValue:[[SPipeReplayState alloc] initWithReceivedValue:false recentValue:nil]] : nil;
+
+ _signalProducer = [^SSignal *
+ {
+ return [[SSignal alloc] initWithGenerator:^id(SSubscriber *subscriber)
+ {
+ __block NSUInteger index = 0;
+ [subscribers with:^id(SBag *bag)
+ {
+ index = [bag addItem:[^(id next)
+ {
+ [subscriber putNext:next];
+ } copy]];
+ return nil;
+ }];
+
+ if (replay)
+ {
+ [replayState with:^id(SPipeReplayState *state)
+ {
+ if (state.hasReceivedValue)
+ [subscriber putNext:state.recentValue];
+ return nil;
+ }];
+ }
+
+ return [[SBlockDisposable alloc] initWithBlock:^
+ {
+ [subscribers with:^id(SBag *bag)
+ {
+ [bag removeItem:index];
+ return nil;
+ }];
+ }];
+ }];
+ } copy];
+
+ _sink = [^(id next)
+ {
+ NSArray *items = [subscribers with:^id(SBag *bag)
+ {
+ return [bag copyItems];
+ }];
+
+ for (void (^item)(id) in items)
+ {
+ item(next);
+ }
+
+ if (replay)
+ {
+ [replayState modify:^id(__unused SPipeReplayState *state)
+ {
+ return [[SPipeReplayState alloc] initWithReceivedValue:true recentValue:next];
+ }];
+ }
+ } copy];
+ }
+ return self;
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+SideEffects.h b/Watch/Extension/SSignalKit/SSignal+SideEffects.h
new file mode 100644
index 0000000000..8107fcf4cb
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+SideEffects.h
@@ -0,0 +1,13 @@
+#import
+
+@interface SSignal (SideEffects)
+
+- (SSignal *)onStart:(void (^)())f;
+- (SSignal *)onNext:(void (^)(id next))f;
+- (SSignal *)afterNext:(void (^)(id next))f;
+- (SSignal *)onError:(void (^)(id error))f;
+- (SSignal *)onCompletion:(void (^)())f;
+- (SSignal *)afterCompletion:(void (^)())f;
+- (SSignal *)onDispose:(void (^)())f;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+SideEffects.m b/Watch/Extension/SSignalKit/SSignal+SideEffects.m
new file mode 100644
index 0000000000..3d78102d2d
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+SideEffects.m
@@ -0,0 +1,141 @@
+#import "SSignal+SideEffects.h"
+
+#import "SBlockDisposable.h"
+#import "SDisposableSet.h"
+
+@implementation SSignal (SideEffects)
+
+- (SSignal *)onStart:(void (^)())f
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ f();
+ return [self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+- (SSignal *)onNext:(void (^)(id next))f
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ return [self startWithNext:^(id next)
+ {
+ f(next);
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+- (SSignal *)afterNext:(void (^)(id next))f
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ return [self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ f(next);
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+- (SSignal *)onError:(void (^)(id error))f
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ return [self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ f(error);
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+- (SSignal *)onCompletion:(void (^)())f
+{
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ return [self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ f();
+ [subscriber putCompletion];
+ }];
+ }];
+}
+
+- (SSignal *)afterCompletion:(void (^)())f {
+ return [[SSignal alloc] initWithGenerator:^id (SSubscriber *subscriber)
+ {
+ return [self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ f();
+ }];
+ }];
+}
+
+- (SSignal *)onDispose:(void (^)())f
+{
+ return [[SSignal alloc] initWithGenerator:^(SSubscriber *subscriber)
+ {
+ SDisposableSet *compositeDisposable = [[SDisposableSet alloc] init];
+
+ [compositeDisposable add:[self startWithNext:^(id next)
+ {
+ [subscriber putNext:next];
+ } error:^(id error)
+ {
+ [subscriber putError:error];
+ } completed:^
+ {
+ [subscriber putCompletion];
+ }]];
+
+ [compositeDisposable add:[[SBlockDisposable alloc] initWithBlock:^
+ {
+ f();
+ }]];
+
+ return compositeDisposable;
+ }];
+}
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Single.h b/Watch/Extension/SSignalKit/SSignal+Single.h
new file mode 100644
index 0000000000..75f48ff569
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Single.h
@@ -0,0 +1,10 @@
+#import
+
+@interface SSignal (Single)
+
++ (SSignal *)single:(id)next;
++ (SSignal *)fail:(id)error;
++ (SSignal *)never;
++ (SSignal *)complete;
+
+@end
diff --git a/Watch/Extension/SSignalKit/SSignal+Single.m b/Watch/Extension/SSignalKit/SSignal+Single.m
new file mode 100644
index 0000000000..6da5943459
--- /dev/null
+++ b/Watch/Extension/SSignalKit/SSignal+Single.m
@@ -0,0 +1,41 @@
+#import "SSignal+Single.h"
+
+@implementation SSignal (Single)
+
++ (SSignal *)single:(id)next
+{
+ return [[SSignal alloc] initWithGenerator:^id