Refactor TelegramNotices, TelegramPermissions, PhotoResources, ImageTransparency, TinyThumbnail

This commit is contained in:
Peter 2019-08-11 03:56:10 +03:00
parent 1a1a1a890a
commit 55b0df2ff7
121 changed files with 3449 additions and 249 deletions

View File

@ -34,12 +34,28 @@
<FileRef
location = "group:submodules/Tuples/Tuples_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:submodules/ImageBlur/ImageBlur_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:submodules/SaveToCameraRoll/SaveToCameraRoll_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/TelegramNotices/TelegramNotices_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/TelegramPermissions/TelegramPermissions_Xcode.xcodeproj">
</FileRef>
<Group
location = "container:"
name = "Image Processing">
<FileRef
location = "group:submodules/ImageBlur/ImageBlur_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/TinyThumbnail/TinyThumbnail_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/ImageTransparency/ImageTransparency_Xcode.xcodeproj">
</FileRef>
</Group>
</Group>
<Group
location = "container:"
@ -79,6 +95,9 @@
<FileRef
location = "group:submodules/MediaResources/MediaResources_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/PhotoResources/PhotoResources_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:submodules/StickerResources/StickerResources_Xcode.xcodeproj">
</FileRef>
@ -104,13 +123,13 @@
location = "container:"
name = "Gestures">
<FileRef
location = "group:submodules/TouchDownGesture/TouchDownGesture_Xcode.xcodeproj">
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/TouchDownGesture/TouchDownGesture_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:submodules/SwipeToDismissGesture/SwipeToDismissGesture_Xcode.xcodeproj">
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/SwipeToDismissGesture/SwipeToDismissGesture_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:submodules/DirectionalPanGesture/DirectionalPanGesture_Xcode.xcodeproj">
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/DirectionalPanGesture/DirectionalPanGesture_Xcode.xcodeproj">
</FileRef>
</Group>
<Group
@ -157,7 +176,7 @@
</FileRef>
</Group>
<FileRef
location = "group:submodules/AlertUI/AlertUI_Xcode.xcodeproj">
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/AlertUI/AlertUI_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:submodules/RadialStatusNode/RadialStatusNode_Xcode.xcodeproj">
@ -220,10 +239,10 @@
location = "group:submodules/ContextUI/ContextUI_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:submodules/ComposePollUI/ComposePollUI_Xcode.xcodeproj">
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/ComposePollUI/ComposePollUI_Xcode.xcodeproj">
</FileRef>
<FileRef
location = "group:submodules/UndoUI/UndoUI_Xcode.xcodeproj">
location = "group:/Users/peter/build/telegram-temp/telegram-ios/submodules/UndoUI/UndoUI_Xcode.xcodeproj">
</FileRef>
</Group>
<FileRef

View File

@ -32,6 +32,7 @@
D0879B6F22F83F6600C4D6B3 /* DownloadedMediaStoreManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0879B6E22F83F6600C4D6B3 /* DownloadedMediaStoreManager.swift */; };
D0879B7122F8425B00C4D6B3 /* WallpaperUploadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0879B7022F8425B00C4D6B3 /* WallpaperUploadManager.swift */; };
D0879B7322F842FF00C4D6B3 /* WatchManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0879B7222F842FF00C4D6B3 /* WatchManager.swift */; };
D0C9C12322FE414700FAB518 /* PresentationSurfaceLevels.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C12222FE414700FAB518 /* PresentationSurfaceLevels.swift */; };
D0D3285422F329A900D07EE2 /* AccountContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D3285222F329A900D07EE2 /* AccountContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0D3285F22F335B000D07EE2 /* AccountContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3285E22F335B000D07EE2 /* AccountContext.swift */; };
D0D3289D22F3461700D07EE2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D3289C22F3461700D07EE2 /* Foundation.framework */; };
@ -67,6 +68,7 @@
D0879B6E22F83F6600C4D6B3 /* DownloadedMediaStoreManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadedMediaStoreManager.swift; sourceTree = "<group>"; };
D0879B7022F8425B00C4D6B3 /* WallpaperUploadManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperUploadManager.swift; sourceTree = "<group>"; };
D0879B7222F842FF00C4D6B3 /* WatchManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchManager.swift; sourceTree = "<group>"; };
D0C9C12222FE414700FAB518 /* PresentationSurfaceLevels.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationSurfaceLevels.swift; sourceTree = "<group>"; };
D0D3284F22F329A900D07EE2 /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0D3285222F329A900D07EE2 /* AccountContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountContext.h; sourceTree = "<group>"; };
D0D3285322F329A900D07EE2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@ -140,6 +142,7 @@
D0879B6E22F83F6600C4D6B3 /* DownloadedMediaStoreManager.swift */,
D0879B7022F8425B00C4D6B3 /* WallpaperUploadManager.swift */,
D0879B7222F842FF00C4D6B3 /* WatchManager.swift */,
D0C9C12222FE414700FAB518 /* PresentationSurfaceLevels.swift */,
);
path = Sources;
sourceTree = "<group>";
@ -249,6 +252,7 @@
D0879B7122F8425B00C4D6B3 /* WallpaperUploadManager.swift in Sources */,
D0879B6722F7AE6400C4D6B3 /* PresentationCallManager.swift in Sources */,
D0879B2922F77C8300C4D6B3 /* FetchManager.swift in Sources */,
D0C9C12322FE414700FAB518 /* PresentationSurfaceLevels.swift in Sources */,
D0879B6522F7AC8700C4D6B3 /* OverlayMediaManager.swift in Sources */,
D0879B7322F842FF00C4D6B3 /* WatchManager.swift in Sources */,
D0879B6F22F83F6600C4D6B3 /* DownloadedMediaStoreManager.swift in Sources */,

View File

@ -0,0 +1,555 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
D0C9C10922FE3FFB00FAB518 /* ImageTransparency.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C9C10722FE3FFB00FAB518 /* ImageTransparency.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0C9C11422FE408100FAB518 /* ImageTransparency.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C11322FE408100FAB518 /* ImageTransparency.swift */; };
D0C9C11722FE409600FAB518 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C11622FE409600FAB518 /* UIKit.framework */; };
D0C9C11922FE409900FAB518 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C11822FE409900FAB518 /* Foundation.framework */; };
D0C9C11B22FE409C00FAB518 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C11A22FE409C00FAB518 /* Display.framework */; };
D0C9C11D22FE409F00FAB518 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C11C22FE409F00FAB518 /* Accelerate.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
D0C9C10422FE3FFB00FAB518 /* ImageTransparency.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ImageTransparency.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C10722FE3FFB00FAB518 /* ImageTransparency.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageTransparency.h; sourceTree = "<group>"; };
D0C9C10822FE3FFB00FAB518 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D0C9C11322FE408100FAB518 /* ImageTransparency.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageTransparency.swift; sourceTree = "<group>"; };
D0C9C11622FE409600FAB518 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
D0C9C11822FE409900FAB518 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D0C9C11A22FE409C00FAB518 /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C11C22FE409F00FAB518 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D0C9C10122FE3FFB00FAB518 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C11D22FE409F00FAB518 /* Accelerate.framework in Frameworks */,
D0C9C11B22FE409C00FAB518 /* Display.framework in Frameworks */,
D0C9C11922FE409900FAB518 /* Foundation.framework in Frameworks */,
D0C9C11722FE409600FAB518 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
D0C9C0FA22FE3FFB00FAB518 = {
isa = PBXGroup;
children = (
D0C9C10822FE3FFB00FAB518 /* Info.plist */,
D0C9C10622FE3FFB00FAB518 /* Sources */,
D0C9C10522FE3FFB00FAB518 /* Products */,
D0C9C11522FE409500FAB518 /* Frameworks */,
);
sourceTree = "<group>";
};
D0C9C10522FE3FFB00FAB518 /* Products */ = {
isa = PBXGroup;
children = (
D0C9C10422FE3FFB00FAB518 /* ImageTransparency.framework */,
);
name = Products;
sourceTree = "<group>";
};
D0C9C10622FE3FFB00FAB518 /* Sources */ = {
isa = PBXGroup;
children = (
D0C9C11322FE408100FAB518 /* ImageTransparency.swift */,
D0C9C10722FE3FFB00FAB518 /* ImageTransparency.h */,
);
path = Sources;
sourceTree = "<group>";
};
D0C9C11522FE409500FAB518 /* Frameworks */ = {
isa = PBXGroup;
children = (
D0C9C11C22FE409F00FAB518 /* Accelerate.framework */,
D0C9C11A22FE409C00FAB518 /* Display.framework */,
D0C9C11822FE409900FAB518 /* Foundation.framework */,
D0C9C11622FE409600FAB518 /* UIKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D0C9C0FF22FE3FFB00FAB518 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C10922FE3FFB00FAB518 /* ImageTransparency.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D0C9C10322FE3FFB00FAB518 /* ImageTransparency */ = {
isa = PBXNativeTarget;
buildConfigurationList = D0C9C10C22FE3FFB00FAB518 /* Build configuration list for PBXNativeTarget "ImageTransparency" */;
buildPhases = (
D0C9C0FF22FE3FFB00FAB518 /* Headers */,
D0C9C10022FE3FFB00FAB518 /* Sources */,
D0C9C10122FE3FFB00FAB518 /* Frameworks */,
D0C9C10222FE3FFB00FAB518 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = ImageTransparency;
productName = ImageTransparency;
productReference = D0C9C10422FE3FFB00FAB518 /* ImageTransparency.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D0C9C0FB22FE3FFB00FAB518 /* Project object */ = {
isa = PBXProject;
attributes = {
DefaultBuildSystemTypeForWorkspace = Latest;
LastUpgradeCheck = 1030;
ORGANIZATIONNAME = "Telegram Messenger LLP";
TargetAttributes = {
D0C9C10322FE3FFB00FAB518 = {
CreatedOnToolsVersion = 10.3;
LastSwiftMigration = 1030;
};
};
};
buildConfigurationList = D0C9C0FE22FE3FFB00FAB518 /* Build configuration list for PBXProject "ImageTransparency_Xcode" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = D0C9C0FA22FE3FFB00FAB518;
productRefGroup = D0C9C10522FE3FFB00FAB518 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D0C9C10322FE3FFB00FAB518 /* ImageTransparency */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D0C9C10222FE3FFB00FAB518 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D0C9C10022FE3FFB00FAB518 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C11422FE408100FAB518 /* ImageTransparency.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
D0C9C10A22FE3FFB00FAB518 /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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 = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugAppStoreLLC;
};
D0C9C10B22FE3FFB00FAB518 /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = ReleaseAppStoreLLC;
};
D0C9C10D22FE3FFB00FAB518 /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ImageTransparency;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugAppStoreLLC;
};
D0C9C10E22FE3FFB00FAB518 /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ImageTransparency;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseAppStoreLLC;
};
D0C9C10F22FE404B00FAB518 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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 = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugHockeyapp;
};
D0C9C11022FE404B00FAB518 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ImageTransparency;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugHockeyapp;
};
D0C9C11122FE405500FAB518 /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = ReleaseHockeyappInternal;
};
D0C9C11222FE405500FAB518 /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ImageTransparency;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseHockeyappInternal;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D0C9C0FE22FE3FFB00FAB518 /* Build configuration list for PBXProject "ImageTransparency_Xcode" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0C9C10A22FE3FFB00FAB518 /* DebugAppStoreLLC */,
D0C9C10F22FE404B00FAB518 /* DebugHockeyapp */,
D0C9C10B22FE3FFB00FAB518 /* ReleaseAppStoreLLC */,
D0C9C11122FE405500FAB518 /* ReleaseHockeyappInternal */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseAppStoreLLC;
};
D0C9C10C22FE3FFB00FAB518 /* Build configuration list for PBXNativeTarget "ImageTransparency" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0C9C10D22FE3FFB00FAB518 /* DebugAppStoreLLC */,
D0C9C11022FE404B00FAB518 /* DebugHockeyapp */,
D0C9C10E22FE3FFB00FAB518 /* ReleaseAppStoreLLC */,
D0C9C11222FE405500FAB518 /* ReleaseHockeyappInternal */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseAppStoreLLC;
};
/* End XCConfigurationList section */
};
rootObject = D0C9C0FB22FE3FFB00FAB518 /* Project object */;
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

View File

@ -0,0 +1,19 @@
//
// ImageTransparency.h
// ImageTransparency
//
// Created by Peter on 8/10/19.
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for ImageTransparency.
FOUNDATION_EXPORT double ImageTransparencyVersionNumber;
//! Project version string for ImageTransparency.
FOUNDATION_EXPORT const unsigned char ImageTransparencyVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ImageTransparency/PublicHeader.h>

View File

@ -1,7 +1,6 @@
import UIKit
import Accelerate
import Display
import TelegramCore
private func generateHistogram(cgImage: CGImage) -> ([[vImagePixelCount]], Int)? {
var sourceBuffer = vImage_Buffer()
@ -43,7 +42,7 @@ private func generateHistogram(cgImage: CGImage) -> ([[vImagePixelCount]], Int)?
return (histogramBins, alphaBinIndex)
}
func imageHasTransparency(_ cgImage: CGImage) -> Bool {
public func imageHasTransparency(_ cgImage: CGImage) -> Bool {
guard cgImage.bitsPerComponent == 8, cgImage.bitsPerPixel == 32 else {
return false
}
@ -74,7 +73,7 @@ private func scaledDrawingContext(_ cgImage: CGImage, maxSize: CGSize) -> Drawin
return context
}
func imageRequiresInversion(_ cgImage: CGImage) -> Bool {
public func imageRequiresInversion(_ cgImage: CGImage) -> Bool {
guard cgImage.bitsPerComponent == 8, cgImage.bitsPerPixel == 32 else {
return false
}

View File

@ -13,6 +13,8 @@
D084FA1222F436D6004874CE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D084FA1122F436D6004874CE /* Foundation.framework */; };
D084FA1422F436DA004874CE /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D084FA1322F436DA004874CE /* Postbox.framework */; };
D084FA1622F436DE004874CE /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D084FA1522F436DE004874CE /* SwiftSignalKit.framework */; };
D0C9C0D322FE3E7500FAB518 /* MapResources.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C0D222FE3E7500FAB518 /* MapResources.swift */; };
D0C9C0D522FE3E8200FAB518 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0D422FE3E8200FAB518 /* MapKit.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -24,6 +26,8 @@
D084FA1122F436D6004874CE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D084FA1322F436DA004874CE /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D084FA1522F436DE004874CE /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0D222FE3E7500FAB518 /* MapResources.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapResources.swift; sourceTree = "<group>"; };
D0C9C0D422FE3E8200FAB518 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -31,6 +35,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C0D522FE3E8200FAB518 /* MapKit.framework in Frameworks */,
D084FA1622F436DE004874CE /* SwiftSignalKit.framework in Frameworks */,
D084FA1422F436DA004874CE /* Postbox.framework in Frameworks */,
D084FA1222F436D6004874CE /* Foundation.framework in Frameworks */,
@ -62,6 +67,7 @@
D084F9FF22F435FD004874CE /* Sources */ = {
isa = PBXGroup;
children = (
D0C9C0D222FE3E7500FAB518 /* MapResources.swift */,
D084FA0C22F436C9004874CE /* CachedResourceRepresentations.swift */,
D084FA0022F435FD004874CE /* MediaResources.h */,
);
@ -71,6 +77,7 @@
D084FA0E22F436D2004874CE /* Frameworks */ = {
isa = PBXGroup;
children = (
D0C9C0D422FE3E8200FAB518 /* MapKit.framework */,
D084FA1522F436DE004874CE /* SwiftSignalKit.framework */,
D084FA1322F436DA004874CE /* Postbox.framework */,
D084FA1122F436D6004874CE /* Foundation.framework */,
@ -159,6 +166,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C0D322FE3E7500FAB518 /* MapResources.swift in Sources */,
D084FA0D22F436C9004874CE /* CachedResourceRepresentations.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

View File

@ -84,7 +84,7 @@ private func adjustGMapLatitude(_ latitude: Double, offset: Int, zoom: Int) -> D
return yToLatitude(latitudeToY(latitude) + t)
}
func fetchMapSnapshotResource(resource: MapSnapshotMediaResource) -> Signal<MediaResourceDataFetchResult, MediaResourceDataFetchError> {
public func fetchMapSnapshotResource(resource: MapSnapshotMediaResource) -> Signal<MediaResourceDataFetchResult, MediaResourceDataFetchError> {
return Signal { subscriber in
let disposable = MetaDisposable()

View File

@ -1,5 +1,6 @@
import Foundation
@inlinable
public func mergeListsStableWithUpdates<T>(leftList: [T], rightList: [T], allUpdated: Bool = false) -> ([Int], [(Int, T, Int?)], [(Int, T, Int)]) where T: Comparable, T: Identifiable {
var removeIndices: [Int] = []
var insertItems: [(Int, T, Int?)] = []
@ -180,6 +181,7 @@ public func mergeListsStableWithUpdates<T>(leftList: [T], rightList: [T], allUpd
return (removeIndices, insertItems, updatedIndices)
}
@inlinable
public func mergeListsStableWithUpdatesReversed<T>(leftList: [T], rightList: [T], allUpdated: Bool = false) -> ([Int], [(Int, T, Int?)], [(Int, T, Int)]) where T: Comparable, T: Identifiable {
var removeIndices: [Int] = []
var insertItems: [(Int, T, Int?)] = []

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

View File

@ -0,0 +1,607 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
D0C9C0A522FE3D6200FAB518 /* PhotoResources.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C9C0A322FE3D6200FAB518 /* PhotoResources.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0C9C0B022FE3DB800FAB518 /* PhotoResources.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C0AF22FE3DB800FAB518 /* PhotoResources.swift */; };
D0C9C0B322FE3DD000FAB518 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0B222FE3DD000FAB518 /* Foundation.framework */; };
D0C9C0B522FE3DD400FAB518 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0B422FE3DD400FAB518 /* UIKit.framework */; };
D0C9C0B722FE3DD800FAB518 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0B622FE3DD800FAB518 /* Postbox.framework */; };
D0C9C0B922FE3DDB00FAB518 /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0B822FE3DDB00FAB518 /* SwiftSignalKit.framework */; };
D0C9C0BB22FE3DE000FAB518 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0BA22FE3DE000FAB518 /* Display.framework */; };
D0C9C0BD22FE3DE400FAB518 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0BC22FE3DE400FAB518 /* AVFoundation.framework */; };
D0C9C0BF22FE3DEB00FAB518 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0BE22FE3DEB00FAB518 /* ImageIO.framework */; };
D0C9C0C122FE3DF300FAB518 /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0C022FE3DF300FAB518 /* TelegramCore.framework */; };
D0C9C0C322FE3DF900FAB518 /* WebP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0C222FE3DF900FAB518 /* WebP.framework */; };
D0C9C0C522FE3E0000FAB518 /* TelegramUIPreferences.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0C422FE3E0000FAB518 /* TelegramUIPreferences.framework */; };
D0C9C0C722FE3E0500FAB518 /* MediaResources.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0C622FE3E0500FAB518 /* MediaResources.framework */; };
D0C9C0C922FE3E0B00FAB518 /* AccountContext.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0C822FE3E0B00FAB518 /* AccountContext.framework */; };
D0C9C0CB22FE3E1200FAB518 /* Tuples.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0CA22FE3E1200FAB518 /* Tuples.framework */; };
D0C9C0CD22FE3E1700FAB518 /* ImageBlur.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0CC22FE3E1700FAB518 /* ImageBlur.framework */; };
D0C9C0F522FE3F8400FAB518 /* TinyThumbnail.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0F422FE3F8400FAB518 /* TinyThumbnail.framework */; };
D0C9C0F922FE3FA500FAB518 /* FrameworkBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C0F822FE3FA500FAB518 /* FrameworkBundle.swift */; };
D0C9C11F22FE40B500FAB518 /* ImageTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C11E22FE40B500FAB518 /* ImageTransparency.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
D0C9C0A022FE3D6200FAB518 /* PhotoResources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PhotoResources.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0A322FE3D6200FAB518 /* PhotoResources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotoResources.h; sourceTree = "<group>"; };
D0C9C0A422FE3D6200FAB518 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D0C9C0AF22FE3DB800FAB518 /* PhotoResources.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotoResources.swift; sourceTree = "<group>"; };
D0C9C0B222FE3DD000FAB518 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D0C9C0B422FE3DD400FAB518 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
D0C9C0B622FE3DD800FAB518 /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0B822FE3DDB00FAB518 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0BA22FE3DE000FAB518 /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0BC22FE3DE400FAB518 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
D0C9C0BE22FE3DEB00FAB518 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
D0C9C0C022FE3DF300FAB518 /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0C222FE3DF900FAB518 /* WebP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WebP.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0C422FE3E0000FAB518 /* TelegramUIPreferences.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramUIPreferences.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0C622FE3E0500FAB518 /* MediaResources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MediaResources.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0C822FE3E0B00FAB518 /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0CA22FE3E1200FAB518 /* Tuples.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Tuples.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0CC22FE3E1700FAB518 /* ImageBlur.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ImageBlur.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0F422FE3F8400FAB518 /* TinyThumbnail.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TinyThumbnail.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C0F822FE3FA500FAB518 /* FrameworkBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkBundle.swift; sourceTree = "<group>"; };
D0C9C11E22FE40B500FAB518 /* ImageTransparency.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ImageTransparency.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D0C9C09D22FE3D6200FAB518 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C11F22FE40B500FAB518 /* ImageTransparency.framework in Frameworks */,
D0C9C0F522FE3F8400FAB518 /* TinyThumbnail.framework in Frameworks */,
D0C9C0CD22FE3E1700FAB518 /* ImageBlur.framework in Frameworks */,
D0C9C0CB22FE3E1200FAB518 /* Tuples.framework in Frameworks */,
D0C9C0C922FE3E0B00FAB518 /* AccountContext.framework in Frameworks */,
D0C9C0C722FE3E0500FAB518 /* MediaResources.framework in Frameworks */,
D0C9C0C522FE3E0000FAB518 /* TelegramUIPreferences.framework in Frameworks */,
D0C9C0C322FE3DF900FAB518 /* WebP.framework in Frameworks */,
D0C9C0C122FE3DF300FAB518 /* TelegramCore.framework in Frameworks */,
D0C9C0BF22FE3DEB00FAB518 /* ImageIO.framework in Frameworks */,
D0C9C0BD22FE3DE400FAB518 /* AVFoundation.framework in Frameworks */,
D0C9C0BB22FE3DE000FAB518 /* Display.framework in Frameworks */,
D0C9C0B922FE3DDB00FAB518 /* SwiftSignalKit.framework in Frameworks */,
D0C9C0B722FE3DD800FAB518 /* Postbox.framework in Frameworks */,
D0C9C0B522FE3DD400FAB518 /* UIKit.framework in Frameworks */,
D0C9C0B322FE3DD000FAB518 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
D0C9C09622FE3D6200FAB518 = {
isa = PBXGroup;
children = (
D0C9C0A422FE3D6200FAB518 /* Info.plist */,
D0C9C0A222FE3D6200FAB518 /* Sources */,
D0C9C0A122FE3D6200FAB518 /* Products */,
D0C9C0B122FE3DD000FAB518 /* Frameworks */,
);
sourceTree = "<group>";
};
D0C9C0A122FE3D6200FAB518 /* Products */ = {
isa = PBXGroup;
children = (
D0C9C0A022FE3D6200FAB518 /* PhotoResources.framework */,
);
name = Products;
sourceTree = "<group>";
};
D0C9C0A222FE3D6200FAB518 /* Sources */ = {
isa = PBXGroup;
children = (
D0C9C0AF22FE3DB800FAB518 /* PhotoResources.swift */,
D0C9C0F822FE3FA500FAB518 /* FrameworkBundle.swift */,
D0C9C0A322FE3D6200FAB518 /* PhotoResources.h */,
);
path = Sources;
sourceTree = "<group>";
};
D0C9C0B122FE3DD000FAB518 /* Frameworks */ = {
isa = PBXGroup;
children = (
D0C9C11E22FE40B500FAB518 /* ImageTransparency.framework */,
D0C9C0F422FE3F8400FAB518 /* TinyThumbnail.framework */,
D0C9C0CC22FE3E1700FAB518 /* ImageBlur.framework */,
D0C9C0CA22FE3E1200FAB518 /* Tuples.framework */,
D0C9C0C822FE3E0B00FAB518 /* AccountContext.framework */,
D0C9C0C622FE3E0500FAB518 /* MediaResources.framework */,
D0C9C0C422FE3E0000FAB518 /* TelegramUIPreferences.framework */,
D0C9C0C222FE3DF900FAB518 /* WebP.framework */,
D0C9C0C022FE3DF300FAB518 /* TelegramCore.framework */,
D0C9C0BE22FE3DEB00FAB518 /* ImageIO.framework */,
D0C9C0BC22FE3DE400FAB518 /* AVFoundation.framework */,
D0C9C0BA22FE3DE000FAB518 /* Display.framework */,
D0C9C0B822FE3DDB00FAB518 /* SwiftSignalKit.framework */,
D0C9C0B622FE3DD800FAB518 /* Postbox.framework */,
D0C9C0B422FE3DD400FAB518 /* UIKit.framework */,
D0C9C0B222FE3DD000FAB518 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D0C9C09B22FE3D6200FAB518 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C0A522FE3D6200FAB518 /* PhotoResources.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D0C9C09F22FE3D6200FAB518 /* PhotoResources */ = {
isa = PBXNativeTarget;
buildConfigurationList = D0C9C0A822FE3D6200FAB518 /* Build configuration list for PBXNativeTarget "PhotoResources" */;
buildPhases = (
D0C9C09B22FE3D6200FAB518 /* Headers */,
D0C9C09C22FE3D6200FAB518 /* Sources */,
D0C9C09D22FE3D6200FAB518 /* Frameworks */,
D0C9C09E22FE3D6200FAB518 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = PhotoResources;
productName = PhotoResources;
productReference = D0C9C0A022FE3D6200FAB518 /* PhotoResources.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D0C9C09722FE3D6200FAB518 /* Project object */ = {
isa = PBXProject;
attributes = {
DefaultBuildSystemTypeForWorkspace = Latest;
LastUpgradeCheck = 1030;
ORGANIZATIONNAME = "Telegram Messenger LLP";
TargetAttributes = {
D0C9C09F22FE3D6200FAB518 = {
CreatedOnToolsVersion = 10.3;
LastSwiftMigration = 1030;
};
};
};
buildConfigurationList = D0C9C09A22FE3D6200FAB518 /* Build configuration list for PBXProject "PhotoResources_Xcode" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = D0C9C09622FE3D6200FAB518;
productRefGroup = D0C9C0A122FE3D6200FAB518 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D0C9C09F22FE3D6200FAB518 /* PhotoResources */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D0C9C09E22FE3D6200FAB518 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D0C9C09C22FE3D6200FAB518 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C0F922FE3FA500FAB518 /* FrameworkBundle.swift in Sources */,
D0C9C0B022FE3DB800FAB518 /* PhotoResources.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
D0C9C0A622FE3D6200FAB518 /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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 = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugAppStoreLLC;
};
D0C9C0A722FE3D6200FAB518 /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = ReleaseAppStoreLLC;
};
D0C9C0A922FE3D6200FAB518 /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.PhotoResources;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugAppStoreLLC;
};
D0C9C0AA22FE3D6200FAB518 /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.PhotoResources;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseAppStoreLLC;
};
D0C9C0AB22FE3D8C00FAB518 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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 = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugHockeyapp;
};
D0C9C0AC22FE3D8C00FAB518 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.PhotoResources;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugHockeyapp;
};
D0C9C0AD22FE3D9600FAB518 /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = ReleaseHockeyappInternal;
};
D0C9C0AE22FE3D9600FAB518 /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.PhotoResources;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseHockeyappInternal;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D0C9C09A22FE3D6200FAB518 /* Build configuration list for PBXProject "PhotoResources_Xcode" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0C9C0A622FE3D6200FAB518 /* DebugAppStoreLLC */,
D0C9C0AB22FE3D8C00FAB518 /* DebugHockeyapp */,
D0C9C0A722FE3D6200FAB518 /* ReleaseAppStoreLLC */,
D0C9C0AD22FE3D9600FAB518 /* ReleaseHockeyappInternal */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseAppStoreLLC;
};
D0C9C0A822FE3D6200FAB518 /* Build configuration list for PBXNativeTarget "PhotoResources" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0C9C0A922FE3D6200FAB518 /* DebugAppStoreLLC */,
D0C9C0AC22FE3D8C00FAB518 /* DebugHockeyapp */,
D0C9C0AA22FE3D6200FAB518 /* ReleaseAppStoreLLC */,
D0C9C0AE22FE3D9600FAB518 /* ReleaseHockeyappInternal */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseAppStoreLLC;
};
/* End XCConfigurationList section */
};
rootObject = D0C9C09722FE3D6200FAB518 /* Project object */;
}

View File

@ -0,0 +1,13 @@
import Foundation
import UIKit
private class FrameworkBundleClass: NSObject {
}
let frameworkBundle: Bundle = Bundle(for: FrameworkBundleClass.self)
extension UIImage {
convenience init?(bundleImageName: String) {
self.init(named: bundleImageName, in: frameworkBundle, compatibleWith: nil)
}
}

View File

@ -0,0 +1,19 @@
//
// PhotoResources.h
// PhotoResources
//
// Created by Peter on 8/10/19.
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for PhotoResources.
FOUNDATION_EXPORT double PhotoResourcesVersionNumber;
//! Project version string for PhotoResources.
FOUNDATION_EXPORT const unsigned char PhotoResourcesVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <PhotoResources/PublicHeader.h>

View File

@ -5,7 +5,6 @@ import SwiftSignalKit
import Display
import AVFoundation
import ImageIO
import TelegramUIPrivateModule
import TelegramCore
#if BUCK
import WebPImage
@ -17,6 +16,8 @@ import MediaResources
import AccountContext
import Tuples
import ImageBlur
import TinyThumbnail
import ImageTransparency
private enum ResourceFileData {
case data(Data)
@ -27,7 +28,7 @@ public func largestRepresentationForPhoto(_ photo: TelegramMediaImage) -> Telegr
return photo.representationForDisplayAtSize(CGSize(width: 1280.0, height: 1280.0))
}
func chatMessagePhotoDatas(postbox: Postbox, photoReference: ImageMediaReference, fullRepresentationSize: CGSize = CGSize(width: 1280.0, height: 1280.0), autoFetchFullSize: Bool = false, tryAdditionalRepresentations: Bool = false, synchronousLoad: Bool = false) -> Signal<Tuple3<Data?, Data?, Bool>, NoError> {
public func chatMessagePhotoDatas(postbox: Postbox, photoReference: ImageMediaReference, fullRepresentationSize: CGSize = CGSize(width: 1280.0, height: 1280.0), autoFetchFullSize: Bool = false, tryAdditionalRepresentations: Bool = false, synchronousLoad: Bool = false) -> Signal<Tuple3<Data?, Data?, Bool>, NoError> {
if let smallestRepresentation = smallestImageRepresentation(photoReference.media.representations), let largestRepresentation = photoReference.media.representationForDisplayAtSize(fullRepresentationSize) {
let maybeFullSize = postbox.mediaBox.resourceData(largestRepresentation.resource, option: .complete(waitUntilFetchStatus: false), attemptSynchronously: synchronousLoad)
@ -601,7 +602,7 @@ private func tailContext(_ tail: Tail) -> DrawingContext {
}
}
func addCorners(_ context: DrawingContext, arguments: TransformImageArguments) {
public func addCorners(_ context: DrawingContext, arguments: TransformImageArguments) {
let corners = arguments.corners
let drawingRect = arguments.drawingRect
if case let .Corner(radius) = corners.topLeft, radius > CGFloat.ulpOfOne {
@ -664,7 +665,7 @@ func addCorners(_ context: DrawingContext, arguments: TransformImageArguments) {
}
}
func rawMessagePhoto(postbox: Postbox, photoReference: ImageMediaReference) -> Signal<UIImage?, NoError> {
public func rawMessagePhoto(postbox: Postbox, photoReference: ImageMediaReference) -> Signal<UIImage?, NoError> {
return chatMessagePhotoDatas(postbox: postbox, photoReference: photoReference, autoFetchFullSize: true)
|> map { value -> UIImage? in
let thumbnailData = value._0
@ -1123,7 +1124,7 @@ public func chatMessageVideoThumbnail(account: Account, fileReference: FileMedia
}
}
func chatSecretPhoto(account: Account, photoReference: ImageMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func chatSecretPhoto(account: Account, photoReference: ImageMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
let signal = chatMessagePhotoDatas(postbox: account.postbox, photoReference: photoReference)
return signal
|> map { value in
@ -1298,7 +1299,7 @@ private func avatarGalleryThumbnailDatas(postbox: Postbox, representations: [Ima
}
}
func avatarGalleryThumbnailPhoto(account: Account, representations: [ImageRepresentationWithReference]) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func avatarGalleryThumbnailPhoto(account: Account, representations: [ImageRepresentationWithReference]) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
let signal = avatarGalleryThumbnailDatas(postbox: account.postbox, representations: representations, fullRepresentationSize: CGSize(width: 127.0, height: 127.0), autoFetchFullSize: true)
return signal
|> map { value in
@ -1383,7 +1384,7 @@ func avatarGalleryThumbnailPhoto(account: Account, representations: [ImageRepres
}
}
func mediaGridMessagePhoto(account: Account, photoReference: ImageMediaReference, fullRepresentationSize: CGSize = CGSize(width: 127.0, height: 127.0), synchronousLoad: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func mediaGridMessagePhoto(account: Account, photoReference: ImageMediaReference, fullRepresentationSize: CGSize = CGSize(width: 127.0, height: 127.0), synchronousLoad: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
let signal = chatMessagePhotoDatas(postbox: account.postbox, photoReference: photoReference, fullRepresentationSize: fullRepresentationSize, autoFetchFullSize: true, synchronousLoad: synchronousLoad)
return signal
@ -1468,7 +1469,7 @@ func mediaGridMessagePhoto(account: Account, photoReference: ImageMediaReference
}
}
func gifPaneVideoThumbnail(account: Account, videoReference: FileMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func gifPaneVideoThumbnail(account: Account, videoReference: FileMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
if let smallestRepresentation = smallestImageRepresentation(videoReference.media.previewRepresentations) {
let thumbnailResource = smallestRepresentation.resource
@ -1537,14 +1538,14 @@ func gifPaneVideoThumbnail(account: Account, videoReference: FileMediaReference)
}
}
func mediaGridMessageVideo(postbox: Postbox, videoReference: FileMediaReference, onlyFullSize: Bool = false, synchronousLoad: Bool = false, autoFetchFullSizeThumbnail: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func mediaGridMessageVideo(postbox: Postbox, videoReference: FileMediaReference, onlyFullSize: Bool = false, synchronousLoad: Bool = false, autoFetchFullSizeThumbnail: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
return internalMediaGridMessageVideo(postbox: postbox, videoReference: videoReference, onlyFullSize: onlyFullSize, synchronousLoad: synchronousLoad, autoFetchFullSizeThumbnail: autoFetchFullSizeThumbnail)
|> map {
return $0.1
}
}
func internalMediaGridMessageVideo(postbox: Postbox, videoReference: FileMediaReference, imageReference: ImageMediaReference? = nil, onlyFullSize: Bool = false, synchronousLoad: Bool = false, autoFetchFullSizeThumbnail: Bool = false) -> Signal<(() -> CGSize?, (TransformImageArguments) -> DrawingContext?), NoError> {
public func internalMediaGridMessageVideo(postbox: Postbox, videoReference: FileMediaReference, imageReference: ImageMediaReference? = nil, onlyFullSize: Bool = false, synchronousLoad: Bool = false, autoFetchFullSizeThumbnail: Bool = false) -> Signal<(() -> CGSize?, (TransformImageArguments) -> DrawingContext?), NoError> {
let signal: Signal<Tuple3<Data?, Tuple2<Data, String>?, Bool>, NoError>
if let imageReference = imageReference {
signal = chatMessagePhotoDatas(postbox: postbox, photoReference: imageReference, tryAdditionalRepresentations: true, synchronousLoad: synchronousLoad)
@ -1757,7 +1758,7 @@ func internalMediaGridMessageVideo(postbox: Postbox, videoReference: FileMediaRe
}
}
func chatMessagePhotoStatus(context: AccountContext, messageId: MessageId, photoReference: ImageMediaReference) -> Signal<MediaResourceStatus, NoError> {
public func chatMessagePhotoStatus(context: AccountContext, messageId: MessageId, photoReference: ImageMediaReference) -> Signal<MediaResourceStatus, NoError> {
if let largestRepresentation = largestRepresentationForPhoto(photoReference.media) {
return context.fetchManager.fetchStatus(category: .image, location: .chat(messageId.peerId), locationKey: .messageId(messageId), resource: largestRepresentation.resource)
} else {
@ -1795,21 +1796,21 @@ public func chatMessagePhotoInteractiveFetched(context: AccountContext, photoRef
}
}
func chatMessagePhotoCancelInteractiveFetch(account: Account, photoReference: ImageMediaReference) {
public func chatMessagePhotoCancelInteractiveFetch(account: Account, photoReference: ImageMediaReference) {
if let largestRepresentation = largestRepresentationForPhoto(photoReference.media) {
return account.postbox.mediaBox.cancelInteractiveResourceFetch(largestRepresentation.resource)
}
}
func chatMessageWebFileInteractiveFetched(account: Account, image: TelegramMediaWebFile) -> Signal<FetchResourceSourceType, FetchResourceError> {
public func chatMessageWebFileInteractiveFetched(account: Account, image: TelegramMediaWebFile) -> Signal<FetchResourceSourceType, FetchResourceError> {
return fetchedMediaResource(mediaBox: account.postbox.mediaBox, reference: .standalone(resource: image.resource), statsCategory: .image)
}
func chatMessageWebFileCancelInteractiveFetch(account: Account, image: TelegramMediaWebFile) {
public func chatMessageWebFileCancelInteractiveFetch(account: Account, image: TelegramMediaWebFile) {
return account.postbox.mediaBox.cancelInteractiveResourceFetch(image.resource)
}
func chatWebpageSnippetFileData(account: Account, fileReference: FileMediaReference, resource: MediaResource) -> Signal<Data?, NoError> {
public func chatWebpageSnippetFileData(account: Account, fileReference: FileMediaReference, resource: MediaResource) -> Signal<Data?, NoError> {
let resourceData = account.postbox.mediaBox.resourceData(resource)
|> map { next in
return next.size == 0 ? nil : try? Data(contentsOf: URL(fileURLWithPath: next.path), options: .mappedIfSafe)
@ -1829,7 +1830,7 @@ func chatWebpageSnippetFileData(account: Account, fileReference: FileMediaRefere
}
}
func chatWebpageSnippetPhotoData(account: Account, photoReference: ImageMediaReference) -> Signal<Data?, NoError> {
public func chatWebpageSnippetPhotoData(account: Account, photoReference: ImageMediaReference) -> Signal<Data?, NoError> {
if let closestRepresentation = photoReference.media.representationForDisplayAtSize(CGSize(width: 120.0, height: 120.0)) {
let resourceData = account.postbox.mediaBox.resourceData(closestRepresentation.resource)
|> map { next in
@ -1896,7 +1897,7 @@ public func chatWebpageSnippetFile(account: Account, fileReference: FileMediaRef
}
}
func chatWebpageSnippetPhoto(account: Account, photoReference: ImageMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func chatWebpageSnippetPhoto(account: Account, photoReference: ImageMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
let signal = chatWebpageSnippetPhotoData(account: account, photoReference: photoReference)
return signal |> map { fullSizeData in
@ -1939,7 +1940,7 @@ func chatWebpageSnippetPhoto(account: Account, photoReference: ImageMediaReferen
}
}
func chatMessageVideo(postbox: Postbox, videoReference: FileMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func chatMessageVideo(postbox: Postbox, videoReference: FileMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
return mediaGridMessageVideo(postbox: postbox, videoReference: videoReference)
}
@ -1969,7 +1970,7 @@ private func chatSecretMessageVideoData(account: Account, fileReference: FileMed
}
}
func chatSecretMessageVideo(account: Account, videoReference: FileMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func chatSecretMessageVideo(account: Account, videoReference: FileMediaReference) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
let signal = chatSecretMessageVideoData(account: account, fileReference: videoReference)
return signal
@ -2061,7 +2062,7 @@ private func orientationFromExif(orientation: Int) -> UIImage.Orientation {
}
}
func imageOrientationFromSource(_ source: CGImageSource) -> UIImage.Orientation {
public func imageOrientationFromSource(_ source: CGImageSource) -> UIImage.Orientation {
if let properties = CGImageSourceCopyPropertiesAtIndex(source, 0, nil) {
let dict = properties as NSDictionary
if let value = dict.object(forKey: kCGImagePropertyOrientation) as? NSNumber {
@ -2085,7 +2086,7 @@ private func rotationFor(_ orientation: UIImage.Orientation) -> CGFloat {
}
}
func drawImage(context: CGContext, image: CGImage, orientation: UIImage.Orientation, in rect: CGRect) {
public func drawImage(context: CGContext, image: CGImage, orientation: UIImage.Orientation, in rect: CGRect) {
var restore = true
var drawRect = rect
switch orientation {
@ -2123,7 +2124,7 @@ func drawImage(context: CGContext, image: CGImage, orientation: UIImage.Orientat
}
}
func chatMessageImageFile(account: Account, fileReference: FileMediaReference, thumbnail: Bool, fetched: Bool = false, autoFetchFullSizeThumbnail: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func chatMessageImageFile(account: Account, fileReference: FileMediaReference, thumbnail: Bool, fetched: Bool = false, autoFetchFullSizeThumbnail: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
let signal: Signal<Tuple3<Data?, String?, Bool>, NoError>
if thumbnail {
signal = chatMessageImageFileThumbnailDatas(account: account, fileReference: fileReference, autoFetchFullSizeThumbnail: true)
@ -2257,7 +2258,7 @@ func chatMessageImageFile(account: Account, fileReference: FileMediaReference, t
}
}
func instantPageImageFile(account: Account, fileReference: FileMediaReference, fetched: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func instantPageImageFile(account: Account, fileReference: FileMediaReference, fetched: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
return chatMessageFileDatas(account: account, fileReference: fileReference, progressive: false, fetched: fetched)
|> map { value in
let thumbnailData = value._0
@ -2367,7 +2368,7 @@ private func avatarGalleryPhotoDatas(account: Account, fileReference: FileMediaR
}
}
func chatAvatarGalleryPhoto(account: Account, representations: [ImageRepresentationWithReference], autoFetchFullSize: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func chatAvatarGalleryPhoto(account: Account, representations: [ImageRepresentationWithReference], autoFetchFullSize: Bool = false) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
let signal = avatarGalleryPhotoDatas(account: account, representations: representations, autoFetchFullSize: autoFetchFullSize)
return signal
@ -2490,7 +2491,7 @@ func chatAvatarGalleryPhoto(account: Account, representations: [ImageRepresentat
}
}
func chatMapSnapshotData(account: Account, resource: MapSnapshotMediaResource) -> Signal<Data?, NoError> {
public func chatMapSnapshotData(account: Account, resource: MapSnapshotMediaResource) -> Signal<Data?, NoError> {
return Signal<Data?, NoError> { subscriber in
let fetchedDisposable = account.postbox.mediaBox.fetchedResource(resource, parameters: nil).start()
let dataDisposable = account.postbox.mediaBox.resourceData(resource).start(next: { next in
@ -2508,7 +2509,7 @@ func chatMapSnapshotData(account: Account, resource: MapSnapshotMediaResource) -
private let locationPinImage = UIImage(named: "ModernMessageLocationPin")?.precomposed()
func chatMapSnapshotImage(account: Account, resource: MapSnapshotMediaResource) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func chatMapSnapshotImage(account: Account, resource: MapSnapshotMediaResource) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
let signal = chatMapSnapshotData(account: account, resource: resource)
return signal |> map { fullSizeData in
@ -2576,7 +2577,7 @@ func chatMapSnapshotImage(account: Account, resource: MapSnapshotMediaResource)
}
}
func chatWebFileImage(account: Account, file: TelegramMediaWebFile) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func chatWebFileImage(account: Account, file: TelegramMediaWebFile) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
return account.postbox.mediaBox.resourceData(file.resource)
|> map { fullSizeData in
return { arguments in
@ -2774,7 +2775,7 @@ private func drawAlbumArtPlaceholder(into c: CGContext, arguments: TransformImag
}
}
func playerAlbumArt(postbox: Postbox, fileReference: FileMediaReference?, albumArt: SharedMediaPlaybackAlbumArt?, thumbnail: Bool) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func playerAlbumArt(postbox: Postbox, fileReference: FileMediaReference?, albumArt: SharedMediaPlaybackAlbumArt?, thumbnail: Bool) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
var fileArtworkData: Signal<Data?, NoError> = .single(nil)
if let fileReference = fileReference {
let size = thumbnail ? CGSize(width: 48.0, height: 48.0) : CGSize(width: 320.0, height: 320.0)
@ -2859,11 +2860,11 @@ func playerAlbumArt(postbox: Postbox, fileReference: FileMediaReference?, albumA
}
}
func securePhoto(account: Account, resource: TelegramMediaResource, accessContext: SecureIdAccessContext) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func securePhoto(account: Account, resource: TelegramMediaResource, accessContext: SecureIdAccessContext) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
return securePhotoInternal(account: account, resource: resource, accessContext: accessContext) |> map { $0.1 }
}
func securePhotoInternal(account: Account, resource: TelegramMediaResource, accessContext: SecureIdAccessContext) -> Signal<(() -> CGSize?, (TransformImageArguments) -> DrawingContext?), NoError> {
public func securePhotoInternal(account: Account, resource: TelegramMediaResource, accessContext: SecureIdAccessContext) -> Signal<(() -> CGSize?, (TransformImageArguments) -> DrawingContext?), NoError> {
let signal = Signal<MediaResourceData, NoError> { subscriber in
let fetched = account.postbox.mediaBox.fetchedResource(resource, parameters: nil).start()
let data = account.postbox.mediaBox.resourceData(resource, option: .complete(waitUntilFetchStatus: false)).start(next: { next in
@ -2994,12 +2995,12 @@ private func drawOpenInAppIconBorder(into c: CGContext, arguments: TransformImag
c.strokePath()
}
enum OpenInAppIcon {
public enum OpenInAppIcon {
case resource(resource: TelegramMediaResource)
case image(image: UIImage)
}
func openInAppIcon(postbox: Postbox, appIcon: OpenInAppIcon) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func openInAppIcon(postbox: Postbox, appIcon: OpenInAppIcon) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
switch appIcon {
case let .resource(resource):
return openInAppIconData(postbox: postbox, appIcon: resource) |> map { data in
@ -3044,7 +3045,7 @@ func openInAppIcon(postbox: Postbox, appIcon: OpenInAppIcon) -> Signal<(Transfor
}
}
func callDefaultBackground() -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
public func callDefaultBackground() -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
return .single({ arguments in
let context = DrawingContext(size: arguments.drawingSize, clear: true)
context.withFlippedContext { c in

View File

@ -8,9 +8,9 @@ import SwiftSignalKit
import TelegramPresentationData
import TelegramUIPreferences
import TelegramVoip
import TelegramCallsUI
import TelegramAudio
import AccountContext
import TelegramNotices
public final class CallController: ViewController {
private var controllerNode: CallControllerNode {
@ -25,6 +25,7 @@ public final class CallController: ViewController {
private let sharedContext: SharedAccountContext
private let account: Account
public let call: PresentationCall
private let easyDebugAccess: Bool
private var presentationData: PresentationData
private var didPlayPresentationAnimation = false
@ -42,10 +43,11 @@ public final class CallController: ViewController {
private var audioOutputStateDisposable: Disposable?
private var audioOutputState: ([AudioSessionOutput], AudioSessionOutput?)?
public init(sharedContext: SharedAccountContext, account: Account, call: PresentationCall) {
public init(sharedContext: SharedAccountContext, account: Account, call: PresentationCall, easyDebugAccess: Bool) {
self.sharedContext = sharedContext
self.account = account
self.call = call
self.easyDebugAccess = easyDebugAccess
self.presentationData = sharedContext.currentPresentationData.with { $0 }
@ -102,7 +104,7 @@ public final class CallController: ViewController {
}
override public func loadDisplayNode() {
self.displayNode = CallControllerNode(sharedContext: self.sharedContext, account: self.account, presentationData: self.presentationData, statusBar: self.statusBar, debugInfo: self.call.debugInfo(), shouldStayHiddenUntilConnection: !self.call.isOutgoing && self.call.isIntegratedWithCallKit)
self.displayNode = CallControllerNode(sharedContext: self.sharedContext, account: self.account, presentationData: self.presentationData, statusBar: self.statusBar, debugInfo: self.call.debugInfo(), shouldStayHiddenUntilConnection: !self.call.isOutgoing && self.call.isIntegratedWithCallKit, easyDebugAccess: self.easyDebugAccess)
self.displayNodeDidLoad()
self.controllerNode.toggleMute = { [weak self] in

View File

@ -5,13 +5,12 @@ import AsyncDisplayKit
import Postbox
import TelegramCore
import SwiftSignalKit
import TelegramCallsUI
import TelegramUIPrivateModule
import TelegramPresentationData
import TelegramUIPreferences
import TelegramAudio
import AccountContext
import LocalizedPeerData
import PhotoResources
final class CallControllerNode: ASDisplayNode {
private let sharedContext: SharedAccountContext
@ -23,6 +22,7 @@ final class CallControllerNode: ASDisplayNode {
private var peer: Peer?
private let debugInfo: Signal<(String, String), NoError>
private var forceReportRating = false
private let easyDebugAccess: Bool
private let containerNode: ASDisplayNode
@ -62,13 +62,14 @@ final class CallControllerNode: ASDisplayNode {
var callEnded: ((Bool) -> Void)?
var dismissedInteractively: (() -> Void)?
init(sharedContext: SharedAccountContext, account: Account, presentationData: PresentationData, statusBar: StatusBar, debugInfo: Signal<(String, String), NoError>, shouldStayHiddenUntilConnection: Bool = false) {
init(sharedContext: SharedAccountContext, account: Account, presentationData: PresentationData, statusBar: StatusBar, debugInfo: Signal<(String, String), NoError>, shouldStayHiddenUntilConnection: Bool = false, easyDebugAccess: Bool) {
self.sharedContext = sharedContext
self.account = account
self.presentationData = presentationData
self.statusBar = statusBar
self.debugInfo = debugInfo
self.shouldStayHiddenUntilConnection = shouldStayHiddenUntilConnection
self.easyDebugAccess = easyDebugAccess
self.containerNode = ASDisplayNode()
if self.shouldStayHiddenUntilConnection {
@ -460,7 +461,7 @@ final class CallControllerNode: ASDisplayNode {
} else {
let point = recognizer.location(in: recognizer.view)
if self.statusNode.frame.contains(point) {
if !GlobalExperimentalSettings.isAppStoreBuild {
if self.easyDebugAccess {
self.presentDebugNode()
} else {
let timestamp = CACurrentMediaTime()

View File

@ -264,7 +264,7 @@ func rateCallAndSendLogs(account: Account, callId: CallId, starsCount: Int, comm
}
}
func callRatingController(sharedContext: SharedAccountContext, account: Account, callId: CallId, userInitiated: Bool, present: @escaping (ViewController, Any) -> Void) -> AlertController {
public func callRatingController(sharedContext: SharedAccountContext, account: Account, callId: CallId, userInitiated: Bool, present: @escaping (ViewController, Any) -> Void) -> AlertController {
let presentationData = sharedContext.currentPresentationData.with { $0 }
let theme = presentationData.theme
let strings = presentationData.strings

View File

@ -0,0 +1,8 @@
#ifndef CallsEmoji_h
#define CallsEmoji_h
#import <Foundation/Foundation.h>
NSString *stringForEmojiHashOfData(NSData *data, NSInteger count);
#endif /* CallsEmoji_h */

View File

@ -0,0 +1,28 @@
#import <Foundation/Foundation.h>
#import "CallsEmoji.h"
static int32_t positionExtractor(uint8_t *bytes, int32_t i, int32_t count) {
int offset = i * 8;
int64_t num = (((int64_t)bytes[offset] & 0x7F) << 56) | (((int64_t)bytes[offset+1] & 0xFF) << 48) | (((int64_t)bytes[offset+2] & 0xFF) << 40) | (((int64_t)bytes[offset+3] & 0xFF) << 32) | (((int64_t)bytes[offset+4] & 0xFF) << 24) | (((int64_t)bytes[offset+5] & 0xFF) << 16) | (((int64_t)bytes[offset+6] & 0xFF) << 8) | (((int64_t)bytes[offset+7] & 0xFF));
return num % count;
}
NSString *stringForEmojiHashOfData(NSData *data, NSInteger count) {
if (data.length != 32)
return @"";
NSArray *emojis = @[ @"😉", @"😍", @"😛", @"😭", @"😱", @"😡", @"😎", @"😴", @"😵", @"😈", @"😬", @"😇", @"😏", @"👮", @"👷", @"💂", @"👶", @"👨", @"👩", @"👴", @"👵", @"😻", @"😽", @"🙀", @"👺", @"🙈", @"🙉", @"🙊", @"💀", @"👽", @"💩", @"🔥", @"💥", @"💤", @"👂", @"👀", @"👃", @"👅", @"👄", @"👍", @"👎", @"👌", @"👊", @"✌️", @"✋️", @"👐", @"👆", @"👇", @"👉", @"👈", @"🙏", @"👏", @"💪", @"🚶", @"🏃", @"💃", @"👫", @"👪", @"👬", @"👭", @"💅", @"🎩", @"👑", @"👒", @"👟", @"👞", @"👠", @"👕", @"👗", @"👖", @"👙", @"👜", @"👓", @"🎀", @"💄", @"💛", @"💙", @"💜", @"💚", @"💍", @"💎", @"🐶", @"🐺", @"🐱", @"🐭", @"🐹", @"🐰", @"🐸", @"🐯", @"🐨", @"🐻", @"🐷", @"🐮", @"🐗", @"🐴", @"🐑", @"🐘", @"🐼", @"🐧", @"🐥", @"🐔", @"🐍", @"🐢", @"🐛", @"🐝", @"🐜", @"🐞", @"🐌", @"🐙", @"🐚", @"🐟", @"🐬", @"🐋", @"🐐", @"🐊", @"🐫", @"🍀", @"🌹", @"🌻", @"🍁", @"🌾", @"🍄", @"🌵", @"🌴", @"🌳", @"🌞", @"🌚", @"🌙", @"🌎", @"🌋", @"⚡️", @"☔️", @"❄️", @"⛄️", @"🌀", @"🌈", @"🌊", @"🎓", @"🎆", @"🎃", @"👻", @"🎅", @"🎄", @"🎁", @"🎈", @"🔮", @"🎥", @"📷", @"💿", @"💻", @"☎️", @"📡", @"📺", @"📻", @"🔉", @"🔔", @"⏳", @"⏰", @"⌚️", @"🔒", @"🔑", @"🔎", @"💡", @"🔦", @"🔌", @"🔋", @"🚿", @"🚽", @"🔧", @"🔨", @"🚪", @"🚬", @"💣", @"🔫", @"🔪", @"💊", @"💉", @"💰", @"💵", @"💳", @"✉️", @"📫", @"📦", @"📅", @"📁", @"✂️", @"📌", @"📎", @"✒️", @"✏️", @"📐", @"📚", @"🔬", @"🔭", @"🎨", @"🎬", @"🎤", @"🎧", @"🎵", @"🎹", @"🎻", @"🎺", @"🎸", @"👾", @"🎮", @"🃏", @"🎲", @"🎯", @"🏈", @"🏀", @"⚽️", @"⚾️", @"🎾", @"🎱", @"🏉", @"🎳", @"🏁", @"🏇", @"🏆", @"🏊", @"🏄", @"☕️", @"🍼", @"🍺", @"🍷", @"🍴", @"🍕", @"🍔", @"🍟", @"🍗", @"🍱", @"🍚", @"🍜", @"🍡", @"🍳", @"🍞", @"🍩", @"🍦", @"🎂", @"🍰", @"🍪", @"🍫", @"🍭", @"🍯", @"🍎", @"🍏", @"🍊", @"🍋", @"🍒", @"🍇", @"🍉", @"🍓", @"🍑", @"🍌", @"🍐", @"🍍", @"🍆", @"🍅", @"🌽", @"🏡", @"🏥", @"🏦", @"⛪️", @"🏰", @"⛺️", @"🏭", @"🗻", @"🗽", @"🎠", @"🎡", @"⛲️", @"🎢", @"🚢", @"🚤", @"⚓️", @"🚀", @"✈️", @"🚁", @"🚂", @"🚋", @"🚎", @"🚌", @"🚙", @"🚗", @"🚕", @"🚛", @"🚨", @"🚔", @"🚒", @"🚑", @"🚲", @"🚠", @"🚜", @"🚦", @"⚠️", @"🚧", @"⛽️", @"🎰", @"🗿", @"🎪", @"🎭", @"🇯🇵", @"🇰🇷", @"🇩🇪", @"🇨🇳", @"🇺🇸", @"🇫🇷", @"🇪🇸", @"🇮🇹", @"🇷🇺", @"🇬🇧", @"1⃣", @"2⃣", @"3⃣", @"4⃣", @"5⃣", @"6⃣", @"7⃣", @"8⃣", @"9⃣", @"0⃣", @"🔟", @"❗️", @"❓", @"♥️", @"♦️", @"💯", @"🔗", @"🔱", @"🔴", @"🔵", @"🔶", @"🔷" ];
uint8_t bytes[32];
[data getBytes:bytes length:32];
NSString *result = @"";
for (int32_t i = 0; i < count; i++)
{
int32_t position = positionExtractor(bytes, i, (int32_t)emojis.count);
NSString *emoji = emojis[position];
result = [result stringByAppendingString:emoji];
}
return result;
}

View File

@ -0,0 +1,13 @@
import Foundation
import UIKit
private class FrameworkBundleClass: NSObject {
}
let frameworkBundle: Bundle = Bundle(for: FrameworkBundleClass.self)
extension UIImage {
convenience init?(bundleImageName: String) {
self.init(named: bundleImageName, in: frameworkBundle, compatibleWith: nil)
}
}

View File

@ -14,6 +14,6 @@ FOUNDATION_EXPORT double TelegramCallsUIVersionNumber;
//! Project version string for TelegramCallsUI.
FOUNDATION_EXPORT const unsigned char TelegramCallsUIVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <TelegramCallsUI/PublicHeader.h>
#import <TelegramCallsUI/CallsEmoji.h>

View File

@ -18,6 +18,22 @@
D0AE319B22B270D60058D3BC /* TelegramAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AE319A22B270D60058D3BC /* TelegramAudio.framework */; };
D0AE31C122B274BA0058D3BC /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AE31C022B274BA0058D3BC /* TelegramPresentationData.framework */; };
D0AE320722B281AE0058D3BC /* DeviceAccess.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AE320622B281AE0058D3BC /* DeviceAccess.framework */; };
D0C9C08A22FE3CF300FAB518 /* CallDebugNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08022FE3CF200FAB518 /* CallDebugNode.swift */; };
D0C9C08B22FE3CF300FAB518 /* CallControllerStatusNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08122FE3CF200FAB518 /* CallControllerStatusNode.swift */; };
D0C9C08C22FE3CF300FAB518 /* CallControllerButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08222FE3CF300FAB518 /* CallControllerButton.swift */; };
D0C9C08D22FE3CF300FAB518 /* CallController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08322FE3CF300FAB518 /* CallController.swift */; };
D0C9C08E22FE3CF300FAB518 /* CallControllerButtonsNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08422FE3CF300FAB518 /* CallControllerButtonsNode.swift */; };
D0C9C08F22FE3CF300FAB518 /* CallFeedbackController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08522FE3CF300FAB518 /* CallFeedbackController.swift */; };
D0C9C09022FE3CF300FAB518 /* CallControllerKeyPreviewNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08622FE3CF300FAB518 /* CallControllerKeyPreviewNode.swift */; };
D0C9C09122FE3CF300FAB518 /* CallRatingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08722FE3CF300FAB518 /* CallRatingController.swift */; };
D0C9C09222FE3CF300FAB518 /* CallRouteActionSheetItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08822FE3CF300FAB518 /* CallRouteActionSheetItem.swift */; };
D0C9C09322FE3CF300FAB518 /* CallControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C08922FE3CF300FAB518 /* CallControllerNode.swift */; };
D0C9C09522FE3D1700FAB518 /* FrameworkBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C09422FE3D1700FAB518 /* FrameworkBundle.swift */; };
D0C9C0CF22FE3E2400FAB518 /* PhotoResources.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C0CE22FE3E2400FAB518 /* PhotoResources.framework */; };
D0C9C12522FE41C600FAB518 /* CallsEmoji.m in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C12422FE41C600FAB518 /* CallsEmoji.m */; };
D0C9C12722FE41DB00FAB518 /* CallsEmoji.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C9C12622FE41D200FAB518 /* CallsEmoji.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0C9C14B22FE439300FAB518 /* TelegramNotices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C14A22FE439300FAB518 /* TelegramNotices.framework */; };
D0C9C17B22FEF26C00FAB518 /* CallSuggestTabController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C17A22FEF26C00FAB518 /* CallSuggestTabController.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -34,6 +50,22 @@
D0AE319A22B270D60058D3BC /* TelegramAudio.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramAudio.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0AE31C022B274BA0058D3BC /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0AE320622B281AE0058D3BC /* DeviceAccess.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DeviceAccess.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C08022FE3CF200FAB518 /* CallDebugNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallDebugNode.swift; sourceTree = "<group>"; };
D0C9C08122FE3CF200FAB518 /* CallControllerStatusNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallControllerStatusNode.swift; sourceTree = "<group>"; };
D0C9C08222FE3CF300FAB518 /* CallControllerButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallControllerButton.swift; sourceTree = "<group>"; };
D0C9C08322FE3CF300FAB518 /* CallController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallController.swift; sourceTree = "<group>"; };
D0C9C08422FE3CF300FAB518 /* CallControllerButtonsNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallControllerButtonsNode.swift; sourceTree = "<group>"; };
D0C9C08522FE3CF300FAB518 /* CallFeedbackController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallFeedbackController.swift; sourceTree = "<group>"; };
D0C9C08622FE3CF300FAB518 /* CallControllerKeyPreviewNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallControllerKeyPreviewNode.swift; sourceTree = "<group>"; };
D0C9C08722FE3CF300FAB518 /* CallRatingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallRatingController.swift; sourceTree = "<group>"; };
D0C9C08822FE3CF300FAB518 /* CallRouteActionSheetItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallRouteActionSheetItem.swift; sourceTree = "<group>"; };
D0C9C08922FE3CF300FAB518 /* CallControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallControllerNode.swift; sourceTree = "<group>"; };
D0C9C09422FE3D1700FAB518 /* FrameworkBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkBundle.swift; sourceTree = "<group>"; };
D0C9C0CE22FE3E2400FAB518 /* PhotoResources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PhotoResources.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C12422FE41C600FAB518 /* CallsEmoji.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CallsEmoji.m; sourceTree = "<group>"; };
D0C9C12622FE41D200FAB518 /* CallsEmoji.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CallsEmoji.h; sourceTree = "<group>"; };
D0C9C14A22FE439300FAB518 /* TelegramNotices.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramNotices.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C17A22FEF26C00FAB518 /* CallSuggestTabController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallSuggestTabController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -41,6 +73,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C14B22FE439300FAB518 /* TelegramNotices.framework in Frameworks */,
D0C9C0CF22FE3E2400FAB518 /* PhotoResources.framework in Frameworks */,
D0750C6A22B28A8000BE5F6E /* UniversalMediaPlayer.framework in Frameworks */,
D0AE320722B281AE0058D3BC /* DeviceAccess.framework in Frameworks */,
D0AE31C122B274BA0058D3BC /* TelegramPresentationData.framework in Frameworks */,
@ -74,10 +108,24 @@
D0AE30F822B1DC3F0058D3BC /* Sources */ = {
isa = PBXGroup;
children = (
D0C9C08322FE3CF300FAB518 /* CallController.swift */,
D0C9C08222FE3CF300FAB518 /* CallControllerButton.swift */,
D0C9C08422FE3CF300FAB518 /* CallControllerButtonsNode.swift */,
D0C9C08622FE3CF300FAB518 /* CallControllerKeyPreviewNode.swift */,
D0C9C08922FE3CF300FAB518 /* CallControllerNode.swift */,
D0C9C08122FE3CF200FAB518 /* CallControllerStatusNode.swift */,
D0C9C08022FE3CF200FAB518 /* CallDebugNode.swift */,
D0C9C08522FE3CF300FAB518 /* CallFeedbackController.swift */,
D0C9C08722FE3CF300FAB518 /* CallRatingController.swift */,
D0C9C08822FE3CF300FAB518 /* CallRouteActionSheetItem.swift */,
D0AE310C22B1DD160058D3BC /* CallKitIntegration.swift */,
D0AE310A22B1DD160058D3BC /* PresentationCall.swift */,
D0AE310922B1DD160058D3BC /* PresentationCallManager.swift */,
D0AE310B22B1DD160058D3BC /* PresentationCallToneData.swift */,
D0C9C09422FE3D1700FAB518 /* FrameworkBundle.swift */,
D0C9C17A22FEF26C00FAB518 /* CallSuggestTabController.swift */,
D0C9C12622FE41D200FAB518 /* CallsEmoji.h */,
D0C9C12422FE41C600FAB518 /* CallsEmoji.m */,
D0AE30F922B1DC3F0058D3BC /* TelegramCallsUI.h */,
);
path = Sources;
@ -86,6 +134,8 @@
D0AE315522B1DEF10058D3BC /* Frameworks */ = {
isa = PBXGroup;
children = (
D0C9C14A22FE439300FAB518 /* TelegramNotices.framework */,
D0C9C0CE22FE3E2400FAB518 /* PhotoResources.framework */,
D0750C6922B28A8000BE5F6E /* UniversalMediaPlayer.framework */,
D0AE320622B281AE0058D3BC /* DeviceAccess.framework */,
D0AE31C022B274BA0058D3BC /* TelegramPresentationData.framework */,
@ -104,6 +154,7 @@
buildActionMask = 2147483647;
files = (
D0AE30FB22B1DC3F0058D3BC /* TelegramCallsUI.h in Headers */,
D0C9C12722FE41DB00FAB518 /* CallsEmoji.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -140,7 +191,7 @@
TargetAttributes = {
D0AE30F522B1DC3F0058D3BC = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1010;
LastSwiftMigration = 1030;
};
};
};
@ -177,9 +228,22 @@
buildActionMask = 2147483647;
files = (
D0AE310D22B1DD160058D3BC /* PresentationCallManager.swift in Sources */,
D0C9C08B22FE3CF300FAB518 /* CallControllerStatusNode.swift in Sources */,
D0C9C09122FE3CF300FAB518 /* CallRatingController.swift in Sources */,
D0AE310E22B1DD160058D3BC /* PresentationCall.swift in Sources */,
D0C9C08A22FE3CF300FAB518 /* CallDebugNode.swift in Sources */,
D0C9C09322FE3CF300FAB518 /* CallControllerNode.swift in Sources */,
D0C9C08F22FE3CF300FAB518 /* CallFeedbackController.swift in Sources */,
D0C9C09222FE3CF300FAB518 /* CallRouteActionSheetItem.swift in Sources */,
D0C9C17B22FEF26C00FAB518 /* CallSuggestTabController.swift in Sources */,
D0AE310F22B1DD160058D3BC /* PresentationCallToneData.swift in Sources */,
D0C9C09022FE3CF300FAB518 /* CallControllerKeyPreviewNode.swift in Sources */,
D0C9C12522FE41C600FAB518 /* CallsEmoji.m in Sources */,
D0AE311022B1DD160058D3BC /* CallKitIntegration.swift in Sources */,
D0C9C08E22FE3CF300FAB518 /* CallControllerButtonsNode.swift in Sources */,
D0C9C08C22FE3CF300FAB518 /* CallControllerButton.swift in Sources */,
D0C9C08D22FE3CF300FAB518 /* CallController.swift in Sources */,
D0C9C09522FE3D1700FAB518 /* FrameworkBundle.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

View File

@ -1,18 +1,19 @@
import Foundation
import Postbox
import SwiftSignalKit
import TelegramPermissions
final class ApplicationSpecificBoolNotice: NoticeEntry {
init() {
public final class ApplicationSpecificBoolNotice: NoticeEntry {
public init() {
}
init(decoder: PostboxDecoder) {
public init(decoder: PostboxDecoder) {
}
func encode(_ encoder: PostboxEncoder) {
public func encode(_ encoder: PostboxEncoder) {
}
func isEqual(to: NoticeEntry) -> Bool {
public func isEqual(to: NoticeEntry) -> Bool {
if let _ = to as? ApplicationSpecificBoolNotice {
return true
} else {
@ -21,22 +22,22 @@ final class ApplicationSpecificBoolNotice: NoticeEntry {
}
}
final class ApplicationSpecificVariantNotice: NoticeEntry {
let value: Bool
public final class ApplicationSpecificVariantNotice: NoticeEntry {
public let value: Bool
init(value: Bool) {
public init(value: Bool) {
self.value = value
}
init(decoder: PostboxDecoder) {
public init(decoder: PostboxDecoder) {
self.value = decoder.decodeInt32ForKey("v", orElse: 0) != 0
}
func encode(_ encoder: PostboxEncoder) {
public func encode(_ encoder: PostboxEncoder) {
encoder.encodeInt32(self.value ? 1 : 0, forKey: "v")
}
func isEqual(to: NoticeEntry) -> Bool {
public func isEqual(to: NoticeEntry) -> Bool {
if let to = to as? ApplicationSpecificVariantNotice {
if self.value != to.value {
return false
@ -48,22 +49,22 @@ final class ApplicationSpecificVariantNotice: NoticeEntry {
}
}
final class ApplicationSpecificCounterNotice: NoticeEntry {
let value: Int32
public final class ApplicationSpecificCounterNotice: NoticeEntry {
public let value: Int32
init(value: Int32) {
public init(value: Int32) {
self.value = value
}
init(decoder: PostboxDecoder) {
public init(decoder: PostboxDecoder) {
self.value = decoder.decodeInt32ForKey("v", orElse: 0)
}
func encode(_ encoder: PostboxEncoder) {
public func encode(_ encoder: PostboxEncoder) {
encoder.encodeInt32(self.value, forKey: "v")
}
func isEqual(to: NoticeEntry) -> Bool {
public func isEqual(to: NoticeEntry) -> Bool {
if let to = to as? ApplicationSpecificCounterNotice {
if self.value != to.value {
return false
@ -75,22 +76,22 @@ final class ApplicationSpecificCounterNotice: NoticeEntry {
}
}
final class ApplicationSpecificTimestampNotice: NoticeEntry {
let value: Int32
public final class ApplicationSpecificTimestampNotice: NoticeEntry {
public let value: Int32
init(value: Int32) {
public init(value: Int32) {
self.value = value
}
init(decoder: PostboxDecoder) {
public init(decoder: PostboxDecoder) {
self.value = decoder.decodeInt32ForKey("v", orElse: 0)
}
func encode(_ encoder: PostboxEncoder) {
public func encode(_ encoder: PostboxEncoder) {
encoder.encodeInt32(self.value, forKey: "v")
}
func isEqual(to: NoticeEntry) -> Bool {
public func isEqual(to: NoticeEntry) -> Bool {
if let to = to as? ApplicationSpecificTimestampNotice {
if self.value != to.value {
return false
@ -141,14 +142,14 @@ private enum ApplicationSpecificGlobalNotice: Int32 {
private extension PermissionKind {
var noticeKey: NoticeEntryKey? {
switch self {
case .contacts:
return ApplicationSpecificNoticeKeys.contactsPermissionWarning()
case .notifications:
return ApplicationSpecificNoticeKeys.notificationsPermissionWarning()
case .cellularData:
return ApplicationSpecificNoticeKeys.cellularDataPermissionWarning()
default:
return nil
case .contacts:
return ApplicationSpecificNoticeKeys.contactsPermissionWarning()
case .notifications:
return ApplicationSpecificNoticeKeys.notificationsPermissionWarning()
case .cellularData:
return ApplicationSpecificNoticeKeys.cellularDataPermissionWarning()
default:
return nil
}
}
}
@ -230,17 +231,17 @@ private struct ApplicationSpecificNoticeKeys {
}
public struct ApplicationSpecificNotice {
static func irrelevantPeerGeoReportKey(peerId: PeerId) -> NoticeEntryKey {
public static func irrelevantPeerGeoReportKey(peerId: PeerId) -> NoticeEntryKey {
return ApplicationSpecificNoticeKeys.irrelevantPeerGeoNotice(peerId: peerId)
}
static func setIrrelevantPeerGeoReport(postbox: Postbox, peerId: PeerId) -> Signal<Void, NoError> {
public static func setIrrelevantPeerGeoReport(postbox: Postbox, peerId: PeerId) -> Signal<Void, NoError> {
return postbox.transaction { transaction -> Void in
transaction.setNoticeEntry(key: ApplicationSpecificNoticeKeys.irrelevantPeerGeoNotice(peerId: peerId), value: ApplicationSpecificBoolNotice())
}
}
static func getBotPaymentLiability(accountManager: AccountManager, peerId: PeerId) -> Signal<Bool, NoError> {
public static func getBotPaymentLiability(accountManager: AccountManager, peerId: PeerId) -> Signal<Bool, NoError> {
return accountManager.transaction { transaction -> Bool in
if let _ = transaction.getNotice(ApplicationSpecificNoticeKeys.botPaymentLiabilityNotice(peerId: peerId)) as? ApplicationSpecificBoolNotice {
return true
@ -250,13 +251,13 @@ public struct ApplicationSpecificNotice {
}
}
static func setBotPaymentLiability(accountManager: AccountManager, peerId: PeerId) -> Signal<Void, NoError> {
public static func setBotPaymentLiability(accountManager: AccountManager, peerId: PeerId) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.botPaymentLiabilityNotice(peerId: peerId), ApplicationSpecificBoolNotice())
}
}
static func getInlineBotLocationRequest(accountManager: AccountManager, peerId: PeerId) -> Signal<Int32?, NoError> {
public static func getInlineBotLocationRequest(accountManager: AccountManager, peerId: PeerId) -> Signal<Int32?, NoError> {
return accountManager.transaction { transaction -> Int32? in
if let notice = transaction.getNotice(ApplicationSpecificNoticeKeys.inlineBotLocationRequestNotice(peerId: peerId)) as? ApplicationSpecificTimestampNotice {
return notice.value
@ -266,13 +267,13 @@ public struct ApplicationSpecificNotice {
}
}
static func setInlineBotLocationRequest(accountManager: AccountManager, peerId: PeerId, value: Int32) -> Signal<Void, NoError> {
public static func setInlineBotLocationRequest(accountManager: AccountManager, peerId: PeerId, value: Int32) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.inlineBotLocationRequestNotice(peerId: peerId), ApplicationSpecificTimestampNotice(value: value))
}
}
static func getSecretChatInlineBotUsage(accountManager: AccountManager) -> Signal<Bool, NoError> {
public static func getSecretChatInlineBotUsage(accountManager: AccountManager) -> Signal<Bool, NoError> {
return accountManager.transaction { transaction -> Bool in
if let _ = transaction.getNotice(ApplicationSpecificNoticeKeys.secretChatInlineBotUsage()) as? ApplicationSpecificBoolNotice {
return true
@ -282,7 +283,7 @@ public struct ApplicationSpecificNotice {
}
}
static func setSecretChatInlineBotUsage(accountManager: AccountManager) -> Signal<Void, NoError> {
public static func setSecretChatInlineBotUsage(accountManager: AccountManager) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.secretChatInlineBotUsage(), ApplicationSpecificBoolNotice())
}
@ -292,7 +293,7 @@ public struct ApplicationSpecificNotice {
transaction.setNotice(ApplicationSpecificNoticeKeys.secretChatInlineBotUsage(), ApplicationSpecificBoolNotice())
}
static func getSecretChatLinkPreviews(accountManager: AccountManager) -> Signal<Bool?, NoError> {
public static func getSecretChatLinkPreviews(accountManager: AccountManager) -> Signal<Bool?, NoError> {
return accountManager.transaction { transaction -> Bool? in
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.secretChatLinkPreviews()) as? ApplicationSpecificVariantNotice {
return value.value
@ -302,7 +303,7 @@ public struct ApplicationSpecificNotice {
}
}
static func getSecretChatLinkPreviews(_ entry: NoticeEntry) -> Bool? {
public static func getSecretChatLinkPreviews(_ entry: NoticeEntry) -> Bool? {
if let value = entry as? ApplicationSpecificVariantNotice {
return value.value
} else {
@ -310,7 +311,7 @@ public struct ApplicationSpecificNotice {
}
}
static func setSecretChatLinkPreviews(accountManager: AccountManager, value: Bool) -> Signal<Void, NoError> {
public static func setSecretChatLinkPreviews(accountManager: AccountManager, value: Bool) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.secretChatLinkPreviews(), ApplicationSpecificVariantNotice(value: value))
}
@ -320,11 +321,11 @@ public struct ApplicationSpecificNotice {
transaction.setNotice(ApplicationSpecificNoticeKeys.secretChatLinkPreviews(), ApplicationSpecificVariantNotice(value: value))
}
static func secretChatLinkPreviewsKey() -> NoticeEntryKey {
public static func secretChatLinkPreviewsKey() -> NoticeEntryKey {
return ApplicationSpecificNoticeKeys.secretChatLinkPreviews()
}
static func getChatMediaMediaRecordingTips(accountManager: AccountManager) -> Signal<Int32, NoError> {
public static func getChatMediaMediaRecordingTips(accountManager: AccountManager) -> Signal<Int32, NoError> {
return accountManager.transaction { transaction -> Int32 in
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.chatMediaMediaRecordingTips()) as? ApplicationSpecificCounterNotice {
return value.value
@ -334,7 +335,7 @@ public struct ApplicationSpecificNotice {
}
}
static func incrementChatMediaMediaRecordingTips(accountManager: AccountManager, count: Int32 = 1) -> Signal<Void, NoError> {
public static func incrementChatMediaMediaRecordingTips(accountManager: AccountManager, count: Int32 = 1) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
var currentValue: Int32 = 0
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.chatMediaMediaRecordingTips()) as? ApplicationSpecificCounterNotice {
@ -346,7 +347,7 @@ public struct ApplicationSpecificNotice {
}
}
static func getArchiveChatTips(accountManager: AccountManager) -> Signal<Int32, NoError> {
public static func getArchiveChatTips(accountManager: AccountManager) -> Signal<Int32, NoError> {
return accountManager.transaction { transaction -> Int32 in
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.archiveChatTips()) as? ApplicationSpecificCounterNotice {
return value.value
@ -356,7 +357,7 @@ public struct ApplicationSpecificNotice {
}
}
static func incrementArchiveChatTips(accountManager: AccountManager, count: Int = 1) -> Signal<Int, NoError> {
public static func incrementArchiveChatTips(accountManager: AccountManager, count: Int = 1) -> Signal<Int, NoError> {
return accountManager.transaction { transaction -> Int in
var currentValue: Int32 = 0
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.archiveChatTips()) as? ApplicationSpecificCounterNotice {
@ -375,11 +376,11 @@ public struct ApplicationSpecificNotice {
transaction.setNotice(ApplicationSpecificNoticeKeys.archiveIntroDismissed(), ApplicationSpecificVariantNotice(value: value))
}
static func archiveIntroDismissedKey() -> NoticeEntryKey {
public static func archiveIntroDismissedKey() -> NoticeEntryKey {
return ApplicationSpecificNoticeKeys.archiveIntroDismissed()
}
static func getProfileCallTips(accountManager: AccountManager) -> Signal<Int32, NoError> {
public static func getProfileCallTips(accountManager: AccountManager) -> Signal<Int32, NoError> {
return accountManager.transaction { transaction -> Int32 in
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.profileCallTips()) as? ApplicationSpecificCounterNotice {
return value.value
@ -389,7 +390,7 @@ public struct ApplicationSpecificNotice {
}
}
static func incrementProfileCallTips(accountManager: AccountManager, count: Int32 = 1) -> Signal<Void, NoError> {
public static func incrementProfileCallTips(accountManager: AccountManager, count: Int32 = 1) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
var currentValue: Int32 = 0
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.profileCallTips()) as? ApplicationSpecificCounterNotice {
@ -401,7 +402,7 @@ public struct ApplicationSpecificNotice {
}
}
static func getSetPublicChannelLink(accountManager: AccountManager) -> Signal<Bool, NoError> {
public static func getSetPublicChannelLink(accountManager: AccountManager) -> Signal<Bool, NoError> {
return accountManager.transaction { transaction -> Bool in
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.profileCallTips()) as? ApplicationSpecificCounterNotice {
return value.value < 1
@ -411,13 +412,13 @@ public struct ApplicationSpecificNotice {
}
}
static func markAsSeenSetPublicChannelLink(accountManager: AccountManager) -> Signal<Void, NoError> {
public static func markAsSeenSetPublicChannelLink(accountManager: AccountManager) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.profileCallTips(), ApplicationSpecificCounterNotice(value: 1))
}
}
static func getProxyAdsAcknowledgment(accountManager: AccountManager) -> Signal<Bool, NoError> {
public static func getProxyAdsAcknowledgment(accountManager: AccountManager) -> Signal<Bool, NoError> {
return accountManager.transaction { transaction -> Bool in
if let _ = transaction.getNotice(ApplicationSpecificNoticeKeys.proxyAdsAcknowledgment()) as? ApplicationSpecificBoolNotice {
return true
@ -427,13 +428,13 @@ public struct ApplicationSpecificNotice {
}
}
static func setProxyAdsAcknowledgment(accountManager: AccountManager) -> Signal<Void, NoError> {
public static func setProxyAdsAcknowledgment(accountManager: AccountManager) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.proxyAdsAcknowledgment(), ApplicationSpecificBoolNotice())
}
}
static func getPasscodeLockTips(accountManager: AccountManager) -> Signal<Bool, NoError> {
public static func getPasscodeLockTips(accountManager: AccountManager) -> Signal<Bool, NoError> {
return accountManager.transaction { transaction -> Bool in
if let _ = transaction.getNotice(ApplicationSpecificNoticeKeys.passcodeLockTips()) as? ApplicationSpecificBoolNotice {
return true
@ -443,7 +444,7 @@ public struct ApplicationSpecificNotice {
}
}
static func setPasscodeLockTips(accountManager: AccountManager) -> Signal<Void, NoError> {
public static func setPasscodeLockTips(accountManager: AccountManager) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.passcodeLockTips(), ApplicationSpecificBoolNotice())
}
@ -459,7 +460,7 @@ public struct ApplicationSpecificNotice {
}
let _ = accountManager.transaction { transaction -> Void in
transaction.setNotice(noticeKey, ApplicationSpecificTimestampNotice(value: value))
}.start()
}.start()
}
public static func getTimestampValue(_ entry: NoticeEntry) -> Int32? {
@ -470,7 +471,7 @@ public struct ApplicationSpecificNotice {
}
}
static func getVolumeButtonToUnmute(accountManager: AccountManager) -> Signal<Bool, NoError> {
public static func getVolumeButtonToUnmute(accountManager: AccountManager) -> Signal<Bool, NoError> {
return accountManager.transaction { transaction -> Bool in
if let _ = transaction.getNotice(ApplicationSpecificNoticeKeys.volumeButtonToUnmuteTip()) as? ApplicationSpecificBoolNotice {
return true
@ -483,10 +484,10 @@ public struct ApplicationSpecificNotice {
public static func setVolumeButtonToUnmute(accountManager: AccountManager) {
let _ = accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.volumeButtonToUnmuteTip(), ApplicationSpecificBoolNotice())
}.start()
}.start()
}
static func getCallsTabTip(accountManager: AccountManager) -> Signal<Int32, NoError> {
public static func getCallsTabTip(accountManager: AccountManager) -> Signal<Int32, NoError> {
return accountManager.transaction { transaction -> Int32 in
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.callsTabTip()) as? ApplicationSpecificCounterNotice {
return value.value
@ -496,7 +497,7 @@ public struct ApplicationSpecificNotice {
}
}
static func incrementCallsTabTips(accountManager: AccountManager, count: Int = 1) -> Signal<Int, NoError> {
public static func incrementCallsTabTips(accountManager: AccountManager, count: Int = 1) -> Signal<Int, NoError> {
return accountManager.transaction { transaction -> Int in
var currentValue: Int32 = 0
if let value = transaction.getNotice(ApplicationSpecificNoticeKeys.callsTabTip()) as? ApplicationSpecificCounterNotice {
@ -511,13 +512,13 @@ public struct ApplicationSpecificNotice {
}
}
static func setCallsTabTip(accountManager: AccountManager) -> Signal<Void, NoError> {
public static func setCallsTabTip(accountManager: AccountManager) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
transaction.setNotice(ApplicationSpecificNoticeKeys.callsTabTip(), ApplicationSpecificBoolNotice())
}
}
static func reset(accountManager: AccountManager) -> Signal<Void, NoError> {
public static func reset(accountManager: AccountManager) -> Signal<Void, NoError> {
return accountManager.transaction { transaction -> Void in
}
}

View File

@ -0,0 +1,19 @@
//
// TelegramNotices.h
// TelegramNotices
//
// Created by Peter on 8/10/19.
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for TelegramNotices.
FOUNDATION_EXPORT double TelegramNoticesVersionNumber;
//! Project version string for TelegramNotices.
FOUNDATION_EXPORT const unsigned char TelegramNoticesVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <TelegramNotices/PublicHeader.h>

View File

@ -0,0 +1,555 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
D0C9C13722FE42B200FAB518 /* TelegramNotices.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C9C13522FE42B200FAB518 /* TelegramNotices.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0C9C14222FE430500FAB518 /* Notices.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C14122FE430500FAB518 /* Notices.swift */; };
D0C9C14522FE437C00FAB518 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C14422FE437C00FAB518 /* Foundation.framework */; };
D0C9C14722FE437F00FAB518 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C14622FE437F00FAB518 /* Postbox.framework */; };
D0C9C14922FE438300FAB518 /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C14822FE438300FAB518 /* SwiftSignalKit.framework */; };
D0C9C17922FEF23100FAB518 /* TelegramPermissions.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C17822FEF23100FAB518 /* TelegramPermissions.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
D0C9C13222FE42B200FAB518 /* TelegramNotices.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TelegramNotices.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C13522FE42B200FAB518 /* TelegramNotices.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TelegramNotices.h; sourceTree = "<group>"; };
D0C9C13622FE42B200FAB518 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D0C9C14122FE430500FAB518 /* Notices.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Notices.swift; sourceTree = "<group>"; };
D0C9C14422FE437C00FAB518 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D0C9C14622FE437F00FAB518 /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C14822FE438300FAB518 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C17822FEF23100FAB518 /* TelegramPermissions.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPermissions.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D0C9C12F22FE42B200FAB518 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C17922FEF23100FAB518 /* TelegramPermissions.framework in Frameworks */,
D0C9C14922FE438300FAB518 /* SwiftSignalKit.framework in Frameworks */,
D0C9C14722FE437F00FAB518 /* Postbox.framework in Frameworks */,
D0C9C14522FE437C00FAB518 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
D0C9C12822FE42B200FAB518 = {
isa = PBXGroup;
children = (
D0C9C13622FE42B200FAB518 /* Info.plist */,
D0C9C13422FE42B200FAB518 /* Sources */,
D0C9C13322FE42B200FAB518 /* Products */,
D0C9C14322FE437C00FAB518 /* Frameworks */,
);
sourceTree = "<group>";
};
D0C9C13322FE42B200FAB518 /* Products */ = {
isa = PBXGroup;
children = (
D0C9C13222FE42B200FAB518 /* TelegramNotices.framework */,
);
name = Products;
sourceTree = "<group>";
};
D0C9C13422FE42B200FAB518 /* Sources */ = {
isa = PBXGroup;
children = (
D0C9C14122FE430500FAB518 /* Notices.swift */,
D0C9C13522FE42B200FAB518 /* TelegramNotices.h */,
);
path = Sources;
sourceTree = "<group>";
};
D0C9C14322FE437C00FAB518 /* Frameworks */ = {
isa = PBXGroup;
children = (
D0C9C17822FEF23100FAB518 /* TelegramPermissions.framework */,
D0C9C14822FE438300FAB518 /* SwiftSignalKit.framework */,
D0C9C14622FE437F00FAB518 /* Postbox.framework */,
D0C9C14422FE437C00FAB518 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D0C9C12D22FE42B200FAB518 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C13722FE42B200FAB518 /* TelegramNotices.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D0C9C13122FE42B200FAB518 /* TelegramNotices */ = {
isa = PBXNativeTarget;
buildConfigurationList = D0C9C13A22FE42B200FAB518 /* Build configuration list for PBXNativeTarget "TelegramNotices" */;
buildPhases = (
D0C9C12D22FE42B200FAB518 /* Headers */,
D0C9C12E22FE42B200FAB518 /* Sources */,
D0C9C12F22FE42B200FAB518 /* Frameworks */,
D0C9C13022FE42B200FAB518 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TelegramNotices;
productName = TelegramNotices;
productReference = D0C9C13222FE42B200FAB518 /* TelegramNotices.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D0C9C12922FE42B200FAB518 /* Project object */ = {
isa = PBXProject;
attributes = {
DefaultBuildSystemTypeForWorkspace = Latest;
LastUpgradeCheck = 1030;
ORGANIZATIONNAME = "Telegram Messenger LLP";
TargetAttributes = {
D0C9C13122FE42B200FAB518 = {
CreatedOnToolsVersion = 10.3;
LastSwiftMigration = 1030;
};
};
};
buildConfigurationList = D0C9C12C22FE42B200FAB518 /* Build configuration list for PBXProject "TelegramNotices_Xcode" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = D0C9C12822FE42B200FAB518;
productRefGroup = D0C9C13322FE42B200FAB518 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D0C9C13122FE42B200FAB518 /* TelegramNotices */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D0C9C13022FE42B200FAB518 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D0C9C12E22FE42B200FAB518 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C14222FE430500FAB518 /* Notices.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
D0C9C13822FE42B200FAB518 /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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 = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugAppStoreLLC;
};
D0C9C13922FE42B200FAB518 /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = ReleaseAppStoreLLC;
};
D0C9C13B22FE42B200FAB518 /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramNotices;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugAppStoreLLC;
};
D0C9C13C22FE42B200FAB518 /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramNotices;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseAppStoreLLC;
};
D0C9C13D22FE42E300FAB518 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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 = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugHockeyapp;
};
D0C9C13E22FE42E300FAB518 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramNotices;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugHockeyapp;
};
D0C9C13F22FE42F000FAB518 /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = ReleaseHockeyappInternal;
};
D0C9C14022FE42F000FAB518 /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramNotices;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseHockeyappInternal;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D0C9C12C22FE42B200FAB518 /* Build configuration list for PBXProject "TelegramNotices_Xcode" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0C9C13822FE42B200FAB518 /* DebugAppStoreLLC */,
D0C9C13D22FE42E300FAB518 /* DebugHockeyapp */,
D0C9C13922FE42B200FAB518 /* ReleaseAppStoreLLC */,
D0C9C13F22FE42F000FAB518 /* ReleaseHockeyappInternal */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseAppStoreLLC;
};
D0C9C13A22FE42B200FAB518 /* Build configuration list for PBXNativeTarget "TelegramNotices" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0C9C13B22FE42B200FAB518 /* DebugAppStoreLLC */,
D0C9C13E22FE42E300FAB518 /* DebugHockeyapp */,
D0C9C13C22FE42B200FAB518 /* ReleaseAppStoreLLC */,
D0C9C14022FE42F000FAB518 /* ReleaseHockeyappInternal */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseAppStoreLLC;
};
/* End XCConfigurationList section */
};
rootObject = D0C9C12922FE42B200FAB518 /* Project object */;
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

View File

@ -19,7 +19,7 @@ public enum PermissionRequestStatus {
case unreachable
case allowed
init(accessType: AccessType) {
public init(accessType: AccessType) {
switch accessType {
case .notDetermined:
self = .requestable
@ -40,7 +40,7 @@ public enum PermissionState: Equatable {
case cellularData(status: PermissionRequestStatus)
case nearbyLocation(status: PermissionRequestStatus)
var kind: PermissionKind {
public var kind: PermissionKind {
switch self {
case .contacts:
return .contacts

View File

@ -0,0 +1,19 @@
//
// TelegramPermissions.h
// TelegramPermissions
//
// Created by Peter on 8/10/19.
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for TelegramPermissions.
FOUNDATION_EXPORT double TelegramPermissionsVersionNumber;
//! Project version string for TelegramPermissions.
FOUNDATION_EXPORT const unsigned char TelegramPermissionsVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <TelegramPermissions/PublicHeader.h>

View File

@ -0,0 +1,563 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
D0C9C15D22FE43E300FAB518 /* TelegramPermissions.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C9C15B22FE43E300FAB518 /* TelegramPermissions.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0C9C16422FEF1A700FAB518 /* Permission.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0C9C16322FEF1A700FAB518 /* Permission.swift */; };
D0C9C16B22FEF1F500FAB518 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C16A22FEF1F500FAB518 /* Foundation.framework */; };
D0C9C16D22FEF1F900FAB518 /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C16C22FEF1F900FAB518 /* SwiftSignalKit.framework */; };
D0C9C16F22FEF1FC00FAB518 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C16E22FEF1FC00FAB518 /* Postbox.framework */; };
D0C9C17122FEF1FF00FAB518 /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C17022FEF1FF00FAB518 /* TelegramCore.framework */; };
D0C9C17322FEF20500FAB518 /* DeviceAccess.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C17222FEF20500FAB518 /* DeviceAccess.framework */; };
D0C9C17522FEF20B00FAB518 /* AccountContext.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0C9C17422FEF20B00FAB518 /* AccountContext.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
D0C9C15822FE43E300FAB518 /* TelegramPermissions.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TelegramPermissions.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C15B22FE43E300FAB518 /* TelegramPermissions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TelegramPermissions.h; sourceTree = "<group>"; };
D0C9C15C22FE43E300FAB518 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D0C9C16322FEF1A700FAB518 /* Permission.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Permission.swift; sourceTree = "<group>"; };
D0C9C16A22FEF1F500FAB518 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D0C9C16C22FEF1F900FAB518 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C16E22FEF1FC00FAB518 /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C17022FEF1FF00FAB518 /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C17222FEF20500FAB518 /* DeviceAccess.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DeviceAccess.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0C9C17422FEF20B00FAB518 /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D0C9C15522FE43E300FAB518 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C17522FEF20B00FAB518 /* AccountContext.framework in Frameworks */,
D0C9C17322FEF20500FAB518 /* DeviceAccess.framework in Frameworks */,
D0C9C17122FEF1FF00FAB518 /* TelegramCore.framework in Frameworks */,
D0C9C16F22FEF1FC00FAB518 /* Postbox.framework in Frameworks */,
D0C9C16D22FEF1F900FAB518 /* SwiftSignalKit.framework in Frameworks */,
D0C9C16B22FEF1F500FAB518 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
D0C9C14E22FE43E300FAB518 = {
isa = PBXGroup;
children = (
D0C9C15C22FE43E300FAB518 /* Info.plist */,
D0C9C15A22FE43E300FAB518 /* Sources */,
D0C9C15922FE43E300FAB518 /* Products */,
D0C9C16922FEF1F500FAB518 /* Frameworks */,
);
sourceTree = "<group>";
};
D0C9C15922FE43E300FAB518 /* Products */ = {
isa = PBXGroup;
children = (
D0C9C15822FE43E300FAB518 /* TelegramPermissions.framework */,
);
name = Products;
sourceTree = "<group>";
};
D0C9C15A22FE43E300FAB518 /* Sources */ = {
isa = PBXGroup;
children = (
D0C9C16322FEF1A700FAB518 /* Permission.swift */,
D0C9C15B22FE43E300FAB518 /* TelegramPermissions.h */,
);
path = Sources;
sourceTree = "<group>";
};
D0C9C16922FEF1F500FAB518 /* Frameworks */ = {
isa = PBXGroup;
children = (
D0C9C17422FEF20B00FAB518 /* AccountContext.framework */,
D0C9C17222FEF20500FAB518 /* DeviceAccess.framework */,
D0C9C17022FEF1FF00FAB518 /* TelegramCore.framework */,
D0C9C16E22FEF1FC00FAB518 /* Postbox.framework */,
D0C9C16C22FEF1F900FAB518 /* SwiftSignalKit.framework */,
D0C9C16A22FEF1F500FAB518 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D0C9C15322FE43E300FAB518 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C15D22FE43E300FAB518 /* TelegramPermissions.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D0C9C15722FE43E300FAB518 /* TelegramPermissions */ = {
isa = PBXNativeTarget;
buildConfigurationList = D0C9C16022FE43E300FAB518 /* Build configuration list for PBXNativeTarget "TelegramPermissions" */;
buildPhases = (
D0C9C15322FE43E300FAB518 /* Headers */,
D0C9C15422FE43E300FAB518 /* Sources */,
D0C9C15522FE43E300FAB518 /* Frameworks */,
D0C9C15622FE43E300FAB518 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TelegramPermissions;
productName = TelegramPermissions;
productReference = D0C9C15822FE43E300FAB518 /* TelegramPermissions.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D0C9C14F22FE43E300FAB518 /* Project object */ = {
isa = PBXProject;
attributes = {
DefaultBuildSystemTypeForWorkspace = Latest;
LastUpgradeCheck = 1030;
ORGANIZATIONNAME = "Telegram Messenger LLP";
TargetAttributes = {
D0C9C15722FE43E300FAB518 = {
CreatedOnToolsVersion = 10.3;
LastSwiftMigration = 1030;
};
};
};
buildConfigurationList = D0C9C15222FE43E300FAB518 /* Build configuration list for PBXProject "TelegramPermissions_Xcode" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = D0C9C14E22FE43E300FAB518;
productRefGroup = D0C9C15922FE43E300FAB518 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D0C9C15722FE43E300FAB518 /* TelegramPermissions */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D0C9C15622FE43E300FAB518 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D0C9C15422FE43E300FAB518 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D0C9C16422FEF1A700FAB518 /* Permission.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
D0C9C15E22FE43E300FAB518 /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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 = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugAppStoreLLC;
};
D0C9C15F22FE43E300FAB518 /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = ReleaseAppStoreLLC;
};
D0C9C16122FE43E300FAB518 /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramPermissions;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugAppStoreLLC;
};
D0C9C16222FE43E300FAB518 /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramPermissions;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseAppStoreLLC;
};
D0C9C16522FEF1C400FAB518 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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 = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugHockeyapp;
};
D0C9C16622FEF1C400FAB518 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramPermissions;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugHockeyapp;
};
D0C9C16722FEF1CF00FAB518 /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
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_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 Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = ReleaseHockeyappInternal;
};
D0C9C16822FEF1CF00FAB518 /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramPermissions;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseHockeyappInternal;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D0C9C15222FE43E300FAB518 /* Build configuration list for PBXProject "TelegramPermissions_Xcode" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0C9C15E22FE43E300FAB518 /* DebugAppStoreLLC */,
D0C9C16522FEF1C400FAB518 /* DebugHockeyapp */,
D0C9C15F22FE43E300FAB518 /* ReleaseAppStoreLLC */,
D0C9C16722FEF1CF00FAB518 /* ReleaseHockeyappInternal */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseAppStoreLLC;
};
D0C9C16022FE43E300FAB518 /* Build configuration list for PBXNativeTarget "TelegramPermissions" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0C9C16122FE43E300FAB518 /* DebugAppStoreLLC */,
D0C9C16622FEF1C400FAB518 /* DebugHockeyapp */,
D0C9C16222FE43E300FAB518 /* ReleaseAppStoreLLC */,
D0C9C16822FEF1CF00FAB518 /* ReleaseHockeyappInternal */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseAppStoreLLC;
};
/* End XCConfigurationList section */
};
rootObject = D0C9C14F22FE43E300FAB518 /* Project object */;
}

View File

@ -11,6 +11,8 @@ import DeviceAccess
import TelegramUpdateUI
import AccountContext
import AlertUI
import TelegramPermissions
import TelegramNotices
func isAccessLocked(data: PostboxAccessChallengeData, at timestamp: Int32) -> Bool {
if data.isLockable, let autolockDeadline = data.autolockDeadline, autolockDeadline <= timestamp {

View File

@ -11,6 +11,7 @@ import TelegramUIPrivateModule
import ItemListUI
import AccountContext
import AlertUI
import TelegramNotices
final class BotCheckoutControllerArguments {
fileprivate let account: Account

View File

@ -6,6 +6,7 @@ import SwiftSignalKit
import TelegramCore
import TelegramPresentationData
import ItemListUI
import PhotoResources
class BotCheckoutHeaderItem: ListViewItem, ItemListItem {
let account: Account

View File

@ -9,6 +9,7 @@ import TelegramPresentationData
import TelegramUIPreferences
import ItemListUI
import AccountContext
import TelegramNotices
private struct CallListNodeListViewTransition {
let callListView: CallListNodeView

View File

@ -11,6 +11,7 @@ import OverlayStatusController
import AccountContext
import ShareController
import AlertUI
import TelegramNotices
private final class ChannelVisibilityControllerArguments {
let account: Account

View File

@ -5,6 +5,7 @@ import Display
import SwiftSignalKit
import UniversalMediaPlayer
import AccountContext
import PhotoResources
final class ChatBubbleVideoDecoration: UniversalVideoDecoration {
private let nativeSize: CGSize

View File

@ -6,6 +6,7 @@ import Postbox
import TelegramCore
import SwiftSignalKit
import AVFoundation
import PhotoResources
final class ChatContextResultPeekContent: PeekControllerContent {
let account: Account

View File

@ -24,6 +24,8 @@ import ContextUI
import ComposePollUI
import AlertUI
import UndoUI
import TelegramCallsUI
import TelegramNotices
public enum ChatControllerPeekActions {
case standard

View File

@ -9,6 +9,7 @@ import TelegramPresentationData
import TelegramUIPreferences
import TextFormat
import AccountContext
import TelegramNotices
private final class ChatControllerNodeView: UITracingLayerView, WindowInputAccessoryHeightProvider, PreviewingHostView {
var inputAccessoryHeight: (() -> CGFloat)?

View File

@ -8,6 +8,7 @@ import TelegramCore
import TelegramPresentationData
import AccountContext
import RadialStatusNode
import PhotoResources
enum ChatMediaGalleryThumbnail: Equatable {
case image(ImageMediaReference)

View File

@ -1,6 +1,7 @@
import Foundation
import Postbox
import SwiftSignalKit
import TelegramNotices
final class InteractiveChatLinkPreviewsResult {
let f: (Bool) -> Void

View File

@ -11,6 +11,7 @@ import OverlayStatusController
import AccountContext
import AlertUI
import UndoUI
import TelegramNotices
public func useSpecialTabBarIcons() -> Bool {
return (Date(timeIntervalSince1970: 1545642000)...Date(timeIntervalSince1970: 1546387200)).contains(Date())

View File

@ -13,6 +13,7 @@ import AccountContext
import PeerOnlineMarkerNode
import LocalizedPeerData
import PeerPresenceStatusManager
import PhotoResources
enum ChatListItemContent {
case peer(message: Message?, peer: RenderedPeer, combinedReadState: CombinedPeerReadState?, notificationSettings: PeerNotificationSettings?, presence: PeerPresence?, summaryInfo: ChatListMessageTagSummaryInfo, embeddedState: PeerChatListEmbeddedInterfaceState?, inputActivities: [(Peer, PeerInputActivity)]?, isAd: Bool, ignoreUnreadBadge: Bool)

View File

@ -8,6 +8,7 @@ import Postbox
import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
import TelegramNotices
public struct ChatListNodePeersFilter: OptionSet {
public var rawValue: Int32

View File

@ -10,6 +10,7 @@ import TelegramUIPreferences
import TextFormat
import LocalizedPeerData
import UrlEscaping
import PhotoResources
private let titleFont = Font.regular(13.0)
private let titleBoldFont = Font.bold(13.0)

View File

@ -11,6 +11,7 @@ import TelegramUIPreferences
import TextFormat
import AccountContext
import UrlEscaping
import PhotoResources
private let titleFont = Font.semibold(15.0)
private let textFont = Font.regular(15.0)

View File

@ -9,6 +9,7 @@ import UniversalMediaPlayer
import TelegramPresentationData
import AccountContext
import RadialStatusNode
import PhotoResources
private struct FetchControls {
let fetch: () -> Void

View File

@ -9,6 +9,7 @@ import UniversalMediaPlayer
import TelegramPresentationData
import AccountContext
import RadialStatusNode
import PhotoResources
struct ChatMessageInstantVideoItemLayoutResult {
let contentSize: CGSize

View File

@ -12,6 +12,7 @@ import TextFormat
import AccountContext
import RadialStatusNode
import StickerResources
import PhotoResources
private struct FetchControls {
let fetch: (Bool) -> Void

View File

@ -6,6 +6,8 @@ import SwiftSignalKit
import Postbox
import TelegramCore
import LiveLocationTimerNode
import PhotoResources
import MediaResources
private let titleFont = Font.medium(14.0)
private let liveTitleFont = Font.medium(16.0)

View File

@ -11,6 +11,7 @@ import AvatarNode
import AccountContext
import LocalizedPeerData
import StickerResources
import PhotoResources
public final class ChatMessageNotificationItem: NotificationItem {
let context: AccountContext

View File

@ -8,6 +8,7 @@ import SwiftSignalKit
import TelegramPresentationData
import AccountContext
import LocalizedPeerData
import PhotoResources
private let titleFont = Font.medium(14.0)
private let textFont = Font.regular(14.0)

View File

@ -9,6 +9,7 @@ import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
import StickerResources
import PhotoResources
final class ChatPinnedMessageTitlePanelNode: ChatTitleAccessoryPanelNode {
private let context: AccountContext

View File

@ -9,6 +9,7 @@ import TelegramPresentationData
import TextFormat
import AccountContext
import TouchDownGesture
import ImageTransparency
private let searchLayoutProgressImage = generateImage(CGSize(width: 22.0, height: 22.0), contextGenerator: { size, context in
context.clear(CGRect(origin: CGPoint(), size: size))

View File

@ -12,6 +12,8 @@ import MergeLists
import ItemListUI
import MediaResources
import AccountContext
import TelegramPermissions
import TelegramNotices
private let dropDownIcon = { () -> UIImage in
UIGraphicsBeginImageContextWithOptions(CGSize(width: 12.0, height: 12.0), false, 0.0)

View File

@ -10,6 +10,8 @@ import TelegramUIPreferences
import DeviceAccess
import AccountContext
import AlertUI
import TelegramPermissions
import TelegramNotices
private func fixListNodeScrolling(_ listNode: ListView, searchNode: NavigationBarSearchContentNode) -> Bool {
if searchNode.expansionProgress > 0.0 && searchNode.expansionProgress < 1.0 {

View File

@ -10,6 +10,8 @@ import LegacyComponents
import ItemListUI
import AccountContext
import AlertUI
import MediaResources
import PhotoResources
public enum CreateGroupMode {
case generic

View File

@ -10,6 +10,7 @@ import ItemListUI
import OverlayStatusController
import AccountContext
import AlertUI
import TelegramNotices
private final class DataPrivacyControllerArguments {
let account: Account

View File

@ -1,6 +1,7 @@
import Postbox
import TemporaryCachedPeerDataManager
import TelegramUIPreferences
import TelegramNotices
private var telegramUIDeclaredEncodables: Void = {
declareEncodable(InAppNotificationSettings.self, f: { InAppNotificationSettings(decoder: $0) })

View File

@ -10,6 +10,8 @@ import ItemListUI
import TelegramStringFormatting
import AccountContext
import AlertUI
import PhotoResources
import MediaResources
private enum DeviceContactInfoAction {
case sendMessage

View File

@ -10,6 +10,7 @@ import TelegramUIPreferences
import ActivityIndicator
import AccountContext
import RadialStatusNode
import PhotoResources
final class EditAccessoryPanelNode: AccessoryPanelNode {
let messageId: MessageId

View File

@ -15,6 +15,7 @@ import WebP
import Lottie
import TelegramUIPrivateModule
import MediaResources
import PhotoResources
public func fetchCachedResourceRepresentation(account: Account, resource: MediaResource, representation: CachedMediaResourceRepresentation) -> Signal<CachedMediaResourceRepresentationResult, NoError> {
if let representation = representation as? CachedStickerAJpegRepresentation {

View File

@ -5,6 +5,7 @@ import Display
import SwiftSignalKit
import UniversalMediaPlayer
import AccountContext
import PhotoResources
final class GalleryVideoDecoration: UniversalVideoDecoration {
let backgroundNode: ASDisplayNode? = nil

View File

@ -9,6 +9,7 @@ import TelegramPresentationData
import TelegramStringFormatting
import AccountContext
import RadialStatusNode
import PhotoResources
private func mediaForMessage(_ message: Message) -> Media? {
for media in message.media {

View File

@ -16,6 +16,8 @@ import TelegramStringFormatting
import TemporaryCachedPeerDataManager
import ShareController
import AlertUI
import MediaResources
import PhotoResources
private final class GroupInfoArguments {
let context: AccountContext

View File

@ -8,6 +8,7 @@ import Postbox
import AVFoundation
import RadialStatusNode
import StickerResources
import PhotoResources
final class HorizontalListContextResultsChatInputPanelItem: ListViewItem {
let account: Account

View File

@ -51,34 +51,3 @@ func compressImage(_ image: UIImage, quality: Float) -> Data? {
return data as Data
}
private let tinyThumbnailHeaderPattern = Data(base64Encoded: "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDACgcHiMeGSgjISMtKygwPGRBPDc3PHtYXUlkkYCZlo+AjIqgtObDoKrarYqMyP/L2u71////m8H////6/+b9//j/2wBDASstLTw1PHZBQXb4pYyl+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj/wAARCAAAAAADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwA=")
private let tinyThumbnailFooterPattern = Data(base64Encoded: "/9k=")
func decodeTinyThumbnail(data: Data) -> Data? {
if data.count < 3 {
return nil
}
guard let tinyThumbnailHeaderPattern = tinyThumbnailHeaderPattern, let tinyThumbnailFooterPattern = tinyThumbnailFooterPattern else {
return nil
}
var version: UInt8 = 0
data.copyBytes(to: &version, count: 1)
if version != 1 {
return nil
}
var width: UInt8 = 0
var height: UInt8 = 0
data.copyBytes(to: &width, from: 1 ..< 2)
data.copyBytes(to: &height, from: 2 ..< 3)
var resultData = Data()
resultData.append(tinyThumbnailHeaderPattern)
resultData.append(data.subdata(in: 3 ..< data.count))
resultData.append(tinyThumbnailFooterPattern)
resultData.withUnsafeMutableBytes({ (resultBytes: UnsafeMutablePointer<UInt8>) -> Void in
resultBytes[164] = width
resultBytes[166] = height
})
return resultData
}

View File

@ -4,6 +4,7 @@ import Postbox
import TelegramCore
import TelegramUIPreferences
import AccountContext
import PhotoResources
private final class PrefetchMediaContext {
let fetchDisposable = MetaDisposable()

View File

@ -7,6 +7,7 @@ import Postbox
import TelegramCore
import TelegramPresentationData
import AccountContext
import PhotoResources
private struct InstantImageGalleryThumbnailItem: GalleryThumbnailItem {
let account: Account

View File

@ -7,6 +7,7 @@ import TelegramCore
import SwiftSignalKit
import TelegramPresentationData
import AccountContext
import PhotoResources
final class InstantPageArticleNode: ASDisplayNode, InstantPageNode {
let item: InstantPageArticleItem

View File

@ -8,6 +8,8 @@ import SwiftSignalKit
import TelegramPresentationData
import AccountContext
import RadialStatusNode
import PhotoResources
import MediaResources
private struct FetchControls {
let fetch: (Bool) -> Void

View File

@ -15,6 +15,7 @@ import AppBinaryPrivate
#endif
import TelegramUIPrivateModule
import LegacyComponents
import TelegramNotices
@objc(TGPresentationState) private final class TGPresentationState: NSObject, NSCoding {
let pallete: Int32

View File

@ -9,6 +9,7 @@ import UIKit
import Display
import TelegramPresentationData
import AccountContext
import PhotoResources
class LegacyWebSearchItem: NSObject, TGMediaEditableItem, TGMediaSelectableItem {
var isVideo: Bool {

View File

@ -11,6 +11,7 @@ import AccountContext
import TelegramStringFormatting
import AccountContext
import RadialStatusNode
import PhotoResources
private let extensionImageCache = Atomic<[UInt32: UIImage]>(value: [:])

View File

@ -8,6 +8,7 @@ import SwiftSignalKit
import TelegramPresentationData
import ItemListUI
import TextFormat
import PhotoResources
private let titleFont = Font.medium(16.0)
private let descriptionFont = Font.regular(14.0)

View File

@ -8,6 +8,7 @@ import TelegramCore
import TelegramAudio
import UniversalMediaPlayer
import AccountContext
import PhotoResources
enum NativeVideoContentId: Hashable {
case message(UInt32, MediaId)

View File

@ -11,6 +11,7 @@ import TelegramUIPrivateModule
import AccountContext
import Tuples
import StickerResources
import PhotoResources
private enum NotificationContentAuthorizationError {
case unauthorized

View File

@ -10,6 +10,7 @@ import DeviceAccess
import ItemListUI
import AccountContext
import AlertUI
import TelegramNotices
private final class NotificationsAndSoundsArguments {
let context: AccountContext

View File

@ -8,6 +8,7 @@ import TelegramCore
import MapKit
import TelegramPresentationData
import AccountContext
import PhotoResources
public struct OpenInControllerAction {
let title: String

View File

@ -9,6 +9,7 @@ import TelegramPresentationData
import UniversalMediaPlayer
import TelegramUIPreferences
import AccountContext
import PhotoResources
private func generateBackground(theme: PresentationTheme) -> UIImage? {
return generateImage(CGSize(width: 20.0, height: 10.0 + 8.0), rotatedContext: { size, context in

View File

@ -9,6 +9,7 @@ import TelegramPresentationData
import AccountContext
import RadialStatusNode
import ShareController
import PhotoResources
private struct PeerAvatarImageGalleryThumbnailItem: GalleryThumbnailItem {
let account: Account

View File

@ -4,6 +4,7 @@ import Display
import AsyncDisplayKit
import TelegramPresentationData
import TextFormat
import TelegramPermissions
enum PermissionContentIcon {
case image(UIImage?)

View File

@ -6,6 +6,7 @@ import SwiftSignalKit
import TelegramCore
import TelegramPresentationData
import AccountContext
import TelegramPermissions
public struct PermissionControllerCustomIcon: Equatable {
let light: UIImage?

View File

@ -3,6 +3,7 @@ import UIKit
import SwiftSignalKit
import Postbox
import TelegramCore
import TelegramPermissions
extension PermissionKind {
fileprivate static var defaultOrder: [PermissionKind] {

View File

@ -9,6 +9,7 @@ import AVFoundation
import UniversalMediaPlayer
import TelegramAudio
import AccountContext
import PhotoResources
enum PlatformVideoContentId: Hashable {
case message(MessageId, UInt32, MediaId)

View File

@ -4,6 +4,7 @@ import Postbox
import TelegramCore
import TelegramUIPreferences
import AccountContext
import PhotoResources
private final class PrefetchMediaContext {
let fetchDisposable = MetaDisposable()

View File

@ -9,6 +9,7 @@ import TelegramUIPreferences
import TelegramCallsUI
import ItemListUI
import AccountContext
import TelegramNotices
private final class PrivacyAndSecurityControllerArguments {
let account: Account

View File

@ -9,6 +9,7 @@ import TelegramPresentationData
import TelegramUIPreferences
import AccountContext
import LocalizedPeerData
import PhotoResources
final class ReplyAccessoryPanelNode: AccessoryPanelNode {
private let messageDisposable = MetaDisposable()

View File

@ -2,4 +2,3 @@
#import <UIKit/UIKit.h>
UIImage *SecretChatKeyVisualization(NSData *data, NSData *additionalData, CGSize size);
NSString *stringForEmojiHashOfData(NSData *data, NSInteger count);

View File

@ -109,29 +109,3 @@ UIImage *SecretChatKeyVisualization(NSData *data, NSData *additionalData, CGSize
return image;
}
static int32_t positionExtractor(uint8_t *bytes, int32_t i, int32_t count) {
int offset = i * 8;
int64_t num = (((int64_t)bytes[offset] & 0x7F) << 56) | (((int64_t)bytes[offset+1] & 0xFF) << 48) | (((int64_t)bytes[offset+2] & 0xFF) << 40) | (((int64_t)bytes[offset+3] & 0xFF) << 32) | (((int64_t)bytes[offset+4] & 0xFF) << 24) | (((int64_t)bytes[offset+5] & 0xFF) << 16) | (((int64_t)bytes[offset+6] & 0xFF) << 8) | (((int64_t)bytes[offset+7] & 0xFF));
return num % count;
}
NSString *stringForEmojiHashOfData(NSData *data, NSInteger count) {
if (data.length != 32)
return @"";
NSArray *emojis = @[ @"😉", @"😍", @"😛", @"😭", @"😱", @"😡", @"😎", @"😴", @"😵", @"😈", @"😬", @"😇", @"😏", @"👮", @"👷", @"💂", @"👶", @"👨", @"👩", @"👴", @"👵", @"😻", @"😽", @"🙀", @"👺", @"🙈", @"🙉", @"🙊", @"💀", @"👽", @"💩", @"🔥", @"💥", @"💤", @"👂", @"👀", @"👃", @"👅", @"👄", @"👍", @"👎", @"👌", @"👊", @"✌️", @"✋️", @"👐", @"👆", @"👇", @"👉", @"👈", @"🙏", @"👏", @"💪", @"🚶", @"🏃", @"💃", @"👫", @"👪", @"👬", @"👭", @"💅", @"🎩", @"👑", @"👒", @"👟", @"👞", @"👠", @"👕", @"👗", @"👖", @"👙", @"👜", @"👓", @"🎀", @"💄", @"💛", @"💙", @"💜", @"💚", @"💍", @"💎", @"🐶", @"🐺", @"🐱", @"🐭", @"🐹", @"🐰", @"🐸", @"🐯", @"🐨", @"🐻", @"🐷", @"🐮", @"🐗", @"🐴", @"🐑", @"🐘", @"🐼", @"🐧", @"🐥", @"🐔", @"🐍", @"🐢", @"🐛", @"🐝", @"🐜", @"🐞", @"🐌", @"🐙", @"🐚", @"🐟", @"🐬", @"🐋", @"🐐", @"🐊", @"🐫", @"🍀", @"🌹", @"🌻", @"🍁", @"🌾", @"🍄", @"🌵", @"🌴", @"🌳", @"🌞", @"🌚", @"🌙", @"🌎", @"🌋", @"⚡️", @"☔️", @"❄️", @"⛄️", @"🌀", @"🌈", @"🌊", @"🎓", @"🎆", @"🎃", @"👻", @"🎅", @"🎄", @"🎁", @"🎈", @"🔮", @"🎥", @"📷", @"💿", @"💻", @"☎️", @"📡", @"📺", @"📻", @"🔉", @"🔔", @"⏳", @"⏰", @"⌚️", @"🔒", @"🔑", @"🔎", @"💡", @"🔦", @"🔌", @"🔋", @"🚿", @"🚽", @"🔧", @"🔨", @"🚪", @"🚬", @"💣", @"🔫", @"🔪", @"💊", @"💉", @"💰", @"💵", @"💳", @"✉️", @"📫", @"📦", @"📅", @"📁", @"✂️", @"📌", @"📎", @"✒️", @"✏️", @"📐", @"📚", @"🔬", @"🔭", @"🎨", @"🎬", @"🎤", @"🎧", @"🎵", @"🎹", @"🎻", @"🎺", @"🎸", @"👾", @"🎮", @"🃏", @"🎲", @"🎯", @"🏈", @"🏀", @"⚽️", @"⚾️", @"🎾", @"🎱", @"🏉", @"🎳", @"🏁", @"🏇", @"🏆", @"🏊", @"🏄", @"☕️", @"🍼", @"🍺", @"🍷", @"🍴", @"🍕", @"🍔", @"🍟", @"🍗", @"🍱", @"🍚", @"🍜", @"🍡", @"🍳", @"🍞", @"🍩", @"🍦", @"🎂", @"🍰", @"🍪", @"🍫", @"🍭", @"🍯", @"🍎", @"🍏", @"🍊", @"🍋", @"🍒", @"🍇", @"🍉", @"🍓", @"🍑", @"🍌", @"🍐", @"🍍", @"🍆", @"🍅", @"🌽", @"🏡", @"🏥", @"🏦", @"⛪️", @"🏰", @"⛺️", @"🏭", @"🗻", @"🗽", @"🎠", @"🎡", @"⛲️", @"🎢", @"🚢", @"🚤", @"⚓️", @"🚀", @"✈️", @"🚁", @"🚂", @"🚋", @"🚎", @"🚌", @"🚙", @"🚗", @"🚕", @"🚛", @"🚨", @"🚔", @"🚒", @"🚑", @"🚲", @"🚠", @"🚜", @"🚦", @"⚠️", @"🚧", @"⛽️", @"🎰", @"🗿", @"🎪", @"🎭", @"🇯🇵", @"🇰🇷", @"🇩🇪", @"🇨🇳", @"🇺🇸", @"🇫🇷", @"🇪🇸", @"🇮🇹", @"🇷🇺", @"🇬🇧", @"1⃣", @"2⃣", @"3⃣", @"4⃣", @"5⃣", @"6⃣", @"7⃣", @"8⃣", @"9⃣", @"0⃣", @"🔟", @"❗️", @"❓", @"♥️", @"♦️", @"💯", @"🔗", @"🔱", @"🔴", @"🔵", @"🔶", @"🔷" ];
uint8_t bytes[32];
[data getBytes:bytes length:32];
NSString *result = @"";
for (int32_t i = 0; i < count; i++)
{
int32_t position = positionExtractor(bytes, i, (int32_t)emojis.count);
NSString *emoji = emojis[position];
result = [result stringByAppendingString:emoji];
}
return result;
}

View File

@ -7,6 +7,7 @@ import Postbox
import TelegramCore
import TelegramPresentationData
import AccountContext
import PhotoResources
class SecureIdDocumentGalleryItem: GalleryItem {
let context: AccountContext

Some files were not shown because too many files have changed in this diff Show More