diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11ce82790a..9c3655b428 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,17 +33,3 @@ beta_testflight: - fastlane testflight_llc environment: name: testflight_llc - -beta_hockeyapp: - tags: - - ios - stage: build - only: - - beta - except: - - tags - script: - - sh ~/ios-prepare-build.sh $CI_PROJECT_DIR/.. - - fastlane hockeyapp - environment: - name: hockeyapp diff --git a/NotificationContent/Info.plist b/NotificationContent/Info.plist index 6f9b62656b..fe3d0478fb 100644 --- a/NotificationContent/Info.plist +++ b/NotificationContent/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 5.4.1 + 5.5 CFBundleVersion ${BUILD_NUMBER} NSExtension diff --git a/NotificationContent/NotificationViewController.swift b/NotificationContent/NotificationViewController.swift index 8bd411f3c9..346460738c 100644 --- a/NotificationContent/NotificationViewController.swift +++ b/NotificationContent/NotificationViewController.swift @@ -117,7 +117,7 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi let appVersion = (Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String) ?? "unknown" - sharedAccountContext = SharedAccountContext(mainWindow: nil, basePath: rootPath, accountManager: accountManager, applicationBindings: applicationBindings, initialPresentationDataAndSettings: initialPresentationDataAndSettings!, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0), rootPath: rootPath, legacyBasePath: nil, legacyCache: nil, apsNotificationToken: .never(), voipNotificationToken: .never(), setNotificationCall: { _ in }, navigateToChat: { _, _, _ in }) + sharedAccountContext = SharedAccountContext(mainWindow: nil, basePath: rootPath, accountManager: accountManager, applicationBindings: applicationBindings, initialPresentationDataAndSettings: initialPresentationDataAndSettings!, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0, appData: BuildConfig.shared().bundleData), rootPath: rootPath, legacyBasePath: nil, legacyCache: nil, apsNotificationToken: .never(), voipNotificationToken: .never(), setNotificationCall: { _ in }, navigateToChat: { _, _, _ in }) } } diff --git a/NotificationService/Info.plist b/NotificationService/Info.plist index 6863c94684..5ff53bd917 100644 --- a/NotificationService/Info.plist +++ b/NotificationService/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 5.4.1 + 5.5 CFBundleVersion ${BUILD_NUMBER} NSExtension diff --git a/Share/Info.plist b/Share/Info.plist index 08a2e26092..c5a9adb70a 100644 --- a/Share/Info.plist +++ b/Share/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 5.4.1 + 5.5 CFBundleVersion ${BUILD_NUMBER} NSExtension diff --git a/Share/ShareRootController.swift b/Share/ShareRootController.swift index d3d5ecd8c2..eb5e5fbcb5 100644 --- a/Share/ShareRootController.swift +++ b/Share/ShareRootController.swift @@ -160,7 +160,7 @@ class ShareRootController: UIViewController { }) semaphore.wait() - let sharedContext = SharedAccountContext(mainWindow: nil, basePath: rootPath, accountManager: accountManager, applicationBindings: applicationBindings, initialPresentationDataAndSettings: initialPresentationDataAndSettings!, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0), rootPath: rootPath, legacyBasePath: nil, legacyCache: nil, apsNotificationToken: .never(), voipNotificationToken: .never(), setNotificationCall: { _ in }, navigateToChat: { _, _, _ in }) + let sharedContext = SharedAccountContext(mainWindow: nil, basePath: rootPath, accountManager: accountManager, applicationBindings: applicationBindings, initialPresentationDataAndSettings: initialPresentationDataAndSettings!, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0, appData: BuildConfig.shared().bundleData), rootPath: rootPath, legacyBasePath: nil, legacyCache: nil, apsNotificationToken: .never(), voipNotificationToken: .never(), setNotificationCall: { _ in }, navigateToChat: { _, _, _ in }) sharedExtensionContext = SharedExtensionContext(sharedContext: sharedContext) globalSharedExtensionContext = sharedExtensionContext } diff --git a/SiriIntents/Info.plist b/SiriIntents/Info.plist index 4d72f6645f..330c3508d8 100644 --- a/SiriIntents/Info.plist +++ b/SiriIntents/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 5.4.1 + 5.5 CFBundleVersion ${BUILD_NUMBER} NSExtension diff --git a/SiriIntents/IntentHandler.swift b/SiriIntents/IntentHandler.swift index 59cb28dfbf..5710b215ae 100644 --- a/SiriIntents/IntentHandler.swift +++ b/SiriIntents/IntentHandler.swift @@ -84,7 +84,7 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag initializeAccountManagement() let accountManager = AccountManager(basePath: rootPath + "/accounts-metadata") - account = currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0), supplementary: true, manager: accountManager, rootPath: rootPath, auxiliaryMethods: accountAuxiliaryMethods) + account = currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0, appData: BuildConfig.shared().bundleData), supplementary: true, manager: accountManager, rootPath: rootPath, auxiliaryMethods: accountAuxiliaryMethods) |> mapToSignal { account -> Signal in if let account = account { switch account { diff --git a/Telegram-iOS.xcodeproj/project.pbxproj b/Telegram-iOS.xcodeproj/project.pbxproj index dca0e3cc1d..dcc2938c0b 100644 --- a/Telegram-iOS.xcodeproj/project.pbxproj +++ b/Telegram-iOS.xcodeproj/project.pbxproj @@ -236,6 +236,7 @@ D02CF61B215DA24900E0F56A /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D02CF61A215DA24900E0F56A /* TelegramCore.framework */; }; D02CF61C215E51D500E0F56A /* BuildConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = D09250011FE52D2A003F693F /* BuildConfig.m */; }; D02E31231BD803E800CD3F01 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D02E31221BD803E800CD3F01 /* main.m */; }; + D0338736223A9A9A007A2CE4 /* Config-Hockeyapp-Internal.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; }; D03B0E7B1D63484500955575 /* ShareRootController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E7A1D63484500955575 /* ShareRootController.swift */; }; D03B0E821D63484500955575 /* Share.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D03B0E781D63484500955575 /* Share.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; D03B0E8A1D634B1100955575 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E871D634B1100955575 /* Display.framework */; }; @@ -948,6 +949,7 @@ D02CF61A215DA24900E0F56A /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D02CF61D215E522400E0F56A /* NotificationContent-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NotificationContent-Bridging-Header.h"; sourceTree = ""; }; D02E31221BD803E800CD3F01 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Config-Hockeyapp-Internal.xcconfig"; sourceTree = ""; }; D0369C8B1D3E2C9500D91AFC /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; }; D0369C8D1D3E2E4800D91AFC /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; }; D0369C8F1D3E2E5000D91AFC /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; }; @@ -1047,7 +1049,6 @@ D073E51F21FF7CE900742DDD /* Crypto.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Crypto.m; sourceTree = ""; }; D073E52122003E1E00742DDD /* Data.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Data.swift; sourceTree = ""; }; D079FD001F06BBD10038FADE /* Telegram-iOS-AppStore.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = "Telegram-iOS-AppStore.entitlements"; sourceTree = ""; }; - D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Config-Hockeyapp.xcconfig"; sourceTree = ""; }; D079FD021F06BBD60038FADE /* Config-AppStore.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Config-AppStore.xcconfig"; sourceTree = ""; }; D084023120E1883500065674 /* ApplicationShortcutItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationShortcutItem.swift; sourceTree = ""; }; D08410431FABDC5B008FFE92 /* TGItemProviderSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGItemProviderSignals.h; sourceTree = ""; }; @@ -1067,7 +1068,6 @@ D08985032118B46F00918162 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D08985052118B62400918162 /* SiriIntents-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SiriIntents-Bridging-Header.h"; sourceTree = ""; }; D08985062119B7FE00918162 /* IntentContacts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntentContacts.swift; sourceTree = ""; }; - D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Config-Hockeyapp Internal.xcconfig"; sourceTree = ""; }; D09250001FE52D2A003F693F /* BuildConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BuildConfig.h; sourceTree = ""; }; D09250011FE52D2A003F693F /* BuildConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BuildConfig.m; sourceTree = ""; }; D096C2BD1CC3C021006D814E /* Display.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1966,11 +1966,8 @@ D008599E1B28189D00EAF753 /* Telegram-iOS */ = { isa = PBXGroup; children = ( + D0338729223A8347007A2CE4 /* Config */, 09C50E7821738150009E676F /* Watch */, - D0ADF914212B399A00310BBC /* Config-AppStoreLLC.xcconfig */, - D079FD021F06BBD60038FADE /* Config-AppStore.xcconfig */, - D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */, - D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */, D021D4D8219CAEDD0064BEBA /* Config-Fork.xcconfig */, D0ADF913212B398000310BBC /* Telegram-iOS-AppStoreLLC.entitlements */, D079FD001F06BBD10038FADE /* Telegram-iOS-AppStore.entitlements */, @@ -2140,6 +2137,40 @@ path = NotificationContent; sourceTree = ""; }; + D0338729223A8347007A2CE4 /* Config */ = { + isa = PBXGroup; + children = ( + D0338734223A9A7E007A2CE4 /* Hockeyapp-Internal */, + D033872B223A835E007A2CE4 /* AppStore */, + D033872A223A834F007A2CE4 /* AppStoreLLC */, + ); + name = Config; + sourceTree = ""; + }; + D033872A223A834F007A2CE4 /* AppStoreLLC */ = { + isa = PBXGroup; + children = ( + D0ADF914212B399A00310BBC /* Config-AppStoreLLC.xcconfig */, + ); + name = AppStoreLLC; + sourceTree = ""; + }; + D033872B223A835E007A2CE4 /* AppStore */ = { + isa = PBXGroup; + children = ( + D079FD021F06BBD60038FADE /* Config-AppStore.xcconfig */, + ); + name = AppStore; + sourceTree = ""; + }; + D0338734223A9A7E007A2CE4 /* Hockeyapp-Internal */ = { + isa = PBXGroup; + children = ( + D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */, + ); + name = "Hockeyapp-Internal"; + sourceTree = ""; + }; D03B0E791D63484500955575 /* Share */ = { isa = PBXGroup; children = ( @@ -2880,6 +2911,7 @@ D04DCC211F71C80000B021D7 /* 0.m4a in Resources */, D04DCC261F71C80000B021D7 /* 103.m4a in Resources */, D0CE6F69213EDA4400BCD44B /* AppIntentVocabulary.plist in Resources */, + D0338736223A9A9A007A2CE4 /* Config-Hockeyapp-Internal.xcconfig in Resources */, D08DB0C0213F4D1D00F2ADBF /* telegram_sphere@2x.png in Resources */, D08DB0AB213F4D1D00F2ADBF /* ic_bubble@2x.png in Resources */, D04DCC341F71C80000B021D7 /* 7.m4a in Resources */, @@ -3743,7 +3775,7 @@ /* Begin XCBuildConfiguration section */ 09C56FA62172797500BDF00F /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -4102,77 +4134,9 @@ }; name = ReleaseAppStoreLLC; }; - 09C56FAB2172797500BDF00F /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - BUILD_NUMBER = 99999; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = X834Q8SBVP; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IBSC_MODULE = Watch_Extension; - INFOPLIST_FILE = Watch/App/Info.plist; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${APP_BUNDLE_ID}.watchkitapp"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "match InHouse org.telegram.Telegram-iOS.watchkitapp"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = 4; - VALIDATE_PRODUCT = YES; - WATCHOS_DEPLOYMENT_TARGET = 2.2; - }; - name = ReleaseHockeyapp; - }; 09C56FAC2172797500BDF00F /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -4240,7 +4204,7 @@ }; 09C56FAD2172797500BDF00F /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; @@ -4605,77 +4569,9 @@ }; name = ReleaseAppStoreLLC; }; - 09C56FB22172797500BDF00F /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - BUILD_NUMBER = 99999; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = X834Q8SBVP; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = submodules/SSignalKit; - INFOPLIST_FILE = Watch/Extension/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - LIBRARY_SEARCH_PATHS = submodules/SSignalKit; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${APP_BUNDLE_ID}.watchkitapp.watchkitextension"; - PRODUCT_NAME = "${TARGET_NAME}"; - PROVISIONING_PROFILE_SPECIFIER = "match InHouse org.telegram.Telegram-iOS.watchkitapp.watchkitextension"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = 4; - VALIDATE_PRODUCT = YES; - WATCHOS_DEPLOYMENT_TARGET = 2.2; - }; - name = ReleaseHockeyapp; - }; 09C56FB32172797500BDF00F /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; @@ -4743,6 +4639,7 @@ }; D000CAD121FB6E380011B15D /* DebugHockeyapp */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -4818,6 +4715,7 @@ }; D000CAD221FB6E380011B15D /* DebugFork */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D021D4D8219CAEDD0064BEBA /* Config-Fork.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -4893,6 +4791,7 @@ }; D000CAD321FB6E380011B15D /* DebugAppStore */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D079FD021F06BBD60038FADE /* Config-AppStore.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -4968,6 +4867,7 @@ }; D000CAD421FB6E380011B15D /* DebugAppStoreLLC */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D0ADF914212B399A00310BBC /* Config-AppStoreLLC.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -5043,6 +4943,7 @@ }; D000CAD521FB6E380011B15D /* ReleaseAppStore */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D079FD021F06BBD60038FADE /* Config-AppStore.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -5111,6 +5012,7 @@ }; D000CAD621FB6E380011B15D /* ReleaseAppStoreLLC */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D0ADF914212B399A00310BBC /* Config-AppStoreLLC.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -5177,76 +5079,9 @@ }; name = ReleaseAppStoreLLC; }; - D000CAD721FB6E380011B15D /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUILD_NUMBER = 99999; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_ENTITLEMENTS = "NotificationService/NotificationService-Hockeyapp.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = X834Q8SBVP; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = NotificationService/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "$(APP_BUNDLE_ID).NotificationService"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "match InHouse org.telegram.Telegram-iOS.NotificationService"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OBJC_BRIDGING_HEADER = "NotificationService/NotificationService-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = ReleaseHockeyapp; - }; D000CAD821FB6E380011B15D /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -5315,7 +5150,7 @@ }; D00859B91B28189D00EAF753 /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 9999; @@ -5410,7 +5245,7 @@ }; D00859BC1B28189D00EAF753 /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -5497,7 +5332,7 @@ }; D00859BF1B28189D00EAF753 /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -6087,7 +5922,7 @@ }; D02CF609215D9ABF00E0F56A /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -6451,78 +6286,9 @@ }; name = ReleaseAppStoreLLC; }; - D02CF60E215D9ABF00E0F56A /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUILD_NUMBER = 99999; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_ENTITLEMENTS = "NotificationContent/NotificationContent-HockeyApp.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = X834Q8SBVP; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = NotificationContent/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${APP_BUNDLE_ID}.NotificationContent"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "match InHouse org.telegram.Telegram-iOS.NotificationContent"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OBJC_BRIDGING_HEADER = "NotificationContent/NotificationContent-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = ReleaseHockeyapp; - }; D02CF60F215D9ABF00E0F56A /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -6591,7 +6357,7 @@ }; D03B0E841D63484500955575 /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { BITCODE_GENERATION_MODE = marker; BUILD_NUMBER = 99999; @@ -6652,37 +6418,6 @@ }; name = ReleaseAppStore; }; - D03B0E861D63484500955575 /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - BITCODE_GENERATION_MODE = bitcode; - BUILD_NUMBER = 99999; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CODE_SIGN_ENTITLEMENTS = "Share/Share-HockeyApp.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - CURRENT_PROJECT_VERSION = 667; - DEVELOPMENT_TEAM = X834Q8SBVP; - INFOPLIST_FILE = Share/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "${APP_BUNDLE_ID}.Share"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "cfe514a2-916a-4247-b5a4-c2c4c6fd2805"; - PROVISIONING_PROFILE_SPECIFIER = "match InHouse org.telegram.Telegram-iOS.Share"; - SKIP_INSTALL = YES; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_OBJC_BRIDGING_HEADER = "Share/Share-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - }; - name = ReleaseHockeyapp; - }; D079FCF91F06BBA40038FADE /* DebugAppStore */ = { isa = XCBuildConfiguration; baseConfigurationReference = D079FD021F06BBD60038FADE /* Config-AppStore.xcconfig */; @@ -6865,7 +6600,7 @@ }; D0924FF91FE52C46003F693F /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 9999; @@ -6909,7 +6644,7 @@ }; D0924FFA1FE52C46003F693F /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -6953,7 +6688,7 @@ }; D0924FFB1FE52C46003F693F /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -6972,7 +6707,7 @@ }; D0924FFC1FE52C46003F693F /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { BITCODE_GENERATION_MODE = bitcode; BUILD_NUMBER = 99999; @@ -7003,7 +6738,7 @@ }; D0924FFD1FE52C46003F693F /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { BITCODE_GENERATION_MODE = bitcode; BUILD_NUMBER = 99999; @@ -7354,7 +7089,7 @@ }; D0B2F743204F4C9900D3BFB9 /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -7563,75 +7298,9 @@ }; name = ReleaseAppStore; }; - D0B2F746204F4C9900D3BFB9 /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUILD_NUMBER = 99999; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_ENTITLEMENTS = "Widget/Widget-HockeyApp.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = X834Q8SBVP; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = Widget/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${APP_BUNDLE_ID}.Widget"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "1a27976e-0845-48e4-ae3d-2ff38089024d"; - PROVISIONING_PROFILE_SPECIFIER = "match InHouse org.telegram.Telegram-iOS.Widget"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OBJC_BRIDGING_HEADER = "Widget/Widget-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = ReleaseHockeyapp; - }; D0B2F747204F4C9900D3BFB9 /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUILD_NUMBER = 99999; @@ -7993,7 +7662,7 @@ }; D0D2688F1D79A70B00C422DA /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { BITCODE_GENERATION_MODE = marker; BUILD_NUMBER = 99999; @@ -8048,145 +7717,9 @@ }; name = ReleaseAppStore; }; - D0D268911D79A70B00C422DA /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - BITCODE_GENERATION_MODE = bitcode; - BUILD_NUMBER = 99999; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CODE_SIGN_ENTITLEMENTS = "SiriIntents/SiriIntents-Hockeyapp.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - CURRENT_PROJECT_VERSION = 667; - DEVELOPMENT_TEAM = X834Q8SBVP; - INFOPLIST_FILE = SiriIntents/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "${APP_BUNDLE_ID}.SiriIntents"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "94efdcdd-1da2-4ec6-87f3-5e50b55a07f9"; - PROVISIONING_PROFILE_SPECIFIER = "match InHouse org.telegram.Telegram-iOS.SiriIntents"; - SKIP_INSTALL = YES; - SWIFT_OBJC_BRIDGING_HEADER = "SiriIntents/SiriIntents-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - }; - name = ReleaseHockeyapp; - }; - D0D7481D1CBBE0AC00B0ED5C /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUILD_NUMBER = 9999; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - PROVISIONING_PROFILE = "f58b31fd-48bf-4eac-b066-a5ebea37dfd7"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = ReleaseHockeyapp; - }; - D0D7481E1CBBE0AC00B0ED5C /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - BITCODE_GENERATION_MODE = bitcode; - BUILD_NUMBER = 99999; - CLANG_MODULES_AUTOLINK = NO; - CODE_SIGN_ENTITLEMENTS = "Telegram-iOS/Telegram-iOS-Hockeyapp.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: TELEGRAM MESSENGER LLP"; - COMMIT_ID = ""; - CURRENT_PROJECT_VERSION = 667; - DEVELOPMENT_TEAM = X834Q8SBVP; - ENABLE_BITCODE = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(BUILT_PRODUCTS_DIR)", - "$(PROJECT_DIR)/third-party", - ); - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Watch/Bridge"; - INFOPLIST_FILE = "Telegram-iOS/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/submodules/TelegramUI/third-party/opus/lib", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lz", - ); - OTHER_SWIFT_FLAGS = ""; - PRODUCT_BUNDLE_IDENTIFIER = "${APP_BUNDLE_ID}"; - PRODUCT_NAME = "Telegram X"; - PROVISIONING_PROFILE = "a453791e-7153-42a4-8b61-d00a130e59d2"; - PROVISIONING_PROFILE_SPECIFIER = "match InHouse org.telegram.Telegram-iOS"; - SWIFT_OBJC_BRIDGING_HEADER = "Telegram-iOS/Telegram-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - USER_HEADER_SEARCH_PATHS = ""; - }; - name = ReleaseHockeyapp; - }; - D0D7481F1CBBE0AC00B0ED5C /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)/Developer/Library/Frameworks"; - INFOPLIST_FILE = "Telegram-iOSTests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Telegram-iOS.app/Telegram-iOS"; - }; - name = ReleaseHockeyapp; - }; D0ECCB831FE9C38500609802 /* DebugHockeyapp */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -8384,71 +7917,9 @@ }; name = ReleaseAppStore; }; - D0ECCB861FE9C38500609802 /* ReleaseHockeyapp */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D079FD011F06BBD60038FADE /* Config-Hockeyapp.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = ""; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "Telegram-iOS UITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "org.Telegram.Telegram-iOS-UITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "df24dc18-3fdc-447c-b347-5a110cecd77d"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = "Telegram-iOS"; - VALIDATE_PRODUCT = YES; - }; - name = ReleaseHockeyapp; - }; D0ECCB871FE9C38500609802 /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0924FFE1FE52C75003F693F /* Config-Hockeyapp Internal.xcconfig */; + baseConfigurationReference = D0338735223A9A99007A2CE4 /* Config-Hockeyapp-Internal.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -8520,7 +7991,6 @@ 09C56FAF2172797500BDF00F /* DebugAppStoreLLC */, 09C56FB02172797500BDF00F /* ReleaseAppStore */, 09C56FB12172797500BDF00F /* ReleaseAppStoreLLC */, - 09C56FB22172797500BDF00F /* ReleaseHockeyapp */, 09C56FB32172797500BDF00F /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8535,7 +8005,6 @@ 09C56FA82172797500BDF00F /* DebugAppStoreLLC */, 09C56FA92172797500BDF00F /* ReleaseAppStore */, 09C56FAA2172797500BDF00F /* ReleaseAppStoreLLC */, - 09C56FAB2172797500BDF00F /* ReleaseHockeyapp */, 09C56FAC2172797500BDF00F /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8550,7 +8019,6 @@ D000CAD421FB6E380011B15D /* DebugAppStoreLLC */, D000CAD521FB6E380011B15D /* ReleaseAppStore */, D000CAD621FB6E380011B15D /* ReleaseAppStoreLLC */, - D000CAD721FB6E380011B15D /* ReleaseHockeyapp */, D000CAD821FB6E380011B15D /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8565,7 +8033,6 @@ D0ADF915212B3A9D00310BBC /* DebugAppStoreLLC */, D00859BA1B28189D00EAF753 /* ReleaseAppStore */, D0CE6F0D213DC33200BCD44B /* ReleaseAppStoreLLC */, - D0D7481D1CBBE0AC00B0ED5C /* ReleaseHockeyapp */, D0924FF91FE52C46003F693F /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8580,7 +8047,6 @@ D0ADF916212B3A9D00310BBC /* DebugAppStoreLLC */, D00859BD1B28189D00EAF753 /* ReleaseAppStore */, D0CE6F0E213DC33200BCD44B /* ReleaseAppStoreLLC */, - D0D7481E1CBBE0AC00B0ED5C /* ReleaseHockeyapp */, D0924FFA1FE52C46003F693F /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8595,7 +8061,6 @@ D0ADF917212B3A9E00310BBC /* DebugAppStoreLLC */, D00859C01B28189D00EAF753 /* ReleaseAppStore */, D0CE6F0F213DC33200BCD44B /* ReleaseAppStoreLLC */, - D0D7481F1CBBE0AC00B0ED5C /* ReleaseHockeyapp */, D0924FFB1FE52C46003F693F /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8610,7 +8075,6 @@ D02CF60B215D9ABF00E0F56A /* DebugAppStoreLLC */, D02CF60C215D9ABF00E0F56A /* ReleaseAppStore */, D02CF60D215D9ABF00E0F56A /* ReleaseAppStoreLLC */, - D02CF60E215D9ABF00E0F56A /* ReleaseHockeyapp */, D02CF60F215D9ABF00E0F56A /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8625,7 +8089,6 @@ D0ADF918212B3A9E00310BBC /* DebugAppStoreLLC */, D03B0E851D63484500955575 /* ReleaseAppStore */, D0CE6F10213DC33200BCD44B /* ReleaseAppStoreLLC */, - D03B0E861D63484500955575 /* ReleaseHockeyapp */, D0924FFC1FE52C46003F693F /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8640,7 +8103,6 @@ D0ADF91B212B3A9E00310BBC /* DebugAppStoreLLC */, D0B2F745204F4C9900D3BFB9 /* ReleaseAppStore */, D0CE6F13213DC33200BCD44B /* ReleaseAppStoreLLC */, - D0B2F746204F4C9900D3BFB9 /* ReleaseHockeyapp */, D0B2F747204F4C9900D3BFB9 /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8655,7 +8117,6 @@ D0ADF919212B3A9E00310BBC /* DebugAppStoreLLC */, D0D268901D79A70B00C422DA /* ReleaseAppStore */, D0CE6F11213DC33200BCD44B /* ReleaseAppStoreLLC */, - D0D268911D79A70B00C422DA /* ReleaseHockeyapp */, D0924FFD1FE52C46003F693F /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; @@ -8670,7 +8131,6 @@ D0ADF91A212B3A9E00310BBC /* DebugAppStoreLLC */, D0ECCB851FE9C38500609802 /* ReleaseAppStore */, D0CE6F12213DC33200BCD44B /* ReleaseAppStoreLLC */, - D0ECCB861FE9C38500609802 /* ReleaseHockeyapp */, D0ECCB871FE9C38500609802 /* ReleaseHockeyappInternal */, ); defaultConfigurationIsVisible = 0; diff --git a/Telegram-iOS.xcworkspace/xcshareddata/xcschemes/Telegram-iOS-Hockeyapp.xcscheme b/Telegram-iOS.xcworkspace/xcshareddata/xcschemes/Telegram-iOS-Hockeyapp.xcscheme deleted file mode 100644 index a5e8ee86e9..0000000000 --- a/Telegram-iOS.xcworkspace/xcshareddata/xcschemes/Telegram-iOS-Hockeyapp.xcscheme +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Telegram-iOS/AppDelegate.swift b/Telegram-iOS/AppDelegate.swift index afecef9270..125df21817 100644 --- a/Telegram-iOS/AppDelegate.swift +++ b/Telegram-iOS/AppDelegate.swift @@ -344,7 +344,7 @@ private final class SharedApplicationContext { let appVersion = (Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String) ?? "unknown" - let networkArguments = NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: PresentationCallManager.voipMaxLayer) + let networkArguments = NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: PresentationCallManager.voipMaxLayer, appData: BuildConfig.shared().bundleData) let appGroupName = "group.\(Bundle.main.bundleIdentifier!)" let maybeAppGroupUrl = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroupName) @@ -1076,8 +1076,8 @@ private final class SharedApplicationContext { } }) - if !BuildConfig.shared().hockeyAppId.isEmpty { - BITHockeyManager.shared().configure(withIdentifier: BuildConfig.shared().hockeyAppId, delegate: self) + if let hockeyAppId = BuildConfig.shared().hockeyAppId, !hockeyAppId.isEmpty { + BITHockeyManager.shared().configure(withIdentifier: hockeyAppId, delegate: self) BITHockeyManager.shared().crashManager.crashManagerStatus = .alwaysAsk BITHockeyManager.shared().start() BITHockeyManager.shared().authenticator.authenticateInstallation() @@ -1612,81 +1612,84 @@ private final class SharedApplicationContext { @available(iOS 10.0, *) func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { - if response.actionIdentifier == UNNotificationDefaultActionIdentifier { - if let peerId = peerIdFromNotification(response.notification) { - var messageId: MessageId? = nil - if response.notification.request.content.categoryIdentifier == "watch" { - messageId = messageIdFromNotification(peerId: peerId, notification: response.notification) - } - self.openChatWhenReady(accountId: accountIdFromNotification(response.notification), peerId: peerId, messageId: messageId) - } - completionHandler() - } else if response.actionIdentifier == "reply", let peerId = peerIdFromNotification(response.notification), let accountId = accountIdFromNotification(response.notification) { - guard let response = response as? UNTextInputNotificationResponse, !response.userText.isEmpty else { - completionHandler() - return - } - let text = response.userText - let signal = self.sharedContextPromise.get() - |> take(1) - |> deliverOnMainQueue - |> mapToSignal { sharedContext -> Signal in - sharedContext.wakeupManager.allowBackgroundTimeExtension(timeout: 4.0) - return sharedContext.sharedContext.activeAccounts - |> mapToSignal { _, accounts, _ -> Signal in - for account in accounts { - if account.1.id == accountId { - return .single(account.1) - } + let _ = (accountIdFromNotification(response.notification, sharedContext: self.sharedContextPromise.get()) + |> deliverOnMainQueue).start(next: { accountId in + if response.actionIdentifier == UNNotificationDefaultActionIdentifier { + if let peerId = peerIdFromNotification(response.notification) { + var messageId: MessageId? = nil + if response.notification.request.content.categoryIdentifier == "watch" { + messageId = messageIdFromNotification(peerId: peerId, notification: response.notification) } - return .complete() + self.openChatWhenReady(accountId: accountId, peerId: peerId, messageId: messageId) } + completionHandler() + } else if response.actionIdentifier == "reply", let peerId = peerIdFromNotification(response.notification), let accountId = accountId { + guard let response = response as? UNTextInputNotificationResponse, !response.userText.isEmpty else { + completionHandler() + return + } + let text = response.userText + let signal = self.sharedContextPromise.get() |> take(1) |> deliverOnMainQueue - |> mapToSignal { account -> Signal in - if let messageId = messageIdFromNotification(peerId: peerId, notification: response.notification) { - let _ = applyMaxReadIndexInteractively(postbox: account.postbox, stateManager: account.stateManager, index: MessageIndex(id: messageId, timestamp: 0)).start() - } - return enqueueMessages(account: account, peerId: peerId, messages: [EnqueueMessage.message(text: text, attributes: [], mediaReference: nil, replyToMessageId: nil, localGroupingKey: nil)]) - |> map { messageIds -> MessageId? in - if messageIds.isEmpty { - return nil - } else { - return messageIds[0] - } - } - |> mapToSignal { messageId -> Signal in - if let messageId = messageId { - return account.postbox.unsentMessageIdsView() - |> filter { view in - return !view.ids.contains(messageId) + |> mapToSignal { sharedContext -> Signal in + sharedContext.wakeupManager.allowBackgroundTimeExtension(timeout: 4.0) + return sharedContext.sharedContext.activeAccounts + |> mapToSignal { _, accounts, _ -> Signal in + for account in accounts { + if account.1.id == accountId { + return .single(account.1) } - |> take(1) - |> mapToSignal { _ -> Signal in + } + return .complete() + } + |> take(1) + |> deliverOnMainQueue + |> mapToSignal { account -> Signal in + if let messageId = messageIdFromNotification(peerId: peerId, notification: response.notification) { + let _ = applyMaxReadIndexInteractively(postbox: account.postbox, stateManager: account.stateManager, index: MessageIndex(id: messageId, timestamp: 0)).start() + } + return enqueueMessages(account: account, peerId: peerId, messages: [EnqueueMessage.message(text: text, attributes: [], mediaReference: nil, replyToMessageId: nil, localGroupingKey: nil)]) + |> map { messageIds -> MessageId? in + if messageIds.isEmpty { + return nil + } else { + return messageIds[0] + } + } + |> mapToSignal { messageId -> Signal in + if let messageId = messageId { + return account.postbox.unsentMessageIdsView() + |> filter { view in + return !view.ids.contains(messageId) + } + |> take(1) + |> mapToSignal { _ -> Signal in + return .complete() + } + } else { return .complete() } - } else { - return .complete() } } } - } - |> deliverOnMainQueue - - let disposable = MetaDisposable() - disposable.set((signal - |> afterDisposed { [weak disposable] in - Queue.mainQueue().async { - if let disposable = disposable { - self.replyFromNotificationsDisposables.remove(disposable) + |> deliverOnMainQueue + + let disposable = MetaDisposable() + disposable.set((signal + |> afterDisposed { [weak disposable] in + Queue.mainQueue().async { + if let disposable = disposable { + self.replyFromNotificationsDisposables.remove(disposable) + } + completionHandler() } - completionHandler() - } - }).start()) - self.replyFromNotificationsDisposables.add(disposable) - } else { - completionHandler() - } + }).start()) + self.replyFromNotificationsDisposables.add(disposable) + } else { + completionHandler() + } + }) } private func registerForNotifications(context: AccountContext, authorize: Bool = true, completion: @escaping (Bool) -> Void = { _ in }) { @@ -1731,7 +1734,7 @@ private final class SharedApplicationContext { replyMessageCategory = UNNotificationCategory(identifier: "withReply", actions: [reply], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: hiddenContentString, options: options) replyLegacyMessageCategory = UNNotificationCategory(identifier: "r", actions: [reply], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: hiddenContentString, options: options) replyLegacyMediaMessageCategory = UNNotificationCategory(identifier: "m", actions: [reply], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: hiddenContentString, options: options) - legacyChannelMessageCategory = UNNotificationCategory(identifier: "c", actions: [reply], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: hiddenContentString, options: options) + legacyChannelMessageCategory = UNNotificationCategory(identifier: "c", actions: [], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: hiddenContentString, options: options) replyMediaMessageCategory = UNNotificationCategory(identifier: "withReplyMedia", actions: [reply], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: hiddenContentString, options: options) muteMessageCategory = UNNotificationCategory(identifier: "withMute", actions: [], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: hiddenContentString, options: options) muteMediaMessageCategory = UNNotificationCategory(identifier: "withMuteMedia", actions: [], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: hiddenContentString, options: options) @@ -1884,11 +1887,14 @@ private final class SharedApplicationContext { @available(iOS 10.0, *) func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - if let context = self.contextValue { - if let accountId = accountIdFromNotification(notification), context.context.account.id != accountId { - completionHandler([.alert]) + let _ = (accountIdFromNotification(notification, sharedContext: self.sharedContextPromise.get()) + |> deliverOnMainQueue).start(next: { accountId in + if let context = self.contextValue { + if let accountId = accountId, context.context.account.id != accountId { + completionHandler([.alert]) + } } - } + }) } override var next: UIResponder? { @@ -1913,13 +1919,70 @@ private final class SharedApplicationContext { } } -@available(iOS 10.0, *) -private func accountIdFromNotification(_ notification: UNNotification) -> AccountRecordId? { - if let id = notification.request.content.userInfo["accountId"] as? Int64 { - return AccountRecordId(rawValue: id) - } else { +private func notificationPayloadKey(data: Data) -> Data? { + if data.count < 8 { return nil } + return data.subdata(in: 0 ..< 8) +} + +@available(iOS 10.0, *) +private func accountIdFromNotification(_ notification: UNNotification, sharedContext: Signal) -> Signal { + if let id = notification.request.content.userInfo["accountId"] as? Int64 { + return .single(AccountRecordId(rawValue: id)) + } else { + var encryptedData: Data? + if var encryptedPayload = notification.request.content.userInfo["p"] as? String { + encryptedPayload = encryptedPayload.replacingOccurrences(of: "-", with: "+") + encryptedPayload = encryptedPayload.replacingOccurrences(of: "_", with: "/") + while encryptedPayload.count % 4 != 0 { + encryptedPayload.append("=") + } + encryptedData = Data(base64Encoded: encryptedPayload) + } + if let encryptedData = encryptedData, let notificationKeyId = notificationPayloadKey(data: encryptedData) { + return sharedContext + |> take(1) + |> mapToSignal { sharedContext -> Signal in + return sharedContext.sharedContext.activeAccounts + |> take(1) + |> mapToSignal { _, accounts, _ -> Signal in + let keys = accounts.map { _, account, _ -> Signal<(AccountRecordId, MasterNotificationKey)?, NoError> in + return masterNotificationsKey(account: account, ignoreDisabled: true) + |> map { key in + return (account.id, key) + } + } + return combineLatest(keys) + |> map { keys -> AccountRecordId? in + for idAndKey in keys { + if let (id, key) = idAndKey, key.id == notificationKeyId { + return id + } + } + return nil + } + } + } + } else if let userId = notification.request.content.userInfo["userId"] as? Int { + return sharedContext + |> take(1) + |> mapToSignal { sharedContext -> Signal in + return sharedContext.sharedContext.activeAccounts + |> take(1) + |> map { _, accounts, _ -> AccountRecordId? in + for (_, account, _) in accounts { + if Int(account.peerId.id) == userId { + return account.id + } + } + return nil + } + } + } else { + return .single(nil) + } + } } @available(iOS 10.0, *) diff --git a/Telegram-iOS/ApplicationContext.swift b/Telegram-iOS/ApplicationContext.swift index 7839461bc6..16f24bdfb4 100644 --- a/Telegram-iOS/ApplicationContext.swift +++ b/Telegram-iOS/ApplicationContext.swift @@ -649,7 +649,7 @@ final class AuthorizedApplicationContext { if !didAppear { Queue.mainQueue().after(0.15, { - (strongSelf.rootController.viewControllers.last as? ViewController)?.present(controller, in: .window(.root), with: ViewControllerPresentationArguments.init(presentationAnimation: .modalSheet)) + (strongSelf.rootController.viewControllers.last as? ViewController)?.present(controller, in: .window(.root), with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet)) }) } } else { @@ -698,7 +698,7 @@ final class AuthorizedApplicationContext { if let strongSelf = self{ for text in alerts { let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 } - let controller = standardTextAlertController(theme: AlertControllerTheme(presentationTheme: presentationData.theme), title: nil, text: text, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]) + let controller = textAlertController(context: strongSelf.context, title: nil, text: text, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]) (strongSelf.rootController.viewControllers.last as? ViewController)?.present(controller, in: .window(.root)) } } @@ -712,10 +712,10 @@ final class AuthorizedApplicationContext { }) let importableContacts = self.context.sharedContext.contactDataManager?.importable() ?? .single([:]) - self.context.account.importableContacts.set(self.context.sharedContext.accountManager.sharedData(keys: [ApplicationSpecificSharedDataKeys.contactSynchronizationSettings]) - |> mapToSignal { sharedData -> Signal<[DeviceContactNormalizedPhoneNumber: ImportableDeviceContactData], NoError> in - let settings: ContactSynchronizationSettings = (sharedData.entries[ApplicationSpecificSharedDataKeys.contactSynchronizationSettings] as? ContactSynchronizationSettings) ?? .defaultSettings - if settings.synchronizeDeviceContacts { + self.context.account.importableContacts.set(self.context.account.postbox.preferencesView(keys: [PreferencesKeys.contactsSettings]) + |> mapToSignal { preferences -> Signal<[DeviceContactNormalizedPhoneNumber: ImportableDeviceContactData], NoError> in + let settings: ContactsSettings = (preferences.values[PreferencesKeys.contactsSettings] as? ContactsSettings) ?? .defaultSettings + if settings.synchronizeContacts { return importableContacts } else { return .single([:]) @@ -783,7 +783,7 @@ final class AuthorizedApplicationContext { navigateToMessage() } else { let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 } - let controller = standardTextAlertController(theme: AlertControllerTheme(presentationTheme: presentationData.theme), title: presentationData.strings.WatchRemote_AlertTitle, text: presentationData.strings.WatchRemote_AlertText, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.WatchRemote_AlertOpen, action:navigateToMessage)]) + let controller = textAlertController(context: strongSelf.context, title: presentationData.strings.WatchRemote_AlertTitle, text: presentationData.strings.WatchRemote_AlertText, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.WatchRemote_AlertOpen, action:navigateToMessage)]) (strongSelf.rootController.viewControllers.last as? ViewController)?.present(controller, in: .window(.root)) } } else { @@ -840,7 +840,7 @@ final class AuthorizedApplicationContext { } func openRootSearch() { - self.rootController.openChatsSearch() + self.rootController.openChatsController(activateSearch: true) } func openRootCompose() { diff --git a/Telegram-iOS/BuildConfig.h b/Telegram-iOS/BuildConfig.h index 3999c08a9a..09863f7b4d 100644 --- a/Telegram-iOS/BuildConfig.h +++ b/Telegram-iOS/BuildConfig.h @@ -4,7 +4,8 @@ + (instancetype _Nonnull)sharedBuildConfig; -@property (nonatomic, strong, readonly) NSString * _Nonnull hockeyAppId; +@property (nonatomic, strong, readonly) NSData * _Nullable bundleData; +@property (nonatomic, strong, readonly) NSString * _Nullable hockeyAppId; @property (nonatomic, readonly) int32_t apiId; @property (nonatomic, strong, readonly) NSString * _Nonnull apiHash; @property (nonatomic, readonly) bool isInternalBuild; diff --git a/Telegram-iOS/BuildConfig.m b/Telegram-iOS/BuildConfig.m index 58175cecd3..dee236810a 100644 --- a/Telegram-iOS/BuildConfig.m +++ b/Telegram-iOS/BuildConfig.m @@ -1,7 +1,265 @@ #import "BuildConfig.h" +#include +#include +#include + +#include +#include +#include +#include +#include + +#import + +static uint32_t funcSwap32(uint32_t input) +{ + return OSSwapBigToHostInt32(input); +} + +static uint32_t funcNoSwap32(uint32_t input) +{ + return OSSwapLittleToHostInt32(input); +} + +/* + * Magic numbers used by Code Signing + */ +enum { + kSecCodeMagicRequirement = 0xfade0c00, /* single requirement */ + kSecCodeMagicRequirementSet = 0xfade0c01, /* requirement set */ + kSecCodeMagicCodeDirectory = 0xfade0c02, /* CodeDirectory */ + kSecCodeMagicEmbeddedSignature = 0xfade0cc0, /* single-architecture embedded signature */ + kSecCodeMagicDetachedSignature = 0xfade0cc1, /* detached multi-architecture signature */ + kSecCodeMagicEntitlement = 0xfade7171, /* entitlement blob */ + + kSecCodeMagicByte = 0xfa /* shared first byte */ +}; + + +/* + * Structure of an embedded-signature SuperBlob + */ +typedef struct __BlobIndex { + uint32_t type; /* type of entry */ + uint32_t offset; /* offset of entry */ +} CS_BlobIndex; + +typedef struct __Blob { + uint32_t magic; /* magic number */ + uint32_t length; /* total length of SuperBlob */ +} CS_Blob; + +typedef struct __SuperBlob { + CS_Blob blob; + uint32_t count; /* number of index entries following */ + CS_BlobIndex index[]; /* (count) entries */ + /* followed by Blobs in no particular order as indicated by offsets in index */ +} CS_SuperBlob; + + +/* + * C form of a CodeDirectory. + */ +typedef struct __CodeDirectory { + uint32_t magic; /* magic number (CSMAGIC_CODEDIRECTORY) */ + uint32_t length; /* total length of CodeDirectory blob */ + uint32_t version; /* compatibility version */ + uint32_t flags; /* setup and mode flags */ + uint32_t hashOffset; /* offset of hash slot element at index zero */ + uint32_t identOffset; /* offset of identifier string */ + uint32_t nSpecialSlots; /* number of special hash slots */ + uint32_t nCodeSlots; /* number of ordinary (code) hash slots */ + uint32_t codeLimit; /* limit to main image signature range */ + uint8_t hashSize; /* size of each hash in bytes */ + uint8_t hashType; /* type of hash (cdHashType* constants) */ + uint8_t spare1; /* unused (must be zero) */ + uint8_t pageSize; /* log2(page size in bytes); 0 => infinite */ + uint32_t spare2; /* unused (must be zero) */ + /* followed by dynamic content as located by offset fields above */ +} CS_CodeDirectory; + +static MTPKCS * _Nullable parseSignature(const char* buffer, size_t size) { + CS_SuperBlob* sb = (CS_SuperBlob*)buffer; + if (OSSwapBigToHostInt32(sb->blob.magic) != kSecCodeMagicEmbeddedSignature) + { + return 0; + } + + uint32_t count = OSSwapBigToHostInt32(sb->count); + + for (uint32_t i = 0; i < count; i++) + { + uint32_t offset = OSSwapBigToHostInt32(sb->index[i].offset); + + const CS_Blob* blob = (const CS_Blob*)(buffer + offset); + + if (OSSwapBigToHostInt32(blob->magic) == 0xfade0b01) // signature + { + printf("Embedded signature, length: %d\n", OSSwapBigToHostInt32(blob->length)); + + if (OSSwapBigToHostInt32(blob->length) != 8) + { + const unsigned char* message = (const unsigned char*)buffer + offset + 8; + MTPKCS *result = [MTPKCS parse:message size:(OSSwapBigToHostInt32(blob->length) - 8)]; + return result; + } + } + } + + return nil; +} + +static MTPKCS * _Nullable parseArch(const char* buffer, size_t size) { + uint32_t (*swap32)(uint32_t) = funcNoSwap32; + + uint32_t offset = 0; + + const struct mach_header* header = (struct mach_header*)(buffer + offset); + + switch (header->magic) { + case MH_CIGAM: + swap32 = funcSwap32; + case MH_MAGIC: + offset += sizeof(struct mach_header); + break; + case MH_CIGAM_64: + swap32 = funcSwap32; + case MH_MAGIC_64: + offset += sizeof(struct mach_header_64); + break; + default: + return nil; + } + + const NXArchInfo *archInfo = NXGetArchInfoFromCpuType(swap32(header->cputype), swap32(header->cpusubtype)); + if (archInfo != NULL) { + printf("Architecture: %s\n", archInfo->name); + } + + uint32_t commandCount = swap32(header->ncmds); + + for (uint32_t i = 0; i < commandCount; i++) { + const struct load_command* loadCommand = (const struct load_command*)(buffer + offset); + uint32_t commandSize = swap32(loadCommand->cmdsize); + + uint32_t commandType = swap32(loadCommand->cmd); + if (commandType == LC_CODE_SIGNATURE) { + const struct linkedit_data_command* dataCommand = (const struct linkedit_data_command*)(buffer + offset); + uint32_t dataOffset = swap32(dataCommand->dataoff); + uint32_t dataSize = swap32(dataCommand->datasize); + + return parseSignature(buffer + dataOffset, dataSize); + } + + offset += commandSize; + } + + return nil; +} + +static MTPKCS * _Nullable parseFat(const char *buffer, size_t size) { + size_t offset = 0; + + const struct fat_header* fatHeader = (const struct fat_header*)(buffer + offset); + offset += sizeof(*fatHeader); + + uint32_t archCount = OSSwapBigToHostInt32(fatHeader->nfat_arch); + + for (uint32_t i = 0; i < archCount; i++) { + const struct fat_arch* arch = (const struct fat_arch*)(buffer + offset); + offset += sizeof(*arch); + + uint32_t archOffset = OSSwapBigToHostInt32(arch->offset); + uint32_t archSize = OSSwapBigToHostInt32(arch->size); + + MTPKCS *result = parseArch(buffer + archOffset, archSize); + if (result != nil) { + return result; + } + } + + return nil; +} + +static MTPKCS * _Nullable parseMachO(const char* buffer, size_t size) { + const uint32_t* magic = (const uint32_t*)buffer; + + if (*magic == FAT_CIGAM || *magic == FAT_MAGIC) { + return parseFat(buffer, size); + } else { + return parseArch(buffer, size); + } +} + +static MTPKCS * _Nullable checkSignature(const char *filename) { + char *buffer = NULL; + + int fd = open(filename, O_RDONLY); + + if (fd == -1) { + return nil; + } + + struct stat st; + fstat(fd, &st); + + buffer = mmap(NULL, (size_t)st.st_size, PROT_READ, MAP_FILE|MAP_PRIVATE, fd, 0); + + if (buffer == MAP_FAILED) { + if (buffer) { + munmap(buffer, (size_t)st.st_size); + } + if (fd != -1) { + close(fd); + } + return nil; + } + + MTPKCS *result = parseMachO(buffer, (size_t)st.st_size); + if (buffer) { + munmap(buffer, (size_t)st.st_size); + } + if (fd != -1) { + close(fd); + } + + return result; +} + +@interface BuildConfig () { + NSData * _Nullable _bundleData; + int32_t _apiId; + NSString * _Nonnull _apiHash; + NSString * _Nullable _hockeyAppId; +} + +@end + @implementation BuildConfig ++ (NSString *)bundleId { + NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys: + (__bridge NSString *)kSecClassGenericPassword, (__bridge NSString *)kSecClass, + @"bundleSeedID", kSecAttrAccount, + @"", kSecAttrService, + (id)kCFBooleanTrue, kSecReturnAttributes, + nil]; + CFDictionaryRef result = nil; + OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, (CFTypeRef *)&result); + if (status == errSecItemNotFound) { + status = SecItemAdd((__bridge CFDictionaryRef)query, (CFTypeRef *)&result); + } + if (status != errSecSuccess) { + return nil; + } + NSString *accessGroup = [(__bridge NSDictionary *)result objectForKey:(__bridge NSString *)kSecAttrAccessGroup]; + NSArray *components = [accessGroup componentsSeparatedByString:@"."]; + NSString *bundleSeedID = [[components objectEnumerator] nextObject]; + CFRelease(result); + return bundleSeedID; +} + + (instancetype _Nonnull)sharedBuildConfig { static BuildConfig *instance = nil; static dispatch_once_t onceToken; @@ -11,16 +269,101 @@ return instance; } +- (instancetype)init { + self = [super init]; + if (self != nil) { + char buf[3]; + buf[2] = '\0'; + NSString *hex = @(APP_CONFIG_DATA); + assert(0 == [hex length] % 2); + unsigned char *bytes = malloc([hex length]/2); + unsigned char *bp = bytes; + for (CFIndex i = 0; i < [hex length]; i += 2) { + buf[0] = [hex characterAtIndex:i]; + buf[1] = [hex characterAtIndex:i+1]; + char *b2 = NULL; + *bp++ = strtol(buf, &b2, 16); + assert(b2 == buf + 2); + } + + NSMutableData *data = [NSMutableData dataWithBytesNoCopy:bytes length:[hex length]/2 freeWhenDone:YES]; + if ([data length] == 0) { + assert(false); + } + + const char *streamCode = "Cypher"; + int keyLength = (int)strlen(streamCode); + int keyOffset = 0; + for (NSUInteger i = 0; i < data.length; i++) { + ((uint8_t *)data.mutableBytes)[i] ^= ((uint8_t *)streamCode)[keyOffset % keyLength]; + keyOffset += 1; + } + + int offset = 0; + uint32_t header = 0; + [data getBytes:&header range:NSMakeRange(offset, 4)]; + offset += 4; + if (header != 0xabcdef01U) { + assert(false); + } + + [data getBytes:&_apiId range:NSMakeRange(offset, 4)]; + offset += 4; + + int32_t apiHashLength = 0; + [data getBytes:&apiHashLength range:NSMakeRange(offset, 4)]; + offset += 4; + + if (apiHashLength > 0) { + _apiHash = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(offset, apiHashLength)] encoding:NSUTF8StringEncoding]; + offset += apiHashLength; + } else { + assert(false); + } + + int32_t hockeyappIdLength = 0; + [data getBytes:&hockeyappIdLength range:NSMakeRange(offset, 4)]; + offset += 4; + + if (hockeyappIdLength > 0) { + _hockeyAppId = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(offset, hockeyappIdLength)] encoding:NSUTF8StringEncoding]; + offset += hockeyappIdLength; + } + + NSString *bundleId = [BuildConfig bundleId]; + + MTPKCS *signature = checkSignature([[[NSBundle mainBundle] executablePath] UTF8String]); + NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init]; + + if (bundleId != nil) { + dataDict[@"bundleId"] = bundleId; + } + if (signature.name != nil) { + dataDict[@"name"] = signature.name; + } + if (signature.data != nil) { + dataDict[@"data"] = [MTSha1(signature.data) base64EncodedStringWithOptions:0]; + } + + _bundleData = [NSJSONSerialization dataWithJSONObject:dataDict options:0 error:nil]; + } + return self; +} + +- (NSData * _Nullable)bundleData { + return _bundleData; +} + - (int32_t)apiId { - return APP_CONFIG_API_ID; + return _apiId; } - (NSString * _Nonnull)apiHash { - return @(APP_CONFIG_API_HASH); + return _apiHash; } -- (NSString * _Nonnull)hockeyAppId { - return @(APP_CONFIG_HOCKEYAPPID); +- (NSString * _Nullable)hockeyAppId { + return _hockeyAppId; } - (bool)isInternalBuild { diff --git a/Telegram-iOS/Config-AppStore.xcconfig b/Telegram-iOS/Config-AppStore.xcconfig index 53d62913df..d714178e63 100644 --- a/Telegram-iOS/Config-AppStore.xcconfig +++ b/Telegram-iOS/Config-AppStore.xcconfig @@ -1 +1 @@ -#include "../../Telegram-iOS-Shared/Config-AppStore.xcconfig" \ No newline at end of file +#include "../../Telegram-iOS-Shared/Config/AppStore/Config.xcconfig" diff --git a/Telegram-iOS/Config-AppStoreLLC.xcconfig b/Telegram-iOS/Config-AppStoreLLC.xcconfig index ddba9e8ff5..02bd936396 100644 --- a/Telegram-iOS/Config-AppStoreLLC.xcconfig +++ b/Telegram-iOS/Config-AppStoreLLC.xcconfig @@ -1 +1 @@ -#include "../../Telegram-iOS-Shared/Config-AppStoreLLC.xcconfig" \ No newline at end of file +#include "../../Telegram-iOS-Shared/Config/AppStoreLLC/Config.xcconfig" diff --git a/Telegram-iOS/Config-Hockeyapp Internal.xcconfig b/Telegram-iOS/Config-Hockeyapp Internal.xcconfig deleted file mode 100644 index 3f8c245107..0000000000 --- a/Telegram-iOS/Config-Hockeyapp Internal.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "../../Telegram-iOS-Shared/Config-Hockeyapp Internal.xcconfig" \ No newline at end of file diff --git a/Telegram-iOS/Config-Hockeyapp-Internal.xcconfig b/Telegram-iOS/Config-Hockeyapp-Internal.xcconfig new file mode 100644 index 0000000000..9fafdabd29 --- /dev/null +++ b/Telegram-iOS/Config-Hockeyapp-Internal.xcconfig @@ -0,0 +1 @@ +#include "../../Telegram-iOS-Shared/Config/Hockeyapp-Internal/Config.xcconfig" diff --git a/Telegram-iOS/Config-Hockeyapp.xcconfig b/Telegram-iOS/Config-Hockeyapp.xcconfig deleted file mode 100644 index 7d6755f1f2..0000000000 --- a/Telegram-iOS/Config-Hockeyapp.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "../../Telegram-iOS-Shared/Config-Hockeyapp.xcconfig" \ No newline at end of file diff --git a/Telegram-iOS/Info.plist b/Telegram-iOS/Info.plist index 3cfbb41ceb..64bcb6a6e0 100644 --- a/Telegram-iOS/Info.plist +++ b/Telegram-iOS/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 5.4.1 + 5.5 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram-iOS/LegacyPreferencesImport.swift b/Telegram-iOS/LegacyPreferencesImport.swift index 610290659e..781b5d4ca6 100644 --- a/Telegram-iOS/LegacyPreferencesImport.swift +++ b/Telegram-iOS/LegacyPreferencesImport.swift @@ -452,14 +452,6 @@ func importLegacyPreferences(accountManager: AccountManager, account: TemporaryA return settings }) - transaction.updateSharedData(ApplicationSpecificSharedDataKeys.contactSynchronizationSettings, { current in - var settings: ContactSynchronizationSettings = current as? ContactSynchronizationSettings ?? .defaultSettings - if let contactsInhibitSync = contactsInhibitSync, contactsInhibitSync { - settings.synchronizeDeviceContacts = false - } - return settings - }) - if let secretInlineBotsInitialized = secretInlineBotsInitialized, secretInlineBotsInitialized { ApplicationSpecificNotice.setSecretChatInlineBotUsage(transaction: transaction) } @@ -469,6 +461,13 @@ func importLegacyPreferences(accountManager: AccountManager, account: TemporaryA } return account.postbox.transaction { transaction -> Void in + transaction.updatePreferencesEntry(key: PreferencesKeys.contactsSettings, { current in + var settings = current as? ContactsSettings ?? ContactsSettings.defaultSettings + if let contactsInhibitSync = contactsInhibitSync, contactsInhibitSync { + settings.synchronizeContacts = false + } + return settings + }) } } |> switchToLatest diff --git a/Telegram-iOS/WatchBridge.swift b/Telegram-iOS/WatchBridge.swift index e44e29a7f1..33f12c1653 100644 --- a/Telegram-iOS/WatchBridge.swift +++ b/Telegram-iOS/WatchBridge.swift @@ -86,7 +86,7 @@ func makeBridgeMedia(message: Message, strings: PresentationStrings, chatPeer: P if let forward = message.forwardInfo { let bridgeForward = TGBridgeForwardedMessageMediaAttachment() - bridgeForward.peerId = makeBridgeIdentifier(forward.author.id) + bridgeForward.peerId = forward.author.flatMap({ makeBridgeIdentifier($0.id) }) ?? 0 if let sourceMessageId = forward.sourceMessageId { bridgeForward.mid = sourceMessageId.id } diff --git a/Telegram-iOS/en.lproj/Localizable.strings b/Telegram-iOS/en.lproj/Localizable.strings index 7e4ebc38b9..34f68766fb 100644 --- a/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram-iOS/en.lproj/Localizable.strings @@ -65,7 +65,7 @@ "PUSH_CHANNEL_MESSAGE_GIF" = "%1$@ posted a GIF"; "PUSH_CHANNEL_MESSAGES" = "%1$@ posted %2$@ messages"; -"PUSH_PINNED_TEXT" = "%1$@ pinned \"%2$@\""; +"PUSH_PINNED_TEXT" = "%1$@ pinned \"%2$@\" "; "PUSH_PINNED_NOTEXT" = "%1$@ pinned a message"; "PUSH_PINNED_PHOTO" = "%1$@ pinned a photo"; "PUSH_PINNED_VIDEO" = "%1$@ pinned a video"; @@ -188,7 +188,7 @@ "PUSH_CHAT_MESSAGES_1" = "%2$@|%1$@ sent a message"; "PUSH_CHAT_MESSAGES_any" = "%2$@|%1$@ sent %3$d messages"; -"PUSH_PINNED_TEXT" = "%1$@|pinned \"%2$@\""; +"PUSH_PINNED_TEXT" = "%1$@|pinned \"%2$@\" "; "PUSH_PINNED_NOTEXT" = "%1$@|pinned a message"; "PUSH_PINNED_PHOTO" = "%1$@|pinned a photo"; "PUSH_PINNED_VIDEO" = "%1$@|pinned a video"; @@ -500,9 +500,9 @@ "Notification.Kicked" = "%@ removed %@"; "Notification.CreatedChat" = "%@ created a group"; "Notification.CreatedChannel" = "Channel created"; -"Notification.CreatedChatWithTitle" = "%@ created the group \"%@\""; +"Notification.CreatedChatWithTitle" = "%@ created the group \"%@\" "; "Notification.Joined" = "%@ joined Telegram"; -"Notification.ChangedGroupName" = "%@ changed group name to \"%@\""; +"Notification.ChangedGroupName" = "%@ changed group name to \"%@\" "; "Notification.NewAuthDetected" = "%1$@,\nWe detected a login into your account from a new device on %2$@, %3$@ at %4$@\n\nDevice: %5$@\nLocation: %6$@\n\nIf this wasn't you, you can go to Settings — Privacy and Security — Sessions and terminate that session.\n\nIf you think that somebody logged in to your account against your will, you can enable two-step verification in Privacy and Security settings.\n\nSincerely,\nThe Telegram Team"; "Notification.MessageLifetimeChanged" = "%1$@ set the self-destruct timer to %2$@"; "Notification.MessageLifetimeChangedOutgoing" = "You set the self-destruct timer to %1$@"; @@ -1488,7 +1488,7 @@ "Channel.MessagePhotoUpdated" = "Channel photo updated"; "Channel.MessagePhotoRemoved" = "Channel photo removed"; -"Channel.MessageTitleUpdated" = "Channel renamed to \"%@\""; +"Channel.MessageTitleUpdated" = "Channel renamed to \"%@\" "; "Channel.TitleInfo" = "Channel Info"; "Channel.UpdatePhotoItem" = "Set Channel Photo"; @@ -1896,7 +1896,7 @@ "Group.Username.InvalidTooShort" = "Group names must have at least 5 characters."; "Group.Username.InvalidStartsWithNumber" = "Group names can't start with a number."; -"Notification.PinnedTextMessage" = "%@ pinned \"%@\""; +"Notification.PinnedTextMessage" = "%@ pinned \"%@\" "; "Notification.PinnedPhotoMessage" = "%@ pinned a photo"; "Notification.PinnedVideoMessage" = "%@ pinned a video"; "Notification.PinnedRoundMessage" = "%@ pinned a video message"; @@ -1909,7 +1909,7 @@ "Notification.PinnedDeletedMessage" = "%@ pinned deleted message"; "Notification.PinnedPollMessage" = "%@ pinned a poll"; -"Message.PinnedTextMessage" = "pinned \"%@\""; +"Message.PinnedTextMessage" = "pinned \"%@\" "; "Message.PinnedPhotoMessage" = "pinned photo"; "Message.PinnedVideoMessage" = "pinned video"; "Message.PinnedAudioMessage" = "pinned voice message"; @@ -3052,7 +3052,7 @@ Unused sets are archived when you add more."; "Appearance.ThemeNight" = "Night"; "Appearance.ThemeNightBlue" = "Night Blue"; "Appearance.PreviewReplyAuthor" = "Lucio"; -"Appearance.PreviewReplyText" = "Reinhart, we need to find you some..."; +"Appearance.PreviewReplyText" = "Reinhardt, we need to find you some..."; "Appearance.PreviewIncomingText" = "Ah you kids today with techno music! Enjoy the classics, like Hasselhoff!"; "Appearance.PreviewOutgoingText" = "I can't take you seriously right now. Sorry.."; "Appearance.AccentColor" = "Accent Color"; @@ -4056,3 +4056,142 @@ Unused sets are archived when you add more."; "NotificationSettings.ShowNotificationsAllAccounts" = "All Accounts"; "NotificationSettings.ShowNotificationsAllAccountsInfoOn" = "Turn this off if you want to receive notifications only from your active account."; "NotificationSettings.ShowNotificationsAllAccountsInfoOff" = "Turn this on if you want to receive notifications from all your accounts."; + +"Gif.Search" = "Search GIFs"; +"Gif.NoGifsFound" = "No GIFs Found"; +"Gif.NoGifsPlaceholder" = "You have no saved GIFs yet."; + +"Privacy.ProfilePhoto" = "Profile Photo"; +"Privacy.Forwards" = "Forwarded Messages"; + +"Privacy.ProfilePhoto.WhoCanSeeMyPhoto" = "WHO CAN SEE MY PROFILE PHOTO"; +"Privacy.ProfilePhoto.CustomHelp" = "You can restrict who can see your profile photo with granular precision."; +"Privacy.ProfilePhoto.AlwaysShareWith.Title" = "Always Share With"; +"Privacy.ProfilePhoto.NeverShareWith.Title" = "Never Share With"; + +"Privacy.Forwards.WhoCanForward" = "WHO CAN ADD LINK TO MY ACCOUNT WHEN FORWARDING MY MESSAGES"; +"Privacy.Forwards.CustomHelp" = "When forwarded to other chats, messages you send will not link back to your account."; +"Privacy.Forwards.AlwaysAllow.Title" = "Always Allow"; +"Privacy.Forwards.NeverAllow.Title" = "Never Allow"; + +"Conversation.ContextMenuCancelSending" = "Cancel Sending"; + +"Conversation.ForwardAuthorHiddenTooltip" = "The account was hidden by the user"; + +"Privacy.Forwards.Preview" = "PREVIEW"; +"Privacy.Forwards.PreviewMessageText" = "Reinhardt, we need to find you some new music."; +"Privacy.Forwards.AlwaysLink" = "Link to your account"; +"Privacy.Forwards.LinkIfAllowed" = "Link if allowed by settings below"; +"Privacy.Forwards.NeverLink" = "Not a link to your account"; + +"Chat.UnsendMyMessagesAlertTitle" = "Unsending will also delete messages you sent on %@'s side."; +"Chat.UnsendMyMessages" = "Unsend My Messages"; + +"Chat.DeleteMessagesConfirmation_1" = "Delete message"; +"Chat.DeleteMessagesConfirmation_any" = "Delete %@ messages"; + +"Settings.Search" = "Search"; + +"SettingsSearch.FAQ" = "FAQ"; + +"SettingsSearch.Synonyms.EditProfile.Title" = " "; +"SettingsSearch.Synonyms.EditProfile.Bio" = " "; +"SettingsSearch.Synonyms.EditProfile.PhoneNumber" = " "; +"SettingsSearch.Synonyms.EditProfile.Username" = " "; +"SettingsSearch.Synonyms.EditProfile.AddAccount" = " "; +"SettingsSearch.Synonyms.EditProfile.Logout" = " "; + +"SettingsSearch.Synonyms.Calls.Title" = " "; +"SettingsSearch.Synonyms.Calls.CallTab" = " "; + +"SettingsSearch.Synonyms.Stickers.Title" = " "; +"SettingsSearch.Synonyms.Stickers.SuggestStickers" = " "; +"SettingsSearch.Synonyms.Stickers.FeaturedPacks" = " "; +"SettingsSearch.Synonyms.Stickers.ArchivedPacks" = " "; +"SettingsSearch.Synonyms.Stickers.Masks" = " "; + +"SettingsSearch.Synonyms.Notifications.Title" = " "; +"SettingsSearch.Synonyms.Notifications.MessageNotificationsAlert" = " "; +"SettingsSearch.Synonyms.Notifications.MessageNotificationsPreview" = " "; +"SettingsSearch.Synonyms.Notifications.MessageNotificationsSound" = " "; +"SettingsSearch.Synonyms.Notifications.MessageNotificationsExceptions" = " "; +"SettingsSearch.Synonyms.Notifications.GroupNotificationsAlert" = " "; +"SettingsSearch.Synonyms.Notifications.GroupNotificationsPreview" = " "; +"SettingsSearch.Synonyms.Notifications.GroupNotificationsSound" = " "; +"SettingsSearch.Synonyms.Notifications.GroupNotificationsExceptions" = " "; +"SettingsSearch.Synonyms.Notifications.ChannelNotificationsAlert" = " "; +"SettingsSearch.Synonyms.Notifications.ChannelNotificationsPreview" = " "; +"SettingsSearch.Synonyms.Notifications.ChannelNotificationsSound" = " "; +"SettingsSearch.Synonyms.Notifications.ChannelNotificationsExceptions" = " "; +"SettingsSearch.Synonyms.Notifications.InAppNotificationsSound" = " "; +"SettingsSearch.Synonyms.Notifications.InAppNotificationsVibrate" = " "; +"SettingsSearch.Synonyms.Notifications.InAppNotificationsPreview" = " "; +"SettingsSearch.Synonyms.Notifications.DisplayNamesOnLockScreen" = " "; +"SettingsSearch.Synonyms.Notifications.BadgeIncludeMutedChats" = " "; +"SettingsSearch.Synonyms.Notifications.BadgeIncludeMutedPublicGroups" = " "; +"SettingsSearch.Synonyms.Notifications.BadgeIncludeMutedChannels" = " "; +"SettingsSearch.Synonyms.Notifications.BadgeCountUnreadMessages" = " "; +"SettingsSearch.Synonyms.Notifications.ContactJoined" = " "; +"SettingsSearch.Synonyms.Notifications.ResetAllNotifications" = " "; + +"SettingsSearch.Synonyms.Privacy.Title" = " "; +"SettingsSearch.Synonyms.Privacy.BlockedUsers" = " "; +"SettingsSearch.Synonyms.Privacy.LastSeen" = " "; +"SettingsSearch.Synonyms.Privacy.ProfilePhoto" = " "; +"SettingsSearch.Synonyms.Privacy.Forwards" = " "; +"SettingsSearch.Synonyms.Privacy.Calls" = " "; +"SettingsSearch.Synonyms.Privacy.GroupsAndChannels" = " "; +"SettingsSearch.Synonyms.Privacy.Passcode" = " "; +"SettingsSearch.Synonyms.Privacy.PasscodeAndTouchId" = " "; +"SettingsSearch.Synonyms.Privacy.PasscodeAndFaceId" = " "; +"SettingsSearch.Synonyms.Privacy.TwoStepAuth" = "Password"; +"SettingsSearch.Synonyms.Privacy.AuthSessions" = " "; +"SettingsSearch.Synonyms.Privacy.DeleteAccountIfAwayFor" = " "; + +"SettingsSearch.Synonyms.Privacy.Data.Title" = " "; +"SettingsSearch.Synonyms.Privacy.Data.ContactsReset" = " "; +"SettingsSearch.Synonyms.Privacy.Data.ContactsSync" = " "; +"SettingsSearch.Synonyms.Privacy.Data.TopPeers" = " "; +"SettingsSearch.Synonyms.Privacy.Data.DeleteDrafts" = " "; +"SettingsSearch.Synonyms.Privacy.Data.ClearPaymentsInfo" = " "; +"SettingsSearch.Synonyms.Privacy.Data.SecretChatLinkPreview" = " "; + +"SettingsSearch.Synonyms.Data.Title" = " "; +"SettingsSearch.Synonyms.Data.Storage.Title" = "Cache"; +"SettingsSearch.Synonyms.Data.Storage.KeepMedia" = " "; +"SettingsSearch.Synonyms.Data.Storage.ClearCache" = " "; +"SettingsSearch.Synonyms.Data.NetworkUsage" = " "; +"SettingsSearch.Synonyms.Data.AutoDownloadUsingCellular" = " "; +"SettingsSearch.Synonyms.Data.AutoDownloadUsingWifi" = " "; +"SettingsSearch.Synonyms.Data.AutoDownloadReset" = " "; +"SettingsSearch.Synonyms.Data.AutoplayGifs" = " "; +"SettingsSearch.Synonyms.Data.AutoplayVideos" = " "; +"SettingsSearch.Synonyms.Data.CallsUseLessData" = " "; +"SettingsSearch.Synonyms.Data.SaveIncomingPhotos" = " "; +"SettingsSearch.Synonyms.Data.SaveEditedPhotos" = " "; +"SettingsSearch.Synonyms.Data.DownloadInBackground" = " "; + +"SettingsSearch.Synonyms.Proxy.Title" = "SOCKS5\nMTProto"; +"SettingsSearch.Synonyms.Proxy.AddProxy" = " "; +"SettingsSearch.Synonyms.Proxy.UseForCalls" = " "; + +"SettingsSearch.Synonyms.Appearance.Title" = " "; +"SettingsSearch.Synonyms.Appearance.TextSize" = " "; +"SettingsSearch.Synonyms.Appearance.ChatBackground" = "Wallpaper"; +"SettingsSearch.Synonyms.Appearance.ChatBackground.SetColor" = " "; +"SettingsSearch.Synonyms.Appearance.ChatBackground.Custom" = " "; +"SettingsSearch.Synonyms.Appearance.AutoNightTheme" = " "; +"SettingsSearch.Synonyms.Appearance.ColorTheme" = " "; +"SettingsSearch.Synonyms.Appearance.Animations" = "Animations"; + +"SettingsSearch.Synonyms.SavedMessages" = " "; +"SettingsSearch.Synonyms.AppLanguage" = " "; +"SettingsSearch.Synonyms.Passport" = " "; +"SettingsSearch.Synonyms.Watch" = "Apple Watch"; +"SettingsSearch.Synonyms.Support" = "Support"; +"SettingsSearch.Synonyms.FAQ" = " "; + +"ChatList.DeleteForCurrentUser" = "Delete just for me"; +"ChatList.DeleteForEveryone" = "Delete for me and %@"; + +"ChatList.ClearChatConfirmation" = "Are you sure you want to delete all\nmessages in the chat with %@?"; diff --git a/Watch/App/Info.plist b/Watch/App/Info.plist index abf8b519f7..f6b63768b0 100644 --- a/Watch/App/Info.plist +++ b/Watch/App/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 5.4.1 + 5.5 CFBundleVersion ${BUILD_NUMBER} UISupportedInterfaceOrientations diff --git a/Watch/Extension/Info.plist b/Watch/Extension/Info.plist index 640e312a70..cff3e8511b 100644 --- a/Watch/Extension/Info.plist +++ b/Watch/Extension/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 5.4.1 + 5.5 CFBundleVersion ${BUILD_NUMBER} NSExtension diff --git a/Widget/Info.plist b/Widget/Info.plist index a6d83b433d..2eff403b88 100644 --- a/Widget/Info.plist +++ b/Widget/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 5.4.1 + 5.5 CFBundleVersion ${BUILD_NUMBER} NSExtension diff --git a/Widget/TodayViewController.swift b/Widget/TodayViewController.swift index 9183f8d508..f6c7770a6b 100644 --- a/Widget/TodayViewController.swift +++ b/Widget/TodayViewController.swift @@ -78,7 +78,7 @@ class TodayViewController: UIViewController, NCWidgetProviding { let appVersion = (Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String) ?? "unknown" initializeAccountManagement() let accountManager = AccountManager(basePath: rootPath + "/accounts-metadata") - account = currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0), supplementary: true, manager: accountManager, rootPath: rootPath, auxiliaryMethods: auxiliaryMethods) + account = currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0, appData: BuildConfig.shared().bundleData), supplementary: true, manager: accountManager, rootPath: rootPath, auxiliaryMethods: auxiliaryMethods) |> mapToSignal { account -> Signal in if let account = account { switch account { diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 180868f26d..f75068ddbd 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1 +1,63 @@ +fastlane_version "1.81.0" + +default_platform :ios + +base_app_identifier_llc = "ph.telegra.Telegraph" +app_identifier_llc = [ + base_app_identifier_llc, + base_app_identifier_llc + ".Widget", + base_app_identifier_llc + ".NotificationContent", + base_app_identifier_llc + ".SiriIntents", + base_app_identifier_llc + ".Share", + base_app_identifier_llc + ".watchkitapp", + base_app_identifier_llc + ".watchkitapp.watchkitextension", + base_app_identifier_llc + ".NotificationService" +] + +lane :do_build_app do |options| + gym( + workspace: "Telegram-iOS.xcworkspace", + configuration: options[:configuration], + scheme: options[:scheme], + silent: false, + clean: true, + export_method: options[:export_method], + output_name: options[:scheme], + derived_data_path: "build/" + options[:scheme] + "/DerivedData", + xcargs: "BUILD_NUMBER='" + options[:build_number] + "' " + "COMMIT_ID='" + options[:commit_id] + "'", + archive_path: "build/" + options[:scheme] + "/Archive", + export_options: { + compileBitcode: false, + iCloudContainerEnvironment: "Production", + provisioningProfiles: options[:provisioningProfiles], + stripSwiftSymbols: true, + uploadBitcode: false + } + ) +end + +lane :build_for_appstore do |options| + commit = last_git_commit + commit_count = sh("git rev-list --count HEAD") + commit_count_int = commit_count.to_i + 1000 + commit_count_string = commit_count_int.to_s + do_build_app( + configuration: "ReleaseAppStoreLLC", + scheme: "Telegram-iOS-AppStoreLLC", + export_method: "app-store", + build_number: commit_count_string, + commit_id: commit[:commit_hash], + provisioningProfiles: { + base_app_identifier_llc => "match AppStore " + base_app_identifier_llc, + base_app_identifier_llc + ".Share" => "match AppStore " + base_app_identifier_llc + ".Share", + base_app_identifier_llc + ".SiriIntents" => "match AppStore " + base_app_identifier_llc + ".SiriIntents", + base_app_identifier_llc + ".Widget" => "match AppStore " + base_app_identifier_llc + ".Widget", + base_app_identifier_llc + ".NotificationContent" => "match AppStore " + base_app_identifier_llc + ".NotificationContent", + base_app_identifier_llc + ".watchkitapp.watchkitextension" => "match AppStore " + base_app_identifier_llc + ".watchkitapp.watchkitextension", + base_app_identifier_llc + ".watchkitapp" => "match AppStore " + base_app_identifier_llc + ".watchkitapp", + base_app_identifier_llc + ".NotificationService" => "match AppStore " + base_app_identifier_llc + ".NotificationService" + } + ) +end + import "../../Telegram-iOS-Shared/fastlane/Fastfile" diff --git a/submodules/AsyncDisplayKit b/submodules/AsyncDisplayKit index 5cf9244c99..16ce3e690a 160000 --- a/submodules/AsyncDisplayKit +++ b/submodules/AsyncDisplayKit @@ -1 +1 @@ -Subproject commit 5cf9244c99b24d7780cbe2b920e04f3bc1fdbc87 +Subproject commit 16ce3e690a217ce449bb50e057f3550bc7b79613 diff --git a/submodules/Display b/submodules/Display index 7077ff31dc..61d43c3c4b 160000 --- a/submodules/Display +++ b/submodules/Display @@ -1 +1 @@ -Subproject commit 7077ff31dc8786d143ba09b5874f0c014126e6c3 +Subproject commit 61d43c3c4b5286f1bc26cfe0202979925d969e06 diff --git a/submodules/LegacyComponents b/submodules/LegacyComponents index 03f3f3d77b..0d44c9e101 160000 --- a/submodules/LegacyComponents +++ b/submodules/LegacyComponents @@ -1 +1 @@ -Subproject commit 03f3f3d77b56b6673a434e93a5f0f9adf99c4261 +Subproject commit 0d44c9e1016591c4cfdf1886e743b46acc3646fe diff --git a/submodules/MtProtoKit b/submodules/MtProtoKit index f955b9c3f5..579d7f6264 160000 --- a/submodules/MtProtoKit +++ b/submodules/MtProtoKit @@ -1 +1 @@ -Subproject commit f955b9c3f5c4b8d2de441cc8a8c1fa27054da207 +Subproject commit 579d7f626427d0cc82209c1b2fc3be7b97eac68c diff --git a/submodules/Postbox b/submodules/Postbox index c4af1626e3..3d0b885f6a 160000 --- a/submodules/Postbox +++ b/submodules/Postbox @@ -1 +1 @@ -Subproject commit c4af1626e3a45e370c03ce101c54d8c532a6b73a +Subproject commit 3d0b885f6a272c6d931b7d289b7cf427880a2753 diff --git a/submodules/TelegramCore b/submodules/TelegramCore index 9ec5e39542..b3b73b2fde 160000 --- a/submodules/TelegramCore +++ b/submodules/TelegramCore @@ -1 +1 @@ -Subproject commit 9ec5e39542ccadd72e7f3439fb8abdc8fd809de0 +Subproject commit b3b73b2fdeb5d5d1f1d93223603d9dd0b2b66882 diff --git a/submodules/TelegramUI b/submodules/TelegramUI index d80a8291e0..53b3408cb7 160000 --- a/submodules/TelegramUI +++ b/submodules/TelegramUI @@ -1 +1 @@ -Subproject commit d80a8291e03b42a2ce99bf7b4c365683d33622a0 +Subproject commit 53b3408cb72bae7a2dabc026792daae873bdff68 diff --git a/submodules/libtgvoip b/submodules/libtgvoip index 46cd772b3f..16711e2023 160000 --- a/submodules/libtgvoip +++ b/submodules/libtgvoip @@ -1 +1 @@ -Subproject commit 46cd772b3fe0e0048d1ad1721fdc35554ba3f031 +Subproject commit 16711e202393ae7e1b160436f4291c5f06a3d375