diff --git a/.gitmodules b/.gitmodules
index 24e6e37bfb..2c1a03b819 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,7 +4,7 @@
url=../rlottie.git
[submodule "build-system/bazel-rules/rules_apple"]
path = build-system/bazel-rules/rules_apple
-url=https://github.com/bazelbuild/rules_apple.git
+url=https://github.com/ali-fareed/rules_apple.git
[submodule "build-system/bazel-rules/rules_swift"]
path = build-system/bazel-rules/rules_swift
url = https://github.com/bazelbuild/rules_swift.git
diff --git a/Makefile b/Makefile
index a08f7dbf11..17d801abf1 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,7 @@ BAZEL_COMMON_FLAGS=\
--features=swift.use_global_module_cache \
--features=swift.split_derived_files_generation \
--features=swift.skip_function_bodies_for_derived_files \
+ --apple_bitcode=watchos=embedded \
--jobs=${CORE_COUNT}
BAZEL_DEBUG_FLAGS=\
diff --git a/Telegram/BUILD b/Telegram/BUILD
index f7fad61726..2d0382e49e 100644
--- a/Telegram/BUILD
+++ b/Telegram/BUILD
@@ -130,6 +130,13 @@ filegroup(
], exclude = ["Telegram-iOS/DefaultAppIcon.xcassets/**/.*"]),
)
+filegroup(
+ name = "BlackAppIcon",
+ srcs = glob([
+ "Telegram-iOS/BlackIcon.xcassets/**/*",
+ ], exclude = ["Telegram-iOS/BlackIcon.xcassets/**/.*"]),
+)
+
filegroup(
name = "DefaultIcon",
srcs = glob([
@@ -244,7 +251,7 @@ official_bundle_ids = [
"org.telegram.Telegram-iOS",
]
-apple_pay_merchants = official_apple_pay_merchants if telegram_bundle_id == "ph.telegra.Telegraph" else ""
+apple_pay_merchants = []#official_apple_pay_merchants if telegram_bundle_id == "ph.telegra.Telegraph" else ""
apple_pay_merchants_fragment = "" if apple_pay_merchants == "" else """
com.apple.developer.in-app-payments
@@ -453,6 +460,8 @@ plist_fragment(
WKWatchKitApp
+ CFBundlePackageType
+ APPL
""".format(
telegram_bundle_id = telegram_bundle_id,
)
@@ -525,6 +534,8 @@ plist_fragment(
MtProtoKit
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -566,6 +577,8 @@ plist_fragment(
SwiftSignalKit
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -607,6 +620,8 @@ plist_fragment(
Postbox
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -651,6 +666,8 @@ plist_fragment(
TelegramApi
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -692,6 +709,8 @@ plist_fragment(
SyncCore
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -737,6 +756,8 @@ plist_fragment(
TelegramCore
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -785,6 +806,8 @@ plist_fragment(
AsyncDisplayKit
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -826,6 +849,8 @@ plist_fragment(
Display
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -887,6 +912,8 @@ plist_fragment(
TelegramUI
CFBundleShortVersionString
{telegram_version}
+ CFBundlePackageType
+ FMWK
""".format(
telegram_bundle_id = telegram_bundle_id,
telegram_version = telegram_version,
@@ -1288,6 +1315,10 @@ plist_fragment(
{telegram_bundle_id}
CFBundleName
Telegram
+ CFBundlePackageType
+ APPL
+ CFBundleSignature
+ ????
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
@@ -1620,6 +1651,179 @@ plist_fragment(
""")
+plist_fragment(
+ name = "TelegramInfoIconAssetsPlist",
+ extension = "plist",
+ template =
+ """
+ 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
+
+
+
+""")
+
ios_application(
name = "Telegram",
bundle_id = "{telegram_bundle_id}".format(
@@ -1632,11 +1836,12 @@ ios_application(
infoplists = [
":TelegramInfoPlist",
":AdditionalInfoPlist",
- ":TelegramInfoIconsPlist",
+ ":TelegramInfoIconAssetsPlist",
],
resources = [
- ":AdditionalIcons",
":LaunchScreen",
+ ":DefaultAppIcon",
+ ":AdditionalIcons",
],
frameworks = [
":MtProtoKitFramework",
diff --git a/build-system/bazel-rules/rules_apple b/build-system/bazel-rules/rules_apple
index 21c0ca93b0..5a0f87083a 160000
--- a/build-system/bazel-rules/rules_apple
+++ b/build-system/bazel-rules/rules_apple
@@ -1 +1 @@
-Subproject commit 21c0ca93b0cd44e7eb500a1c02729a08b496b6c2
+Subproject commit 5a0f87083abe00d4b1442582847a535ca0cde914