diff --git a/BUCK b/BUCK
index 660f12f65b..83d0e06861 100644
--- a/BUCK
+++ b/BUCK
@@ -397,6 +397,15 @@ apple_bundle(
# Watch
+apple_resource(
+ name = "WatchAppStringResources",
+ files = [],
+ variants = glob([
+ "Telegram-iOS/*.lproj/Localizable.strings",
+ ]),
+ visibility = ["PUBLIC"],
+)
+
apple_binary(
name = "WatchAppExtensionBinary",
srcs = glob([
@@ -426,6 +435,9 @@ apple_binary(
"$SDKROOT/System/Library/Frameworks/CoreLocation.framework",
"$SDKROOT/System/Library/Frameworks/CoreGraphics.framework",
],
+ deps = [
+ ":WatchAppStringResources",
+ ],
)
apple_bundle(
@@ -460,15 +472,6 @@ apple_resource(
visibility = ["PUBLIC"],
)
-apple_resource(
- name = "WatchAppStringResources",
- files = [],
- variants = glob([
- "Telegram-iOS/*.lproj/Localizable.strings",
- ]),
- visibility = ["PUBLIC"],
-)
-
apple_binary(
name = "WatchAppBinary",
configs = watch_binary_configs(),
diff --git a/Telegram-iOS/Info.plist b/Telegram-iOS/Info.plist
index 2dc4525f1d..ff93b6667c 100644
--- a/Telegram-iOS/Info.plist
+++ b/Telegram-iOS/Info.plist
@@ -202,7 +202,7 @@
CFBundleTypeRole
- Editor
+ Viewer
CFBundleURLName
$(PRODUCT_BUNDLE_IDENTIFIER).compatibility
CFBundleURLSchemes
@@ -215,10 +215,10 @@
CFBundleTypeRole
Viewer
CFBundleURLName
- $(PRODUCT_BUNDLE_IDENTIFIER).dropbox
+ $(PRODUCT_BUNDLE_IDENTIFIER).ton
CFBundleURLSchemes
- db-pa9wtoz9l514anx
+ ton
diff --git a/Telegram_Buck.xcworkspace/buck-project.meta.json b/Telegram_Buck.xcworkspace/buck-project.meta.json
index 573f189fa5..3e9789ef89 100644
--- a/Telegram_Buck.xcworkspace/buck-project.meta.json
+++ b/Telegram_Buck.xcworkspace/buck-project.meta.json
@@ -1 +1 @@
-{"required-targets":["//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_ac3_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_adts_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avcodec.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avdct.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avfft.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_d3d11va.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dirac.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dv_profile.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dxva2.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_jni.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_mediacodec.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_qsv.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vaapi.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vdpau.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_videotoolbox.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vorbis_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_xvmc.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_avformat.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_avio.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_adler32.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_aes.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_aes_ctr.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_attributes.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_audio_fifo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avassert.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avconfig.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avstring.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avutil.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_base64.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_blowfish.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_bprint.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_bswap.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_buffer.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_camellia.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_cast5.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_channel_layout.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_common.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_cpu.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_crc.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_des.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_dict.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_display.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_downmix_info.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_encryption_info.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_error.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_eval.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_ffversion.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_fifo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_file.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_frame.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hash.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hmac.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_cuda.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_d3d11va.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_drm.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_dxva2.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_mediacodec.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_qsv.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_vaapi.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_vdpau.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_videotoolbox.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_imgutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_intfloat.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_intreadwrite.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_lfg.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_log.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_lzo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_macros.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mastering_display_metadata.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mathematics.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_md5.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mem.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_motion_vector.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_murmur3.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_opt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_parseutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixdesc.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixelutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixfmt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_random_seed.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_rational.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_rc4.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_replaygain.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_ripemd.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_samplefmt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_sha.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_sha512.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_spherical.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_stereo3d.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_tea.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_threadmessage.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_time.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_timecode.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_timestamp.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_tree.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_twofish.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_xtea.h","//submodules/FFMpeg:ffmpeg_header_libswresample_sub_swresample.h","//submodules/FFMpeg:ffmpeg_header_libswresample_sub_version.h","//submodules/FFMpeg:libffmpeg_build","//submodules/MtProtoKit:openssl_libs","//submodules/MtProtoKit:ton_libs","//submodules/Opus:opus_lib_file","//submodules/WebP:WebP_lib_file"],"xcconfig-paths":["buck-out/gen/AppLibrary-Debug.xcconfig","buck-out/gen/AppLibrary-Profile.xcconfig","buck-out/gen/AppLibrary-Release.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/Telegram-Debug.xcconfig","buck-out/gen/Telegram-Profile.xcconfig","buck-out/gen/Telegram-Release.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Debug.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Profile.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Release.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Debug.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Profile.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Release.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Debug.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Profile.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Release.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Debug.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Profile.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Release.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Debug.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Profile.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Release.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Debug.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Profile.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Release.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Debug.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Profile.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Release.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Debug.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Profile.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Release.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Debug.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Profile.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Release.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Debug.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Profile.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Release.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Debug.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Profile.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Release.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Debug.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Profile.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Release.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Debug.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Profile.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Release.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Debug.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Profile.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Release.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Release.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Release.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Release.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Debug.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Profile.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Release.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Debug.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Profile.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Release.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Debug.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Profile.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Release.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Debug.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Profile.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Release.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Debug.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Profile.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Release.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Debug.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Profile.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Release.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Debug.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Profile.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Release.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Debug.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Profile.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Release.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Debug.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Profile.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Release.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Debug.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Profile.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Release.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Debug.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Profile.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Release.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Debug.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Profile.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Release.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Debug.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Profile.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Release.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Debug.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Profile.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Release.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Debug.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Profile.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Release.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Debug.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Profile.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Release.xcconfig","buck-out/gen/submodules/Display/Display#shared-Debug.xcconfig","buck-out/gen/submodules/Display/Display#shared-Profile.xcconfig","buck-out/gen/submodules/Display/Display#shared-Release.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Debug.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Profile.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Release.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Debug.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Profile.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Release.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Debug.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Profile.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Release.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Debug.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Profile.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Release.xcconfig","buck-out/gen/submodules/GZip/GZip-Debug.xcconfig","buck-out/gen/submodules/GZip/GZip-Profile.xcconfig","buck-out/gen/submodules/GZip/GZip-Release.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Debug.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Profile.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Release.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Debug.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Profile.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Release.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Debug.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Profile.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Release.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Debug.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Profile.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Release.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Debug.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Profile.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Release.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Debug.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Profile.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Release.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Debug.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Profile.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Release.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Debug.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Profile.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Release.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Debug.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Profile.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Release.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Debug.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Profile.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Release.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Debug.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Profile.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Release.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Debug.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Profile.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Release.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Debug.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Profile.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Release.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Debug.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Profile.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Release.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Debug.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Profile.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Release.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Debug.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Profile.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Release.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Debug.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Profile.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Release.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Debug.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Profile.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Release.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Debug.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Profile.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Release.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Debug.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Profile.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Release.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Debug.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Profile.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Release.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Debug.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Profile.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Release.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Debug.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Profile.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Release.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Debug.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Profile.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Release.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Debug.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Profile.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Release.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Debug.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Profile.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Release.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Debug.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Profile.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Release.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Debug.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Profile.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Release.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Debug.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Profile.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Release.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Debug.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Profile.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Release.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Debug.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Profile.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Release.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Debug.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Profile.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Release.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Debug.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Profile.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Release.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Debug.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Profile.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Release.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Debug.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Profile.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Release.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Debug.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Profile.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Release.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Debug.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Profile.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Release.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Debug.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Profile.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Release.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Debug.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Profile.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Release.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Debug.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Profile.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Release.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Debug.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Profile.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Release.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Debug.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Profile.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/ton-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/ton-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/ton-Release.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Debug.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Profile.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Release.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Debug.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Profile.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Release.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Debug.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Profile.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Release.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Debug.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Profile.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Release.xcconfig","buck-out/gen/submodules/Opus/opus-Debug.xcconfig","buck-out/gen/submodules/Opus/opus-Profile.xcconfig","buck-out/gen/submodules/Opus/opus-Release.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Debug.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Profile.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Release.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Debug.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Profile.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Release.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Debug.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Profile.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Release.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Debug.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Profile.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Release.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Debug.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Profile.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Release.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Debug.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Profile.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Release.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Debug.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Profile.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Release.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Debug.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Profile.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Release.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Debug.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Profile.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Release.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Debug.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Profile.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Release.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Debug.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Profile.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Release.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Debug.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Profile.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Release.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Debug.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Profile.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Release.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Debug.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Profile.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Release.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Debug.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Profile.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Release.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Debug.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Profile.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Release.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Debug.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Profile.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Release.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Debug.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Profile.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Release.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Debug.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Profile.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Release.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Debug.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Profile.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Release.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Debug.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Profile.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Release.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Debug.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Profile.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Release.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Debug.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Profile.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Release.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Debug.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Profile.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Release.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Debug.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Profile.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Release.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Debug.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Profile.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Release.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Debug.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Profile.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Release.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Debug.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Profile.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Release.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Debug.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Profile.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Release.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Debug.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Profile.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Release.xcconfig","buck-out/gen/submodules/SegmentedControlNode/SegmentedControlNode-Debug.xcconfig","buck-out/gen/submodules/SegmentedControlNode/SegmentedControlNode-Profile.xcconfig","buck-out/gen/submodules/SegmentedControlNode/SegmentedControlNode-Release.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Debug.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Profile.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Release.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Debug.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Profile.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Release.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Debug.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Profile.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Release.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Debug.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Profile.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Release.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Debug.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Profile.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Release.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Debug.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Profile.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Release.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Debug.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Profile.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Release.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Debug.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Profile.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Release.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Debug.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Profile.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Release.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Debug.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Profile.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Release.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Debug.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Profile.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Release.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Debug.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Profile.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Release.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Debug.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Profile.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Release.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Debug.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Profile.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Release.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Debug.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Profile.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Release.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Debug.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Profile.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Release.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Debug.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Profile.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Release.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Debug.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Profile.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Release.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Debug.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Profile.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Release.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Debug.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Profile.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Release.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Debug.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Profile.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Release.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Debug.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Profile.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Release.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Debug.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Profile.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Release.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Debug.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Profile.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Release.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Debug.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Profile.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Release.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Debug.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Profile.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Release.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Debug.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Profile.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Release.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Debug.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Profile.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Release.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Debug.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Profile.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Release.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Debug.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Profile.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Release.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Debug.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Profile.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Release.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Debug.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Profile.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Release.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Debug.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Profile.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Release.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Debug.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Profile.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Release.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Debug.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Profile.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Release.xcconfig","buck-out/gen/submodules/WalletUI/WalletUI-Debug.xcconfig","buck-out/gen/submodules/WalletUI/WalletUI-Profile.xcconfig","buck-out/gen/submodules/WalletUI/WalletUI-Release.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Debug.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Profile.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Release.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Debug.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Profile.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Release.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Debug.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Profile.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Release.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Debug.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Profile.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Release.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Debug.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Profile.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Release.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Debug.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Profile.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Release.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Debug.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Profile.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Release.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Debug.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Profile.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Release.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Debug.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Profile.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Release.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Debug.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Profile.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Release.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Debug.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Profile.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Release.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Debug.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Profile.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Release.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Debug.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Profile.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Release.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Debug.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Profile.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Release.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Debug.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Profile.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Release.xcconfig"],"copy-in-xcode":[]}
\ No newline at end of file
+{"required-targets":["//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_ac3_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_adts_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avcodec.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avdct.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_avfft.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_d3d11va.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dirac.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dv_profile.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_dxva2.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_jni.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_mediacodec.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_qsv.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vaapi.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vdpau.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_videotoolbox.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_vorbis_parser.h","//submodules/FFMpeg:ffmpeg_header_libavcodec_sub_xvmc.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_avformat.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_avio.h","//submodules/FFMpeg:ffmpeg_header_libavformat_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_adler32.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_aes.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_aes_ctr.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_attributes.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_audio_fifo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avassert.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avconfig.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avstring.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_avutil.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_base64.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_blowfish.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_bprint.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_bswap.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_buffer.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_camellia.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_cast5.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_channel_layout.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_common.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_cpu.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_crc.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_des.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_dict.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_display.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_downmix_info.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_encryption_info.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_error.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_eval.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_ffversion.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_fifo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_file.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_frame.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hash.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hmac.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_cuda.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_d3d11va.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_drm.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_dxva2.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_mediacodec.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_qsv.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_vaapi.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_vdpau.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_hwcontext_videotoolbox.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_imgutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_intfloat.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_intreadwrite.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_lfg.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_log.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_lzo.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_macros.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mastering_display_metadata.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mathematics.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_md5.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_mem.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_motion_vector.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_murmur3.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_opt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_parseutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixdesc.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixelutils.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_pixfmt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_random_seed.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_rational.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_rc4.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_replaygain.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_ripemd.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_samplefmt.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_sha.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_sha512.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_spherical.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_stereo3d.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_tea.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_threadmessage.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_time.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_timecode.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_timestamp.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_tree.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_twofish.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_version.h","//submodules/FFMpeg:ffmpeg_header_libavutil_sub_xtea.h","//submodules/FFMpeg:ffmpeg_header_libswresample_sub_swresample.h","//submodules/FFMpeg:ffmpeg_header_libswresample_sub_version.h","//submodules/FFMpeg:libffmpeg_build","//submodules/MtProtoKit:openssl_libs","//submodules/MtProtoKit:ton_libs","//submodules/Opus:opus_lib_file","//submodules/WebP:WebP_lib_file"],"xcconfig-paths":["buck-out/gen/AppLibrary-Debug.xcconfig","buck-out/gen/AppLibrary-Profile.xcconfig","buck-out/gen/AppLibrary-Release.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/IntentsExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/NotificationContentExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/NotificationServiceExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/ShareExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/Telegram-Debug.xcconfig","buck-out/gen/Telegram-Profile.xcconfig","buck-out/gen/Telegram-Release.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Debug.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Profile.xcconfig","buck-out/gen/WatchApp#watchsimulator-i386-Release.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Debug.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Profile.xcconfig","buck-out/gen/WatchAppExtension#watchsimulator-i386-Release.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Debug.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Profile.xcconfig","buck-out/gen/WidgetExtension#iphonesimulator-x86_64-Release.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Debug.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Profile.xcconfig","buck-out/gen/submodules/AccountContext/AccountContext-Release.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Debug.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Profile.xcconfig","buck-out/gen/submodules/ActionSheetPeerItem/ActionSheetPeerItem-Release.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Debug.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Profile.xcconfig","buck-out/gen/submodules/ActivityIndicator/ActivityIndicator-Release.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Debug.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Profile.xcconfig","buck-out/gen/submodules/AlertUI/AlertUI-Release.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Debug.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Profile.xcconfig","buck-out/gen/submodules/AnimationUI/AnimationUI-Release.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Debug.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Profile.xcconfig","buck-out/gen/submodules/AppBundle/AppBundle-Release.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Debug.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Profile.xcconfig","buck-out/gen/submodules/AsyncDisplayKit/AsyncDisplayKit#shared-Release.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Debug.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Profile.xcconfig","buck-out/gen/submodules/AuthorizationUI/AuthorizationUI-Release.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Debug.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Profile.xcconfig","buck-out/gen/submodules/AvatarNode/AvatarNode-Release.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Debug.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Profile.xcconfig","buck-out/gen/submodules/BotPaymentsUI/BotPaymentsUI-Release.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Debug.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Profile.xcconfig","buck-out/gen/submodules/BuildConfig/BuildConfig-Release.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Debug.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Profile.xcconfig","buck-out/gen/submodules/CallListUI/CallListUI-Release.xcconfig","buck-out/gen/submodules/Camera/Camera-Debug.xcconfig","buck-out/gen/submodules/Camera/Camera-Profile.xcconfig","buck-out/gen/submodules/Camera/Camera-Release.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchItemHeader/ChatListSearchItemHeader-Release.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchItemNode/ChatListSearchItemNode-Release.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Debug.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Profile.xcconfig","buck-out/gen/submodules/ChatListSearchRecentPeersNode/ChatListSearchRecentPeersNode-Release.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Debug.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Profile.xcconfig","buck-out/gen/submodules/ChatListUI/ChatListUI-Release.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Debug.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Profile.xcconfig","buck-out/gen/submodules/ChatTitleActivityNode/ChatTitleActivityNode-Release.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Debug.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Profile.xcconfig","buck-out/gen/submodules/CheckNode/CheckNode-Release.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Debug.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Profile.xcconfig","buck-out/gen/submodules/ComposePollUI/ComposePollUI-Release.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Debug.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Profile.xcconfig","buck-out/gen/submodules/ContactListUI/ContactListUI-Release.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Debug.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Profile.xcconfig","buck-out/gen/submodules/ContactsPeerItem/ContactsPeerItem-Release.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Debug.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Profile.xcconfig","buck-out/gen/submodules/ContextUI/ContextUI-Release.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Debug.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Profile.xcconfig","buck-out/gen/submodules/CounterContollerTitleView/CounterContollerTitleView-Release.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Debug.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Profile.xcconfig","buck-out/gen/submodules/CountrySelectionUI/CountrySelectionUI-Release.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Debug.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Profile.xcconfig","buck-out/gen/submodules/Crc32/Crc32-Release.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Debug.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Profile.xcconfig","buck-out/gen/submodules/DateSelectionUI/DateSelectionUI-Release.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Debug.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Profile.xcconfig","buck-out/gen/submodules/DeleteChatPeerActionSheetItem/DeleteChatPeerActionSheetItem-Release.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Debug.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Profile.xcconfig","buck-out/gen/submodules/DeviceAccess/DeviceAccess-Release.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Debug.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Profile.xcconfig","buck-out/gen/submodules/DeviceLocationManager/DeviceLocationManager-Release.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Debug.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Profile.xcconfig","buck-out/gen/submodules/DeviceProximity/DeviceProximity-Release.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Debug.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Profile.xcconfig","buck-out/gen/submodules/DirectionalPanGesture/DirectionalPanGesture-Release.xcconfig","buck-out/gen/submodules/Display/Display#shared-Debug.xcconfig","buck-out/gen/submodules/Display/Display#shared-Profile.xcconfig","buck-out/gen/submodules/Display/Display#shared-Release.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Debug.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Profile.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Release.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Debug.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Profile.xcconfig","buck-out/gen/submodules/EncryptionKeyVisualization/EncryptionKeyVisualization-Release.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Debug.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Profile.xcconfig","buck-out/gen/submodules/FFMpeg/FFMpeg-Release.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Debug.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Profile.xcconfig","buck-out/gen/submodules/FFMpeg/libffmpeg-Release.xcconfig","buck-out/gen/submodules/GZip/GZip-Debug.xcconfig","buck-out/gen/submodules/GZip/GZip-Profile.xcconfig","buck-out/gen/submodules/GZip/GZip-Release.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Debug.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Profile.xcconfig","buck-out/gen/submodules/GalleryUI/GalleryUI-Release.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Debug.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Profile.xcconfig","buck-out/gen/submodules/GameUI/GameUI-Release.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Debug.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Profile.xcconfig","buck-out/gen/submodules/Geocoding/Geocoding-Release.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Debug.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Profile.xcconfig","buck-out/gen/submodules/GridMessageSelectionNode/GridMessageSelectionNode-Release.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Debug.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Profile.xcconfig","buck-out/gen/submodules/HashtagSearchUI/HashtagSearchUI-Release.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Debug.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Profile.xcconfig","buck-out/gen/submodules/HexColor/HexColor-Release.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Debug.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Profile.xcconfig","buck-out/gen/submodules/HockeySDK-iOS/HockeySDK-Release.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Debug.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Profile.xcconfig","buck-out/gen/submodules/HorizontalPeerItem/HorizontalPeerItem-Release.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Debug.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Profile.xcconfig","buck-out/gen/submodules/ImageBlur/ImageBlur-Release.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Debug.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Profile.xcconfig","buck-out/gen/submodules/ImageCompression/ImageCompression-Release.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Debug.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Profile.xcconfig","buck-out/gen/submodules/ImageTransparency/ImageTransparency-Release.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Debug.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Profile.xcconfig","buck-out/gen/submodules/InstantPageCache/InstantPageCache-Release.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Debug.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Profile.xcconfig","buck-out/gen/submodules/InstantPageUI/InstantPageUI-Release.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Debug.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Profile.xcconfig","buck-out/gen/submodules/ItemListAddressItem/ItemListAddressItem-Release.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Debug.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Profile.xcconfig","buck-out/gen/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem-Release.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Debug.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Profile.xcconfig","buck-out/gen/submodules/ItemListPeerActionItem/ItemListPeerActionItem-Release.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Debug.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Profile.xcconfig","buck-out/gen/submodules/ItemListPeerItem/ItemListPeerItem-Release.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Debug.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Profile.xcconfig","buck-out/gen/submodules/ItemListStickerPackItem/ItemListStickerPackItem-Release.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Debug.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Profile.xcconfig","buck-out/gen/submodules/ItemListUI/ItemListUI-Release.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Debug.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Profile.xcconfig","buck-out/gen/submodules/JoinLinkPreviewUI/JoinLinkPreviewUI-Release.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Debug.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Profile.xcconfig","buck-out/gen/submodules/LanguageLinkPreviewUI/LanguageLinkPreviewUI-Release.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Debug.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Profile.xcconfig","buck-out/gen/submodules/LanguageSuggestionUI/LanguageSuggestionUI-Release.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Debug.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Profile.xcconfig","buck-out/gen/submodules/LegacyComponents/LegacyComponents-Release.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Debug.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Profile.xcconfig","buck-out/gen/submodules/LegacyDataImport/LegacyDataImport-Release.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Debug.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Profile.xcconfig","buck-out/gen/submodules/LegacyMediaPickerUI/LegacyMediaPickerUI-Release.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Debug.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Profile.xcconfig","buck-out/gen/submodules/LegacyUI/LegacyUI-Release.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Debug.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Profile.xcconfig","buck-out/gen/submodules/LightweightAccountData/LightweightAccountData-Release.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Debug.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Profile.xcconfig","buck-out/gen/submodules/ListSectionHeaderNode/ListSectionHeaderNode-Release.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Debug.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Profile.xcconfig","buck-out/gen/submodules/LiveLocationManager/LiveLocationManager-Release.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Debug.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Profile.xcconfig","buck-out/gen/submodules/LiveLocationPositionNode/LiveLocationPositionNode-Release.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Debug.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Profile.xcconfig","buck-out/gen/submodules/LiveLocationTimerNode/LiveLocationTimerNode-Release.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Debug.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Profile.xcconfig","buck-out/gen/submodules/LocalAuth/LocalAuth-Release.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Debug.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Profile.xcconfig","buck-out/gen/submodules/LocalMediaResources/LocalMediaResources-Release.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Debug.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Profile.xcconfig","buck-out/gen/submodules/LocalizedPeerData/LocalizedPeerData-Release.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Debug.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Profile.xcconfig","buck-out/gen/submodules/LocationUI/LocationUI-Release.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Debug.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Profile.xcconfig","buck-out/gen/submodules/MapResourceToAvatarSizes/MapResourceToAvatarSizes-Release.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Debug.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Profile.xcconfig","buck-out/gen/submodules/MediaPlayer/UniversalMediaPlayer-Release.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Debug.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Profile.xcconfig","buck-out/gen/submodules/MediaResources/MediaResources-Release.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Debug.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Profile.xcconfig","buck-out/gen/submodules/MergeLists/MergeLists-Release.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Debug.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Profile.xcconfig","buck-out/gen/submodules/MessageReactionListUI/MessageReactionListUI-Release.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Debug.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Profile.xcconfig","buck-out/gen/submodules/MimeTypes/MimeTypes-Release.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Debug.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Profile.xcconfig","buck-out/gen/submodules/MosaicLayout/MosaicLayout-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit#shared-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/ton-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/ton-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/ton-Release.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Debug.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Profile.xcconfig","buck-out/gen/submodules/MusicAlbumArtResources/MusicAlbumArtResources-Release.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Debug.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Profile.xcconfig","buck-out/gen/submodules/NotificationMuteSettingsUI/NotificationMuteSettingsUI-Release.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Debug.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Profile.xcconfig","buck-out/gen/submodules/NotificationSoundSelectionUI/NotificationSoundSelectionUI-Release.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Debug.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Profile.xcconfig","buck-out/gen/submodules/OpenInExternalAppUI/OpenInExternalAppUI-Release.xcconfig","buck-out/gen/submodules/Opus/opus-Debug.xcconfig","buck-out/gen/submodules/Opus/opus-Profile.xcconfig","buck-out/gen/submodules/Opus/opus-Release.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Debug.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Profile.xcconfig","buck-out/gen/submodules/Opus/opus_lib-Release.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Debug.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Profile.xcconfig","buck-out/gen/submodules/OpusBinding/OpusBinding-Release.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Debug.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Profile.xcconfig","buck-out/gen/submodules/OverlayStatusController/OverlayStatusController-Release.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Debug.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Profile.xcconfig","buck-out/gen/submodules/PasscodeUI/PasscodeUI-Release.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Debug.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Profile.xcconfig","buck-out/gen/submodules/PassportUI/PassportUI-Release.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Debug.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Profile.xcconfig","buck-out/gen/submodules/PasswordSetupUI/PasswordSetupUI-Release.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Debug.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Profile.xcconfig","buck-out/gen/submodules/Pdf/Pdf-Release.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Debug.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Profile.xcconfig","buck-out/gen/submodules/PeerAvatarGalleryUI/PeerAvatarGalleryUI-Release.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Debug.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Profile.xcconfig","buck-out/gen/submodules/PeerInfoUI/PeerInfoUI-Release.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Debug.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Profile.xcconfig","buck-out/gen/submodules/PeerOnlineMarkerNode/PeerOnlineMarkerNode-Release.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Debug.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Profile.xcconfig","buck-out/gen/submodules/PeerPresenceStatusManager/PeerPresenceStatusManager-Release.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Debug.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Profile.xcconfig","buck-out/gen/submodules/PeersNearbyIconNode/PeersNearbyIconNode-Release.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Debug.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Profile.xcconfig","buck-out/gen/submodules/PeersNearbyUI/PeersNearbyUI-Release.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Debug.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Profile.xcconfig","buck-out/gen/submodules/PersistentStringHash/PersistentStringHash-Release.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Debug.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Profile.xcconfig","buck-out/gen/submodules/PhoneInputNode/PhoneInputNode-Release.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Debug.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Profile.xcconfig","buck-out/gen/submodules/PhotoResources/PhotoResources-Release.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Debug.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Profile.xcconfig","buck-out/gen/submodules/PlatformRestrictionMatching/PlatformRestrictionMatching-Release.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Debug.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Profile.xcconfig","buck-out/gen/submodules/Postbox/Postbox#shared-Release.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Debug.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Profile.xcconfig","buck-out/gen/submodules/ProgressNavigationButtonNode/ProgressNavigationButtonNode-Release.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Debug.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Profile.xcconfig","buck-out/gen/submodules/QrCode/QrCode-Release.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Debug.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Profile.xcconfig","buck-out/gen/submodules/RMIntro/RMIntro-Release.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Debug.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Profile.xcconfig","buck-out/gen/submodules/RadialStatusNode/RadialStatusNode-Release.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Debug.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Profile.xcconfig","buck-out/gen/submodules/RaiseToListen/RaiseToListen-Release.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Debug.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Profile.xcconfig","buck-out/gen/submodules/ReactionSelectionNode/ReactionSelectionNode-Release.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Debug.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Profile.xcconfig","buck-out/gen/submodules/SSignalKit/SSignalKit/SSignalKit-Release.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Debug.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Profile.xcconfig","buck-out/gen/submodules/SSignalKit/SwiftSignalKit/SwiftSignalKit#shared-Release.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Debug.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Profile.xcconfig","buck-out/gen/submodules/SaveToCameraRoll/SaveToCameraRoll-Release.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Debug.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Profile.xcconfig","buck-out/gen/submodules/ScreenCaptureDetection/ScreenCaptureDetection-Release.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Debug.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Profile.xcconfig","buck-out/gen/submodules/SearchBarNode/SearchBarNode-Release.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Debug.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Profile.xcconfig","buck-out/gen/submodules/SearchUI/SearchUI-Release.xcconfig","buck-out/gen/submodules/SegmentedControlNode/SegmentedControlNode-Debug.xcconfig","buck-out/gen/submodules/SegmentedControlNode/SegmentedControlNode-Profile.xcconfig","buck-out/gen/submodules/SegmentedControlNode/SegmentedControlNode-Release.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Debug.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Profile.xcconfig","buck-out/gen/submodules/SelectablePeerNode/SelectablePeerNode-Release.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Debug.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Profile.xcconfig","buck-out/gen/submodules/SettingsUI/SettingsUI-Release.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Debug.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Profile.xcconfig","buck-out/gen/submodules/ShareController/ShareController-Release.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Debug.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Profile.xcconfig","buck-out/gen/submodules/ShareItems/ShareItems-Release.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Debug.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Profile.xcconfig","buck-out/gen/submodules/SinglePhoneInputNode/SinglePhoneInputNode-Release.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Debug.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Profile.xcconfig","buck-out/gen/submodules/SolidRoundedButtonNode/SolidRoundedButtonNode-Release.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Debug.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Profile.xcconfig","buck-out/gen/submodules/StickerPackPreviewUI/StickerPackPreviewUI-Release.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Debug.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Profile.xcconfig","buck-out/gen/submodules/StickerResources/StickerResources-Release.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Debug.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Profile.xcconfig","buck-out/gen/submodules/Stripe/Stripe-Release.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Debug.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Profile.xcconfig","buck-out/gen/submodules/SwipeToDismissGesture/SwipeToDismissGesture-Release.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Debug.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Profile.xcconfig","buck-out/gen/submodules/SwitchNode/SwitchNode-Release.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Debug.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Profile.xcconfig","buck-out/gen/submodules/TelegramApi/TelegramApi-Release.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Debug.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Profile.xcconfig","buck-out/gen/submodules/TelegramAudio/TelegramAudio-Release.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Debug.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Profile.xcconfig","buck-out/gen/submodules/TelegramBaseController/TelegramBaseController-Release.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Debug.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Profile.xcconfig","buck-out/gen/submodules/TelegramCallsUI/TelegramCallsUI-Release.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Debug.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Profile.xcconfig","buck-out/gen/submodules/TelegramCore/TelegramCore#shared-Release.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Debug.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Profile.xcconfig","buck-out/gen/submodules/TelegramNotices/TelegramNotices-Release.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Debug.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Profile.xcconfig","buck-out/gen/submodules/TelegramPermissions/TelegramPermissions-Release.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Debug.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Profile.xcconfig","buck-out/gen/submodules/TelegramPermissionsUI/TelegramPermissionsUI-Release.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Debug.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Profile.xcconfig","buck-out/gen/submodules/TelegramPresentationData/TelegramPresentationData-Release.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Debug.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Profile.xcconfig","buck-out/gen/submodules/TelegramStringFormatting/TelegramStringFormatting-Release.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Debug.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Profile.xcconfig","buck-out/gen/submodules/TelegramUI/TelegramUI#shared-Release.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Debug.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Profile.xcconfig","buck-out/gen/submodules/TelegramUIPreferences/TelegramUIPreferences-Release.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Debug.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Profile.xcconfig","buck-out/gen/submodules/TelegramUniversalVideoContent/TelegramUniversalVideoContent-Release.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Debug.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Profile.xcconfig","buck-out/gen/submodules/TelegramUpdateUI/TelegramUpdateUI-Release.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Debug.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Profile.xcconfig","buck-out/gen/submodules/TelegramVoip/TelegramVoip-Release.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Debug.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Profile.xcconfig","buck-out/gen/submodules/TemporaryCachedPeerDataManager/TemporaryCachedPeerDataManager-Release.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Debug.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Profile.xcconfig","buck-out/gen/submodules/TextFormat/TextFormat-Release.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Debug.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Profile.xcconfig","buck-out/gen/submodules/TextSelectionNode/TextSelectionNode-Release.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Debug.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Profile.xcconfig","buck-out/gen/submodules/TinyThumbnail/TinyThumbnail-Release.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Debug.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Profile.xcconfig","buck-out/gen/submodules/TouchDownGesture/TouchDownGesture-Release.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Debug.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Profile.xcconfig","buck-out/gen/submodules/Tuples/Tuples-Release.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Debug.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Profile.xcconfig","buck-out/gen/submodules/UndoUI/UndoUI-Release.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Debug.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Profile.xcconfig","buck-out/gen/submodules/UrlEscaping/UrlEscaping-Release.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Debug.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Profile.xcconfig","buck-out/gen/submodules/UrlHandling/UrlHandling-Release.xcconfig","buck-out/gen/submodules/WalletUI/WalletUI-Debug.xcconfig","buck-out/gen/submodules/WalletUI/WalletUI-Profile.xcconfig","buck-out/gen/submodules/WalletUI/WalletUI-Release.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Debug.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Profile.xcconfig","buck-out/gen/submodules/WallpaperResources/WallpaperResources-Release.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Debug.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Profile.xcconfig","buck-out/gen/submodules/WatchBridge/WatchBridge-Release.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Debug.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Profile.xcconfig","buck-out/gen/submodules/WatchBridgeAudio/WatchBridgeAudio-Release.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Debug.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Profile.xcconfig","buck-out/gen/submodules/WatchCommon/Host/WatchCommon-Release.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Debug.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Profile.xcconfig","buck-out/gen/submodules/WebP/WebPImage-Release.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Debug.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Profile.xcconfig","buck-out/gen/submodules/WebP/WebP_lib-Release.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Debug.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Profile.xcconfig","buck-out/gen/submodules/WebSearchUI/WebSearchUI-Release.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Debug.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Profile.xcconfig","buck-out/gen/submodules/WebUI/WebUI-Release.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Debug.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Profile.xcconfig","buck-out/gen/submodules/WebsiteType/WebsiteType-Release.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Debug.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Profile.xcconfig","buck-out/gen/submodules/YuvConversion/YuvConversion-Release.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Debug.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Profile.xcconfig","buck-out/gen/submodules/libphonenumber/libphonenumber-Release.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Debug.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Profile.xcconfig","buck-out/gen/submodules/libtgvoip/libtgvoip-Release.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Debug.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Profile.xcconfig","buck-out/gen/submodules/lottie-ios/Lottie-Release.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Debug.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Profile.xcconfig","buck-out/gen/submodules/rlottie/RLottieBinding-Release.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Debug.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Profile.xcconfig","buck-out/gen/submodules/sqlcipher/sqlcipher-Release.xcconfig"],"copy-in-xcode":[]}
\ No newline at end of file
diff --git a/Telegram_Buck.xcworkspace/contents.xcworkspacedata b/Telegram_Buck.xcworkspace/contents.xcworkspacedata
index 3e61562224..f8d39baefe 100644
--- a/Telegram_Buck.xcworkspace/contents.xcworkspacedata
+++ b/Telegram_Buck.xcworkspace/contents.xcworkspacedata
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme
index 3a3c953561..4598c4b8b6 100644
--- a/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme
+++ b/Telegram_Buck.xcworkspace/xcshareddata/xcschemes/Telegram_Buck.xcscheme
@@ -2218,6 +2218,20 @@
ReferencedContainer = "container:submodules/UrlHandling/UrlHandling.xcodeproj">
+
+
+
+
+
+
+
+ archiveVersion
+ 1
+ classes
+
+
+ objectVersion
+ 46
+ objects
+
+ 1DD70E29001F47FB00000000
+
+ isa
+ PBXFileReference
+ name
+ BUCK
+ path
+ BUCK
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.script.python
+
+ 1DD70E2992F8922A00000000
+
+ isa
+ PBXFileReference
+ name
+ Camera.swift
+ path
+ Sources/Camera.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E2908EBF46000000000
+
+ isa
+ PBXFileReference
+ name
+ CameraDevice.swift
+ path
+ Sources/CameraDevice.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E29264D2E6A00000000
+
+ isa
+ PBXFileReference
+ name
+ CameraInput.swift
+ path
+ Sources/CameraInput.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E29387802CB00000000
+
+ isa
+ PBXFileReference
+ name
+ CameraOutput.swift
+ path
+ Sources/CameraOutput.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E29FFA2D84A00000000
+
+ isa
+ PBXFileReference
+ name
+ CameraPreviewNode.swift
+ path
+ Sources/CameraPreviewNode.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E29F10E5E1100000000
+
+ isa
+ PBXFileReference
+ name
+ CameraUtils.swift
+ path
+ Sources/CameraUtils.swift
+ sourceTree
+ SOURCE_ROOT
+
+ B401C979EAB5339800000000
+
+ isa
+ PBXGroup
+ name
+ Sources
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E2992F8922A00000000
+ 1DD70E2908EBF46000000000
+ 1DD70E29264D2E6A00000000
+ 1DD70E29387802CB00000000
+ 1DD70E29FFA2D84A00000000
+ 1DD70E29F10E5E1100000000
+
+
+ B401C97977DEAF4500000000
+
+ isa
+ PBXGroup
+ name
+ Camera
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E29001F47FB00000000
+ B401C979EAB5339800000000
+
+
+ 1DD70E2939BFF6D000000000
+
+ isa
+ PBXFileReference
+ name
+ Camera-Debug.xcconfig
+ path
+ ../../buck-out/gen/submodules/Camera/Camera-Debug.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ 1DD70E29AEC01A3A00000000
+
+ isa
+ PBXFileReference
+ name
+ Camera-Profile.xcconfig
+ path
+ ../../buck-out/gen/submodules/Camera/Camera-Profile.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ 1DD70E292256C59C00000000
+
+ isa
+ PBXFileReference
+ name
+ Camera-Release.xcconfig
+ path
+ ../../buck-out/gen/submodules/Camera/Camera-Release.xcconfig
+ sourceTree
+ SOURCE_ROOT
+ explicitFileType
+ text.xcconfig
+
+ B401C9792F7F325000000000
+
+ isa
+ PBXGroup
+ name
+ Buck (Do Not Modify)
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E2939BFF6D000000000
+ 1DD70E29AEC01A3A00000000
+ 1DD70E292256C59C00000000
+
+
+ B401C979B781F65D00000000
+
+ isa
+ PBXGroup
+ name
+ Configurations
+ sourceTree
+ ]]>
+ children
+
+ B401C9792F7F325000000000
+
+
+ 1DD70E29FF334B1F00000000
+
+ isa
+ PBXFileReference
+ name
+ libDisplay.dylib
+ path
+ libDisplay.dylib
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ compiled.mach-o.dylib
+
+ 1DD70E29D65BA68200000000
+
+ isa
+ PBXFileReference
+ name
+ libSwiftSignalKit.dylib
+ path
+ libSwiftSignalKit.dylib
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ compiled.mach-o.dylib
+
+ B401C97968022A5500000000
+
+ isa
+ PBXGroup
+ name
+ Frameworks
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E29FF334B1F00000000
+ 1DD70E29D65BA68200000000
+
+
+ 1DD70E29BFBD457D00000000
+
+ isa
+ PBXFileReference
+ name
+ libCamera.a
+ path
+ libCamera.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ B401C979C806358400000000
+
+ isa
+ PBXGroup
+ name
+ Products
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E29BFBD457D00000000
+
+
+ B401C979EFB6AC4600000000
+
+ isa
+ PBXGroup
+ name
+ mainGroup
+ sourceTree
+ ]]>
+ children
+
+ B401C97977DEAF4500000000
+ B401C979B781F65D00000000
+ B401C97968022A5500000000
+ B401C979C806358400000000
+
+
+ E7A30F0492F8922A00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2992F8922A00000000
+
+ E7A30F0408EBF46000000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2908EBF46000000000
+
+ E7A30F04264D2E6A00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29264D2E6A00000000
+
+ E7A30F04387802CB00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29387802CB00000000
+
+ E7A30F04FFA2D84A00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29FFA2D84A00000000
+
+ E7A30F04F10E5E1100000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29F10E5E1100000000
+
+ 1870857F0000000000000000
+
+ isa
+ PBXSourcesBuildPhase
+ files
+
+ E7A30F0492F8922A00000000
+ E7A30F0408EBF46000000000
+ E7A30F04264D2E6A00000000
+ E7A30F04387802CB00000000
+ E7A30F04FFA2D84A00000000
+ E7A30F04F10E5E1100000000
+
+
+ E7A30F04FF334B1F00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29FF334B1F00000000
+
+ E7A30F04D65BA68200000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29D65BA68200000000
+
+ FAF5FAC90000000000000000
+
+ isa
+ PBXCopyFilesBuildPhase
+ files
+
+ E7A30F04FF334B1F00000000
+ E7A30F04D65BA68200000000
+
+ name
+ Fake Swift Dependencies (Copy Files Phase)
+ runOnlyForDeploymentPostprocessing
+ 1
+ dstSubfolderSpec
+ 16
+ dstPath
+
+
+ 4952437303EDA63300000000
+
+ isa
+ XCBuildConfiguration
+ name
+ Debug
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E2939BFF6D000000000
+
+ 4952437350C7218900000000
+
+ isa
+ XCBuildConfiguration
+ name
+ Profile
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E29AEC01A3A00000000
+
+ 49524373A439BFE700000000
+
+ isa
+ XCBuildConfiguration
+ name
+ Release
+ buildSettings
+
+
+ baseConfigurationReference
+ 1DD70E292256C59C00000000
+
+ 218C37090000000000000000
+
+ isa
+ XCConfigurationList
+ buildConfigurations
+
+ 4952437303EDA63300000000
+ 4952437350C7218900000000
+ 49524373A439BFE700000000
+
+ defaultConfigurationIsVisible
+
+
+ E66DC04E77DEAF4500000000
+
+ isa
+ PBXNativeTarget
+ name
+ Camera
+ productName
+ Camera
+ productReference
+ 1DD70E29BFBD457D00000000
+ productType
+ com.apple.product-type.library.static
+ dependencies
+
+
+ buildPhases
+
+ 1870857F0000000000000000
+ FAF5FAC90000000000000000
+
+ buildConfigurationList
+ 218C37090000000000000000
+
+ 4952437303EDA63300000001
+
+ isa
+ XCBuildConfiguration
+ name
+ Debug
+ buildSettings
+
+
+
+ 4952437350C7218900000001
+
+ isa
+ XCBuildConfiguration
+ name
+ Profile
+ buildSettings
+
+
+
+ 49524373A439BFE700000001
+
+ isa
+ XCBuildConfiguration
+ name
+ Release
+ buildSettings
+
+
+
+ 218C37090000000000000001
+
+ isa
+ XCConfigurationList
+ buildConfigurations
+
+ 4952437303EDA63300000001
+ 4952437350C7218900000001
+ 49524373A439BFE700000001
+
+ defaultConfigurationIsVisible
+
+
+ 96C8479377DEAF4500000000
+
+ isa
+ PBXProject
+ mainGroup
+ B401C979EFB6AC4600000000
+ targets
+
+ E66DC04E77DEAF4500000000
+
+ buildConfigurationList
+ 218C37090000000000000001
+ compatibilityVersion
+ Xcode 3.2
+ attributes
+
+ LastUpgradeCheck
+ 9999
+
+
+
+ rootObject
+ 96C8479377DEAF4500000000
+
+
\ No newline at end of file
diff --git a/submodules/Camera/Camera.xcodeproj/xcshareddata/xcschemes/Camera.xcscheme b/submodules/Camera/Camera.xcodeproj/xcshareddata/xcschemes/Camera.xcscheme
new file mode 100644
index 0000000000..209bf1cfc3
--- /dev/null
+++ b/submodules/Camera/Camera.xcodeproj/xcshareddata/xcschemes/Camera.xcscheme
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/submodules/Camera/Info.plist b/submodules/Camera/Info.plist
new file mode 100644
index 0000000000..e1fe4cfb7b
--- /dev/null
+++ b/submodules/Camera/Info.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ $(CURRENT_PROJECT_VERSION)
+
+
diff --git a/submodules/Camera/Sources/Camera.h b/submodules/Camera/Sources/Camera.h
new file mode 100644
index 0000000000..f8d2a3b3ed
--- /dev/null
+++ b/submodules/Camera/Sources/Camera.h
@@ -0,0 +1,11 @@
+#import
+
+//! Project version number for Camera.
+FOUNDATION_EXPORT double CameraVersionNumber;
+
+//! Project version string for Camera.
+FOUNDATION_EXPORT const unsigned char CameraVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import
+
+
diff --git a/submodules/Camera/Sources/Camera.swift b/submodules/Camera/Sources/Camera.swift
new file mode 100644
index 0000000000..0af6423ea2
--- /dev/null
+++ b/submodules/Camera/Sources/Camera.swift
@@ -0,0 +1,183 @@
+import Foundation
+import SwiftSignalKit
+import AVFoundation
+
+private final class CameraContext {
+ private let queue: Queue
+ private let session = AVCaptureSession()
+ private let device: CameraDevice
+ private let input = CameraInput()
+ private let output = CameraOutput()
+
+ private let initialConfiguration: Camera.Configuration
+
+ var previewNode: CameraPreviewNode? {
+ didSet {
+ self.previewNode?.prepare()
+ }
+ }
+
+ var previousSampleBuffer: CMSampleBuffer?
+ var processSampleBuffer: ((CMSampleBuffer) -> Void)?
+
+ private var invalidated = false
+
+ init(queue: Queue, configuration: Camera.Configuration) {
+ self.queue = queue
+ self.initialConfiguration = configuration
+
+ self.device = CameraDevice()
+ self.device.configure(for: self.session, position: configuration.position)
+
+ self.session.beginConfiguration()
+ self.session.sessionPreset = configuration.preset
+ self.input.configure(for: self.session, device: self.device, audio: configuration.audio)
+ self.output.configure(for: self.session)
+ self.session.commitConfiguration()
+
+ self.output.processSampleBuffer = { [weak self] sampleBuffer, connection in
+ if let formatDescription = CMSampleBufferGetFormatDescription(sampleBuffer), CMFormatDescriptionGetMediaType(formatDescription) == kCMMediaType_Video {
+ self?.previousSampleBuffer = sampleBuffer
+ self?.previewNode?.enqueue(sampleBuffer)
+ }
+
+ self?.queue.async {
+ self?.processSampleBuffer?(sampleBuffer)
+ }
+ }
+ }
+
+ func startCapture() {
+ guard !self.session.isRunning else {
+ return
+ }
+
+ self.session.startRunning()
+ }
+
+ func stopCapture() {
+ self.session.beginConfiguration()
+ self.input.invalidate(for: self.session)
+ self.output.invalidate(for: self.session)
+ self.session.commitConfiguration()
+
+ self.session.stopRunning()
+ }
+
+ func focus(at point: CGPoint) {
+ self.device.setFocusPoint(point, focusMode: .continuousAutoFocus, exposureMode: .continuousAutoExposure, monitorSubjectAreaChange: true)
+ }
+
+ func setFPS(_ fps: Float64) {
+ self.device.fps = fps
+ }
+
+ func togglePosition() {
+ self.session.beginConfiguration()
+ self.input.invalidate(for: self.session)
+ let targetPosition: Camera.Position
+ if case .back = self.device.position {
+ targetPosition = .front
+ } else {
+ targetPosition = .back
+ }
+ self.device.configure(for: self.session, position: targetPosition)
+ self.input.configure(for: self.session, device: self.device, audio: self.initialConfiguration.audio)
+ self.session.commitConfiguration()
+ }
+}
+
+final class Camera {
+ typealias Preset = AVCaptureSession.Preset
+ typealias Position = AVCaptureDevice.Position
+ typealias FocusMode = AVCaptureDevice.FocusMode
+ typealias ExposureMode = AVCaptureDevice.ExposureMode
+
+ struct Configuration {
+ let preset: Preset
+ let position: Position
+ let audio: Bool
+ }
+
+ private let queue = Queue()
+ private var contextRef: Unmanaged?
+
+ init(configuration: Camera.Configuration = Configuration(preset: .hd1920x1080, position: .back, audio: true)) {
+ self.queue.async {
+ let context = CameraContext(queue: self.queue, configuration: configuration)
+ self.contextRef = Unmanaged.passRetained(context)
+ }
+ }
+
+ deinit {
+ let contextRef = self.contextRef
+ self.queue.async {
+ contextRef?.release()
+ }
+ }
+
+ func startCapture() {
+ self.queue.async {
+ if let context = self.contextRef?.takeUnretainedValue() {
+ context.startCapture()
+ }
+ }
+ }
+
+ func stopCapture() {
+ self.queue.async {
+ if let context = self.contextRef?.takeUnretainedValue() {
+ context.stopCapture()
+ }
+ }
+ }
+ func togglePosition() {
+ self.queue.async {
+ if let context = self.contextRef?.takeUnretainedValue() {
+ context.togglePosition()
+ }
+ }
+ }
+
+ func takePhoto() -> Signal {
+ return .never()
+ }
+
+ func focus(at point: CGPoint) {
+ self.queue.async {
+ if let context = self.contextRef?.takeUnretainedValue() {
+ context.focus(at: point)
+ }
+ }
+ }
+
+ func setFPS(_ fps: Double) {
+ self.queue.async {
+ if let context = self.contextRef?.takeUnretainedValue() {
+ context.setFPS(fps)
+ }
+ }
+ }
+
+ func attachPreviewNode(_ node: CameraPreviewNode) {
+ let nodeRef: Unmanaged = Unmanaged.passRetained(node)
+ self.queue.async {
+ if let context = self.contextRef?.takeUnretainedValue() {
+ context.previewNode = nodeRef.takeUnretainedValue()
+ nodeRef.release()
+ } else {
+ Queue.mainQueue().async {
+ nodeRef.release()
+ }
+ }
+ }
+ }
+
+ func setProcessSampleBuffer(_ block: ((CMSampleBuffer) -> Void)?) {
+ self.queue.async {
+ if let context = self.contextRef?.takeUnretainedValue() {
+ context.processSampleBuffer = block
+ }
+ }
+ }
+}
diff --git a/submodules/Camera/Sources/CameraDevice.swift b/submodules/Camera/Sources/CameraDevice.swift
new file mode 100644
index 0000000000..90d110db6f
--- /dev/null
+++ b/submodules/Camera/Sources/CameraDevice.swift
@@ -0,0 +1,138 @@
+import Foundation
+import AVFoundation
+import SwiftSignalKit
+
+private let defaultFPS: Double = 30.0
+
+final class CameraDevice {
+ public private(set) var videoDevice: AVCaptureDevice? = nil
+ public private(set) var audioDevice: AVCaptureDevice? = nil
+ private var videoDevicePromise = Promise()
+
+ init() {
+ }
+
+ var position: Camera.Position = .back
+
+ func configure(for session: AVCaptureSession, position: Camera.Position) {
+ self.position = position
+ if #available(iOSApplicationExtension 10.0, iOS 10.0, *) {
+ self.videoDevice = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInDuoCamera, .builtInWideAngleCamera, .builtInTelephotoCamera], mediaType: .video, position: position).devices.first
+ } else {
+ self.videoDevice = AVCaptureDevice.devices(for: .video).filter { $0.position == position }.first
+ }
+ if let videoDevice = self.videoDevice {
+ self.videoDevicePromise.set(.single(videoDevice))
+ }
+ self.audioDevice = AVCaptureDevice.default(for: .audio)
+ }
+
+ func transaction(_ device: AVCaptureDevice, update: (AVCaptureDevice) -> Void) {
+ if let _ = try? device.lockForConfiguration() {
+ update(device)
+ device.unlockForConfiguration()
+ }
+ }
+
+ private func subscribeForChanges() {
+ NotificationCenter.default.addObserver(self, selector: #selector(self.subjectAreaChanged), name: Notification.Name.AVCaptureDeviceSubjectAreaDidChange, object: self.videoDevice)
+ }
+
+ private func unsubscribeFromChanges() {
+ NotificationCenter.default.removeObserver(self, name: Notification.Name.AVCaptureDeviceSubjectAreaDidChange, object: self.videoDevice)
+ }
+
+ @objc private func subjectAreaChanged() {
+
+ }
+
+ var fps: Double = defaultFPS {
+ didSet {
+ guard let device = self.videoDevice, let targetFPS = device.actualFPS(Double(self.fps)) else {
+ return
+ }
+
+ self.fps = targetFPS.fps
+
+ self.transaction(device) { device in
+ device.activeVideoMinFrameDuration = targetFPS.duration
+ device.activeVideoMaxFrameDuration = targetFPS.duration
+ }
+ }
+ }
+
+ var isFlashActive: Signal {
+ return self.videoDevicePromise.get()
+ |> mapToSignal { device -> Signal in
+ return Signal { subscriber in
+ subscriber.putNext(device.isFlashActive)
+ let observer = device.observe(\.isFlashActive, options: [.new], changeHandler: { device, _ in
+ subscriber.putNext(device.isFlashActive)
+ })
+ return ActionDisposable {
+ observer.invalidate()
+ }
+ }
+ |> distinctUntilChanged
+ }
+ }
+
+ var isFlashAvailable: Signal {
+ return self.videoDevicePromise.get()
+ |> mapToSignal { device -> Signal in
+ return Signal { subscriber in
+ subscriber.putNext(device.isFlashAvailable)
+ let observer = device.observe(\.isFlashAvailable, options: [.new], changeHandler: { device, _ in
+ subscriber.putNext(device.isFlashAvailable)
+ })
+ return ActionDisposable {
+ observer.invalidate()
+ }
+ }
+ |> distinctUntilChanged
+ }
+ }
+
+ var isAdjustingFocus: Signal {
+ return self.videoDevicePromise.get()
+ |> mapToSignal { device -> Signal in
+ return Signal { subscriber in
+ subscriber.putNext(device.isAdjustingFocus)
+ let observer = device.observe(\.isAdjustingFocus, options: [.new], changeHandler: { device, _ in
+ subscriber.putNext(device.isAdjustingFocus)
+ })
+ return ActionDisposable {
+ observer.invalidate()
+ }
+ }
+ |> distinctUntilChanged
+ }
+ }
+
+ func setFocusPoint(_ point: CGPoint, focusMode: Camera.FocusMode, exposureMode: Camera.ExposureMode, monitorSubjectAreaChange: Bool) {
+ guard let device = self.videoDevice else {
+ return
+ }
+ self.transaction(device) { device in
+ if device.isExposurePointOfInterestSupported && device.isExposureModeSupported(exposureMode) {
+ device.exposurePointOfInterest = point
+ device.exposureMode = exposureMode
+ }
+ if device.isFocusPointOfInterestSupported && device.isFocusModeSupported(focusMode) {
+ device.focusPointOfInterest = point
+ device.focusMode = focusMode
+ }
+ }
+ }
+
+ func setExposureTargetBias(_ bias: Float) {
+ guard let device = self.videoDevice else {
+ return
+ }
+ self.transaction(device) { device in
+ let extremum = (bias >= 0) ? device.maxExposureTargetBias : device.minExposureTargetBias;
+ let value = abs(bias) * extremum * 0.85
+ device.setExposureTargetBias(value, completionHandler: nil)
+ }
+ }
+}
diff --git a/submodules/Camera/Sources/CameraInput.swift b/submodules/Camera/Sources/CameraInput.swift
new file mode 100644
index 0000000000..690e019ed6
--- /dev/null
+++ b/submodules/Camera/Sources/CameraInput.swift
@@ -0,0 +1,45 @@
+import AVFoundation
+
+class CameraInput {
+ private var videoInput: AVCaptureDeviceInput?
+ private var audioInput: AVCaptureDeviceInput?
+
+ func configure(for session: AVCaptureSession, device: CameraDevice, audio: Bool) {
+ if let videoDevice = device.videoDevice {
+ self.configureVideoInput(for: session, device: videoDevice)
+ }
+ if audio, let audioDevice = device.audioDevice {
+ self.configureAudioInput(for: session, device: audioDevice)
+ }
+ }
+
+ func invalidate(for session: AVCaptureSession) {
+ for input in session.inputs {
+ session.removeInput(input)
+ }
+ }
+
+ private func configureVideoInput(for session: AVCaptureSession, device: AVCaptureDevice) {
+ if let videoInput = try? AVCaptureDeviceInput(device: device) {
+ if let currentVideoInput = self.videoInput {
+ session.removeInput(currentVideoInput)
+ }
+ self.videoInput = videoInput
+ if session.canAddInput(videoInput) {
+ session.addInput(videoInput)
+ }
+ }
+ }
+
+ private func configureAudioInput(for session: AVCaptureSession, device: AVCaptureDevice) {
+ guard self.audioInput == nil else {
+ return
+ }
+ if let audioInput = try? AVCaptureDeviceInput(device: device) {
+ self.audioInput = audioInput
+ if session.canAddInput(audioInput) {
+ session.addInput(audioInput)
+ }
+ }
+ }
+}
diff --git a/submodules/Camera/Sources/CameraOutput.swift b/submodules/Camera/Sources/CameraOutput.swift
new file mode 100644
index 0000000000..a7cb2258c5
--- /dev/null
+++ b/submodules/Camera/Sources/CameraOutput.swift
@@ -0,0 +1,67 @@
+import AVFoundation
+
+final class CameraOutput: NSObject {
+ //private let photoOutput = CameraPhotoOutput()
+ private let videoOutput = AVCaptureVideoDataOutput()
+ private let audioOutput = AVCaptureAudioDataOutput()
+ private let metadataOutput = AVCaptureMetadataOutput()
+
+ private let queue = DispatchQueue(label: "")
+
+ var processSampleBuffer: ((CMSampleBuffer, AVCaptureConnection) -> Void)?
+ var processQRCode: ((String, AVMetadataMachineReadableCodeObject) -> Void)?
+
+ override init() {
+ super.init()
+
+ self.videoOutput.alwaysDiscardsLateVideoFrames = true;
+ self.videoOutput.videoSettings = [kCVPixelBufferPixelFormatTypeKey: kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange] as [String : Any]
+ }
+
+ deinit {
+ self.videoOutput.setSampleBufferDelegate(nil, queue: nil)
+ self.audioOutput.setSampleBufferDelegate(nil, queue: nil)
+ }
+
+ func configure(for session: AVCaptureSession) {
+ if session.canAddOutput(self.videoOutput) {
+ session.addOutput(self.videoOutput)
+ self.videoOutput.setSampleBufferDelegate(self, queue: self.queue)
+ }
+ if session.canAddOutput(self.audioOutput) {
+ session.addOutput(self.audioOutput)
+ self.audioOutput.setSampleBufferDelegate(self, queue: self.queue)
+ }
+ if session.canAddOutput(self.metadataOutput) {
+ session.addOutput(self.metadataOutput)
+ }
+ }
+
+ func invalidate(for session: AVCaptureSession) {
+ for output in session.outputs {
+ session.removeOutput(output)
+ }
+ }
+}
+
+extension CameraOutput: AVCaptureVideoDataOutputSampleBufferDelegate, AVCaptureAudioDataOutputSampleBufferDelegate {
+ func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
+ guard CMSampleBufferDataIsReady(sampleBuffer) else {
+ return
+ }
+
+ self.processSampleBuffer?(sampleBuffer, connection)
+ }
+
+ func captureOutput(_ output: AVCaptureOutput, didDrop sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
+
+ }
+}
+
+extension CameraOutput: AVCaptureMetadataOutputObjectsDelegate {
+ func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) {
+ if let object = metadataObjects.first as? AVMetadataMachineReadableCodeObject, object.type == .qr, let stringValue = object.stringValue, !stringValue.isEmpty {
+ self.processQRCode?(stringValue, object)
+ }
+ }
+}
diff --git a/submodules/Camera/Sources/CameraPreviewNode.swift b/submodules/Camera/Sources/CameraPreviewNode.swift
new file mode 100644
index 0000000000..9f18fa7e21
--- /dev/null
+++ b/submodules/Camera/Sources/CameraPreviewNode.swift
@@ -0,0 +1,50 @@
+import Foundation
+import AsyncDisplayKit
+import Display
+import AVFoundation
+
+private final class CameraPreviewNodeLayerNullAction: NSObject, CAAction {
+ @objc func run(forKey event: String, object anObject: Any, arguments dict: [AnyHashable : Any]?) {
+ }
+}
+
+private final class CameraPreviewNodeLayer: AVSampleBufferDisplayLayer {
+ override func action(forKey event: String) -> CAAction? {
+ return CameraPreviewNodeLayerNullAction()
+ }
+}
+
+class CameraPreviewNode: ASDisplayNode {
+ private var displayLayer: AVSampleBufferDisplayLayer
+
+ override init() {
+ self.displayLayer = AVSampleBufferDisplayLayer()
+ self.displayLayer.videoGravity = .resizeAspectFill
+
+ super.init()
+
+ self.clipsToBounds = true
+
+ self.layer.addSublayer(self.displayLayer)
+ }
+
+ func prepare() {
+ DispatchQueue.main.async {
+ self.displayLayer.flushAndRemoveImage()
+ }
+ }
+
+ func enqueue(_ sampleBuffer: CMSampleBuffer) {
+ self.displayLayer.enqueue(sampleBuffer)
+ }
+
+ override func layout() {
+ super.layout()
+
+ var transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2.0)
+ transform = transform.scaledBy(x: 1.0, y: -1.0)
+ self.displayLayer.setAffineTransform(transform)
+
+ self.displayLayer.frame = self.bounds
+ }
+}
diff --git a/submodules/Camera/Sources/CameraUtils.swift b/submodules/Camera/Sources/CameraUtils.swift
new file mode 100644
index 0000000000..7f83618271
--- /dev/null
+++ b/submodules/Camera/Sources/CameraUtils.swift
@@ -0,0 +1,43 @@
+import AVFoundation
+
+extension AVFrameRateRange {
+ func clamp(rate: Float64) -> Float64 {
+ return max(self.minFrameRate, min(self.maxFrameRate, rate))
+ }
+
+ func contains(rate: Float64) -> Bool {
+ return (self.minFrameRate...self.maxFrameRate) ~= rate
+ }
+}
+
+extension AVCaptureDevice {
+ func actualFPS(_ fps: Double) -> (fps: Double, duration: CMTime)? {
+ var durations: [CMTime] = []
+ var frameRates: [Double] = []
+
+ for range in self.activeFormat.videoSupportedFrameRateRanges {
+ if range.minFrameRate == range.maxFrameRate {
+ durations.append(range.minFrameDuration)
+ frameRates.append(range.maxFrameRate)
+ continue
+ }
+
+ if range.contains(rate: fps) {
+ return (fps, CMTimeMake(value: 100, timescale: Int32(100 * fps)))
+ }
+
+ let actualFPS: Double = range.clamp(rate: fps)
+ return (actualFPS, CMTimeMake(value: 100, timescale: Int32(100 * actualFPS)))
+ }
+
+ let diff = frameRates.map { abs($0 - fps) }
+
+ if let minElement: Float64 = diff.min() {
+ for i in 0..B401C9792F7F325000000000
+ 1DD70E29FF334B1F00000000
+
+ isa
+ PBXFileReference
+ name
+ libDisplay.dylib
+ path
+ libDisplay.dylib
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ compiled.mach-o.dylib
+
+ 1DD70E2936DE2CF900000000
+
+ isa
+ PBXFileReference
+ name
+ libMediaResources.a
+ path
+ libMediaResources.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29DB6520C800000000
+
+ isa
+ PBXFileReference
+ name
+ libPostbox.dylib
+ path
+ libPostbox.dylib
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ compiled.mach-o.dylib
+
+ 1DD70E29D65BA68200000000
+
+ isa
+ PBXFileReference
+ name
+ libSwiftSignalKit.dylib
+ path
+ libSwiftSignalKit.dylib
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ compiled.mach-o.dylib
+
+ 1DD70E29119CDA0700000000
+
+ isa
+ PBXFileReference
+ name
+ libTelegramCore.dylib
+ path
+ libTelegramCore.dylib
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ compiled.mach-o.dylib
+
+ 1DD70E2984A59C1D00000000
+
+ isa
+ PBXFileReference
+ name
+ libTelegramPresentationData.a
+ path
+ libTelegramPresentationData.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E292395015100000000
+
+ isa
+ PBXFileReference
+ name
+ libTelegramUIPreferences.a
+ path
+ libTelegramUIPreferences.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29F0C15F9C00000000
+
+ isa
+ PBXFileReference
+ name
+ libTextFormat.a
+ path
+ libTextFormat.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ B401C97968022A5500000000
+
+ isa
+ PBXGroup
+ name
+ Frameworks
+ sourceTree
+ ]]>
+ children
+
+ 1DD70E29FF334B1F00000000
+ 1DD70E2936DE2CF900000000
+ 1DD70E29DB6520C800000000
+ 1DD70E29D65BA68200000000
+ 1DD70E29119CDA0700000000
+ 1DD70E2984A59C1D00000000
+ 1DD70E292395015100000000
+ 1DD70E29F0C15F9C00000000
+
+
1DD70E29001F47FB00000000
isa
@@ -166,6 +290,7 @@
children
B401C979B781F65D00000000
+ B401C97968022A5500000000
B401C979E6D3C92800000000
B401C979C806358400000000
@@ -186,6 +311,86 @@
E7A30F049A1D75CD00000000
+ E7A30F04FF334B1F00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29FF334B1F00000000
+
+ E7A30F04119CDA0700000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29119CDA0700000000
+
+ E7A30F04DB6520C800000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29DB6520C800000000
+
+ E7A30F04D65BA68200000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29D65BA68200000000
+
+ E7A30F0436DE2CF900000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2936DE2CF900000000
+
+ E7A30F042395015100000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E292395015100000000
+
+ E7A30F0484A59C1D00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2984A59C1D00000000
+
+ E7A30F04F0C15F9C00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29F0C15F9C00000000
+
+ FAF5FAC90000000000000000
+
+ isa
+ PBXCopyFilesBuildPhase
+ files
+
+ E7A30F04FF334B1F00000000
+ E7A30F04119CDA0700000000
+ E7A30F04DB6520C800000000
+ E7A30F04D65BA68200000000
+ E7A30F0436DE2CF900000000
+ E7A30F042395015100000000
+ E7A30F0484A59C1D00000000
+ E7A30F04F0C15F9C00000000
+
+ name
+ Fake Swift Dependencies (Copy Files Phase)
+ runOnlyForDeploymentPostprocessing
+ 1
+ dstSubfolderSpec
+ 16
+ dstPath
+
+
4952437303EDA63300000000
isa
@@ -253,6 +458,7 @@
buildPhases
1870857F0000000000000000
+ FAF5FAC90000000000000000
buildConfigurationList
218C37090000000000000000
diff --git a/submodules/HexColor/Sources/HexColor.swift b/submodules/HexColor/Sources/HexColor.swift
index 24fa5263c8..181590c87e 100644
--- a/submodules/HexColor/Sources/HexColor.swift
+++ b/submodules/HexColor/Sources/HexColor.swift
@@ -1,21 +1,6 @@
import Foundation
import UIKit
-
-private extension String {
- func rightJustified(width: Int, pad: String = " ", truncate: Bool = false) -> String {
- guard width > count else {
- return truncate ? String(suffix(width)) : self
- }
- return String(repeating: pad, count: width - count) + self
- }
-
- func leftJustified(width: Int, pad: String = " ", truncate: Bool = false) -> String {
- guard width > count else {
- return truncate ? String(prefix(width)) : self
- }
- return self + String(repeating: pad, count: width - count)
- }
-}
+import TextFormat
public extension UIColor {
var hexString: String {
diff --git a/submodules/ItemListUI/Sources/Items/ItemListMultilineInputItem.swift b/submodules/ItemListUI/Sources/Items/ItemListMultilineInputItem.swift
index 28c7a274bc..3d131bfeac 100644
--- a/submodules/ItemListUI/Sources/Items/ItemListMultilineInputItem.swift
+++ b/submodules/ItemListUI/Sources/Items/ItemListMultilineInputItem.swift
@@ -21,19 +21,29 @@ public class ItemListMultilineInputItem: ListViewItem, ItemListItem {
let placeholder: String
public let sectionId: ItemListSectionId
let style: ItemListStyle
- let action: () -> Void
+ let capitalization: Bool
+ let autocorrection: Bool
+ let returnKeyType: UIReturnKeyType
+ let action: (() -> Void)?
let textUpdated: (String) -> Void
+ let shouldUpdateText: (String) -> Bool
public let tag: ItemListItemTag?
let maxLength: ItemListMultilineInputItemTextLimit?
+ let minimalHeight: CGFloat?
- public init(theme: PresentationTheme, text: String, placeholder: String, maxLength: ItemListMultilineInputItemTextLimit?, sectionId: ItemListSectionId, style: ItemListStyle, textUpdated: @escaping (String) -> Void, tag: ItemListItemTag? = nil, action: @escaping () -> Void) {
+ public init(theme: PresentationTheme, text: String, placeholder: String, maxLength: ItemListMultilineInputItemTextLimit?, sectionId: ItemListSectionId, style: ItemListStyle, capitalization: Bool = true, autocorrection: Bool = true, returnKeyType: UIReturnKeyType = .default, minimalHeight: CGFloat? = nil, textUpdated: @escaping (String) -> Void, shouldUpdateText: @escaping (String) -> Bool = { _ in return true }, tag: ItemListItemTag? = nil, action: (() -> Void)? = nil) {
self.theme = theme
self.text = text
self.placeholder = placeholder
self.maxLength = maxLength
self.sectionId = sectionId
self.style = style
+ self.capitalization = capitalization
+ self.autocorrection = autocorrection
+ self.returnKeyType = returnKeyType
+ self.minimalHeight = minimalHeight
self.textUpdated = textUpdated
+ self.shouldUpdateText = shouldUpdateText
self.tag = tag
self.action = action
}
@@ -188,7 +198,12 @@ public class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNod
let textTopInset: CGFloat = 11.0
let textBottomInset: CGFloat = 11.0
- let contentSize = CGSize(width: params.width, height: textLayout.size.height + textTopInset + textBottomInset)
+ var contentHeight: CGFloat = textLayout.size.height + textTopInset + textBottomInset
+ if let minimalHeight = item.minimalHeight {
+ contentHeight = max(minimalHeight, contentHeight)
+ }
+
+ let contentSize = CGSize(width: params.width, height: contentHeight)
let insets = itemListNeighborsGroupedInsets(neighbors)
let layout = ListViewItemNodeLayout(contentSize: contentSize, insets: insets)
@@ -212,6 +227,19 @@ public class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNod
}
}
+ let capitalizationType: UITextAutocapitalizationType = item.capitalization ? .sentences : .none
+ let autocorrectionType: UITextAutocorrectionType = item.autocorrection ? .default : .no
+
+ if strongSelf.textNode.textView.autocapitalizationType != capitalizationType {
+ strongSelf.textNode.textView.autocapitalizationType = capitalizationType
+ }
+ if strongSelf.textNode.textView.autocorrectionType != autocorrectionType {
+ strongSelf.textNode.textView.autocorrectionType = autocorrectionType
+ }
+ if strongSelf.textNode.textView.returnKeyType != item.returnKeyType {
+ strongSelf.textNode.textView.returnKeyType = item.returnKeyType
+ }
+
let _ = textApply()
if let currentText = strongSelf.textNode.attributedText {
if currentText.string != attributedText.string {
@@ -299,6 +327,22 @@ public class ItemListMultilineInputItemNode: ListViewItemNode, ASEditableTextNod
self.textClippingNode.frame = CGRect(origin: CGPoint(x: leftInset, y: textTopInset), size: CGSize(width: max(0.0, params.width - leftInset - params.rightInset), height: max(0.0, contentSize.height - textTopInset - textBottomInset)))
}
+ public func editableTextNode(_ editableTextNode: ASEditableTextNode, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
+ if let item = self.item {
+ if let action = item.action, text == "\n" {
+ action()
+ return false
+ }
+
+ var newText: String = editableTextNode.textView.text
+ newText.replaceSubrange(newText.index(newText.startIndex, offsetBy: range.lowerBound) ..< newText.index(newText.startIndex, offsetBy: range.upperBound), with: text)
+ if !item.shouldUpdateText(newText) {
+ return false
+ }
+ }
+ return true
+ }
+
public func editableTextNodeDidUpdateText(_ editableTextNode: ASEditableTextNode) {
if let item = self.item {
if let text = self.textNode.attributedText {
diff --git a/submodules/ItemListUI/Sources/Items/ItemListMultilineTextItem.swift b/submodules/ItemListUI/Sources/Items/ItemListMultilineTextItem.swift
index 72f3e11cfb..3a2c18d0e2 100644
--- a/submodules/ItemListUI/Sources/Items/ItemListMultilineTextItem.swift
+++ b/submodules/ItemListUI/Sources/Items/ItemListMultilineTextItem.swift
@@ -7,10 +7,16 @@ import TelegramPresentationData
import TextFormat
import AccountContext
+public enum ItemListMultilineTextBaseFont {
+ case `default`
+ case monospace
+}
+
public class ItemListMultilineTextItem: ListViewItem, ItemListItem {
let theme: PresentationTheme
let text: String
let enabledEntityTypes: EnabledEntityTypes
+ let font: ItemListMultilineTextBaseFont
public let sectionId: ItemListSectionId
let style: ItemListStyle
let action: (() -> Void)?
@@ -21,10 +27,11 @@ public class ItemListMultilineTextItem: ListViewItem, ItemListItem {
public let selectable: Bool
- public init(theme: PresentationTheme, text: String, enabledEntityTypes: EnabledEntityTypes, sectionId: ItemListSectionId, style: ItemListStyle, action: (() -> Void)? = nil, longTapAction: (() -> Void)? = nil, linkItemAction: ((TextLinkItemActionType, TextLinkItem) -> Void)? = nil, tag: Any? = nil) {
+ public init(theme: PresentationTheme, text: String, enabledEntityTypes: EnabledEntityTypes, font: ItemListMultilineTextBaseFont = .default, sectionId: ItemListSectionId, style: ItemListStyle, action: (() -> Void)? = nil, longTapAction: (() -> Void)? = nil, linkItemAction: ((TextLinkItemActionType, TextLinkItem) -> Void)? = nil, tag: Any? = nil) {
self.theme = theme
self.text = text
self.enabledEntityTypes = enabledEntityTypes
+ self.font = font
self.sectionId = sectionId
self.style = style
self.action = action
@@ -175,8 +182,21 @@ public class ItemListMultilineTextItemNode: ListViewItemNode {
leftInset = 16.0 + params.rightInset
}
+ var baseFont = titleFont
+ var linkFont = titleFont
+ var boldFont = titleBoldFont
+ var italicFont = titleItalicFont
+ var boldItalicFont = titleBoldItalicFont
+ if case .monospace = item.font {
+ baseFont = Font.monospace(17.0)
+ linkFont = Font.monospace(17.0)
+ boldFont = Font.semiboldMonospace(17.0)
+ italicFont = Font.italicMonospace(17.0)
+ boldItalicFont = Font.semiboldItalicMonospace(17.0)
+ }
+
let entities = generateTextEntities(item.text, enabledTypes: item.enabledEntityTypes)
- let string = stringWithAppliedEntities(item.text, entities: entities, baseColor: textColor, linkColor: item.theme.list.itemAccentColor, baseFont: titleFont, linkFont: titleFont, boldFont: titleBoldFont, italicFont: titleItalicFont, boldItalicFont: titleBoldItalicFont, fixedFont: titleFixedFont, blockQuoteFont: titleFont)
+ let string = stringWithAppliedEntities(item.text, entities: entities, baseColor: textColor, linkColor: item.theme.list.itemAccentColor, baseFont: baseFont, linkFont: linkFont, boldFont: boldFont, italicFont: italicFont, boldItalicFont: boldItalicFont, fixedFont: titleFixedFont, blockQuoteFont: titleFont)
let (titleLayout, titleApply) = makeTextLayout(TextNodeLayoutArguments(attributedString: string, backgroundColor: nil, maximumNumberOfLines: 0, truncationType: .end, constrainedSize: CGSize(width: params.width - params.leftInset - params.rightInset - 20.0, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
diff --git a/submodules/ItemListUI/Sources/Items/ItemListSingleLineInputItem.swift b/submodules/ItemListUI/Sources/Items/ItemListSingleLineInputItem.swift
index 660d2fa35f..07c75821c4 100644
--- a/submodules/ItemListUI/Sources/Items/ItemListSingleLineInputItem.swift
+++ b/submodules/ItemListUI/Sources/Items/ItemListSingleLineInputItem.swift
@@ -10,6 +10,7 @@ public enum ItemListSingleLineInputItemType: Equatable {
case password
case email
case number
+ case decimal
case username
}
@@ -262,6 +263,11 @@ public class ItemListSingleLineInputItemNode: ListViewItemNode, UITextFieldDeleg
} else {
keyboardType = .numberPad
}
+ case .decimal:
+ secureEntry = false
+ capitalizationType = .none
+ autocorrectionType = .no
+ keyboardType = .decimalPad
case .username:
secureEntry = false
capitalizationType = .none
@@ -393,8 +399,12 @@ public class ItemListSingleLineInputItemNode: ListViewItemNode, UITextFieldDeleg
}
@objc public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
- if let item = self.item, !item.shouldUpdateText(string) {
- return false
+ if let item = self.item {
+ var newText = textField.text ?? ""
+ newText.replaceSubrange(newText.index(newText.startIndex, offsetBy: range.lowerBound) ..< newText.index(newText.startIndex, offsetBy: range.upperBound), with: string)
+ if !item.shouldUpdateText(newText) {
+ return false
+ }
}
if string.count > 1, let item = self.item, let processPaste = item.processPaste {
diff --git a/submodules/PasscodeUI/Sources/PasscodeEntryInputFieldNode.swift b/submodules/PasscodeUI/Sources/PasscodeEntryInputFieldNode.swift
index 97fb1f56b7..119811902c 100644
--- a/submodules/PasscodeUI/Sources/PasscodeEntryInputFieldNode.swift
+++ b/submodules/PasscodeUI/Sources/PasscodeEntryInputFieldNode.swift
@@ -128,7 +128,7 @@ private class PasscodeEntryDotNode: ASImageNode {
}
}
-final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
+public final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
private var background: PasscodeBackground?
private var color: UIColor
private var accentColor: UIColor
@@ -141,19 +141,19 @@ final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
private var validLayout: PasscodeLayout?
- var complete: ((String) -> Void)?
+ public var complete: ((String) -> Void)?
- var text: String {
+ public var text: String {
return self.textFieldNode.textField.text ?? ""
}
- var keyboardAppearance: UIKeyboardAppearance {
+ public var keyboardAppearance: UIKeyboardAppearance {
didSet {
self.textFieldNode.textField.keyboardAppearance = self.keyboardAppearance
}
}
- init(color: UIColor, accentColor: UIColor, fieldType: PasscodeEntryFieldType, keyboardAppearance: UIKeyboardAppearance, useCustomNumpad: Bool = false) {
+ public init(color: UIColor, accentColor: UIColor, fieldType: PasscodeEntryFieldType, keyboardAppearance: UIKeyboardAppearance, useCustomNumpad: Bool = false) {
self.color = color
self.accentColor = accentColor
self.fieldType = fieldType
@@ -175,7 +175,7 @@ final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
self.addSubnode(self.borderNode)
}
- override func didLoad() {
+ override public func didLoad() {
super.didLoad()
self.textFieldNode.textField.isSecureTextEntry = true
@@ -214,7 +214,7 @@ final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
}
}
- func activateInput() {
+ public func activateInput() {
self.textFieldNode.textField.becomeFirstResponder()
}
@@ -245,7 +245,7 @@ final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
}
}
- func reset(animated: Bool = true) {
+ public func reset(animated: Bool = true) {
var delay: Double = 0.0
for node in self.dotNodes.reversed() {
if node.alpha < 1.0 {
@@ -297,7 +297,7 @@ final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
}
}
- func update(fieldType: PasscodeEntryFieldType) {
+ public func update(fieldType: PasscodeEntryFieldType) {
if fieldType != self.fieldType {
self.textFieldNode.textField.text = ""
}
@@ -307,7 +307,7 @@ final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
}
}
- func updateLayout(layout: PasscodeLayout, transition: ContainedViewLayoutTransition) -> CGRect {
+ public func updateLayout(layout: PasscodeLayout, transition: ContainedViewLayoutTransition) -> CGRect {
self.validLayout = layout
let fieldAlpha: CGFloat
@@ -353,7 +353,7 @@ final class PasscodeEntryInputFieldNode: ASDisplayNode, UITextFieldDelegate {
return fieldFrame
}
- func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+ public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
let currentText = textField.text ?? ""
let text = (currentText as NSString).replacingCharacters(in: range, with: string)
if let maxLength = self.fieldType.maxLength, text.count > maxLength {
diff --git a/submodules/PasscodeUI/Sources/PasscodeLayout.swift b/submodules/PasscodeUI/Sources/PasscodeLayout.swift
index 28ecd125be..90a8c918bf 100644
--- a/submodules/PasscodeUI/Sources/PasscodeLayout.swift
+++ b/submodules/PasscodeUI/Sources/PasscodeLayout.swift
@@ -108,7 +108,7 @@ struct PasscodeKeyboardLayout {
}
}
-struct PasscodeLayout {
+public struct PasscodeLayout {
let layout: ContainerViewLayout
let keyboard: PasscodeKeyboardLayout
let titleOffset: CGFloat
@@ -155,7 +155,7 @@ struct PasscodeLayout {
}
}
- init(layout: ContainerViewLayout, titleOffset: CGFloat, subtitleOffset: CGFloat, inputFieldOffset: CGFloat) {
+ public init(layout: ContainerViewLayout, titleOffset: CGFloat, subtitleOffset: CGFloat, inputFieldOffset: CGFloat) {
self.layout = layout
self.keyboard = PasscodeKeyboardLayout(layout: layout)
self.titleOffset = titleOffset
diff --git a/submodules/PeerInfoUI/Sources/ChannelInfoController.swift b/submodules/PeerInfoUI/Sources/ChannelInfoController.swift
index 6d136daa9c..cc40e51e79 100644
--- a/submodules/PeerInfoUI/Sources/ChannelInfoController.swift
+++ b/submodules/PeerInfoUI/Sources/ChannelInfoController.swift
@@ -355,8 +355,6 @@ private enum ChannelInfoEntry: ItemListNodeEntry {
case let .channelDescriptionSetup(theme, placeholder, value):
return ItemListMultilineInputItem(theme: theme, text: value, placeholder: placeholder, maxLength: ItemListMultilineInputItemTextLimit(value: 255, display: true), sectionId: self.section, style: .plain, textUpdated: { updatedText in
arguments.updateEditingDescriptionText(updatedText)
- }, action: {
-
})
case let .admins(theme, text, value):
return ItemListDisclosureItem(theme: theme, title: text, label: value, sectionId: self.section, style: .plain, action: {
diff --git a/submodules/PeerInfoUI/Sources/GroupInfoController.swift b/submodules/PeerInfoUI/Sources/GroupInfoController.swift
index 06c8beae09..af05be151b 100644
--- a/submodules/PeerInfoUI/Sources/GroupInfoController.swift
+++ b/submodules/PeerInfoUI/Sources/GroupInfoController.swift
@@ -541,8 +541,6 @@ private enum GroupInfoEntry: ItemListNodeEntry {
case let .groupDescriptionSetup(theme, placeholder, text):
return ItemListMultilineInputItem(theme: theme, text: text, placeholder: placeholder, maxLength: ItemListMultilineInputItemTextLimit(value: 255, display: true), sectionId: self.section, style: .blocks, textUpdated: { updatedText in
arguments.updateEditingDescriptionText(updatedText)
- }, action: {
-
})
case let .permissions(theme, title, text):
return ItemListDisclosureItem(theme: theme, icon: PresentationResourcesChat.groupInfoPermissionsIcon(theme), title: title, label: text, sectionId: self.section, style: .blocks, action: {
diff --git a/submodules/PeerInfoUI/Sources/PeerReportController.swift b/submodules/PeerInfoUI/Sources/PeerReportController.swift
index db0614a5bb..01261f203e 100644
--- a/submodules/PeerInfoUI/Sources/PeerReportController.swift
+++ b/submodules/PeerInfoUI/Sources/PeerReportController.swift
@@ -254,7 +254,7 @@ private enum PeerReportControllerEntry: ItemListNodeEntry {
case let .text(theme, title, value):
return ItemListMultilineInputItem(theme: theme, text: value, placeholder: title, maxLength: nil, sectionId: self.section, style: .blocks, textUpdated: { text in
arguments.updateText(text)
- }, tag: PeerReportControllerEntryTag.text, action: {})
+ }, tag: PeerReportControllerEntryTag.text)
}
}
}
diff --git a/submodules/QrCode/BUCK b/submodules/QrCode/BUCK
index 1661dd7beb..f1dd281d16 100644
--- a/submodules/QrCode/BUCK
+++ b/submodules/QrCode/BUCK
@@ -4,11 +4,23 @@ static_library(
name = "QrCode",
srcs = glob([
"Sources/**/*.swift",
- ]),
+ "Sources/**/*.cpp",
+ ]) + [
+ "Sources/QrCodeInstance.mm"
+ ],
+ has_cpp = True,
deps = [
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
"//submodules/Display:Display#shared",
],
+ headers = glob([
+ "Sources/**/*.hpp",
+ ]) + [
+ "Sources/QrCodeInstance.h"
+ ],
+ exported_headers = [
+ "Sources/QrCodeInstance.h"
+ ],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
diff --git a/submodules/QrCode/QrCode.xcodeproj/project.pbxproj b/submodules/QrCode/QrCode.xcodeproj/project.pbxproj
index 6c5e1c3c2f..cd6b029c10 100644
--- a/submodules/QrCode/QrCode.xcodeproj/project.pbxproj
+++ b/submodules/QrCode/QrCode.xcodeproj/project.pbxproj
@@ -157,16 +157,120 @@
explicitFileType
text.script.python
- 1DD70E29213163D300000000
+ 1DD70E2905A53BC200000000
isa
PBXFileReference
name
- QRCode.swift
+ BitBuffer.cpp
path
- Sources/QRCode.swift
+ Sources/BitBuffer.cpp
sourceTree
SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.cpp.cpp
+
+ 1DD70E2905A54E8700000000
+
+ isa
+ PBXFileReference
+ name
+ BitBuffer.hpp
+ path
+ Sources/BitBuffer.hpp
+ sourceTree
+ SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.cpp.h
+
+ 1DD70E2921C2F78300000000
+
+ isa
+ PBXFileReference
+ name
+ QrCode.cpp
+ path
+ Sources/QrCode.cpp
+ sourceTree
+ SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.cpp.cpp
+
+ 1DD70E2921C30A4800000000
+
+ isa
+ PBXFileReference
+ name
+ QrCode.hpp
+ path
+ Sources/QrCode.hpp
+ sourceTree
+ SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.cpp.h
+
+ 1DD70E29BDC7BBF300000000
+
+ isa
+ PBXFileReference
+ name
+ QrCode.swift
+ path
+ Sources/QrCode.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E2956ECDFBD00000000
+
+ isa
+ PBXFileReference
+ name
+ QrCodeInstance.h
+ path
+ Sources/QrCodeInstance.h
+ sourceTree
+ SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.c.h
+
+ 1DD70E2986AF18EB00000000
+
+ isa
+ PBXFileReference
+ name
+ QrCodeInstance.mm
+ path
+ Sources/QrCodeInstance.mm
+ sourceTree
+ SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.cpp.objcpp
+
+ 1DD70E290F1C936700000000
+
+ isa
+ PBXFileReference
+ name
+ QrSegment.cpp
+ path
+ Sources/QrSegment.cpp
+ sourceTree
+ SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.cpp.cpp
+
+ 1DD70E290F1CA62C00000000
+
+ isa
+ PBXFileReference
+ name
+ QrSegment.hpp
+ path
+ Sources/QrSegment.hpp
+ sourceTree
+ SOURCE_ROOT
+ lastKnownFileType
+ sourcecode.cpp.h
B401C979EAB5339800000000
@@ -178,7 +282,15 @@
]]>
children
- 1DD70E29213163D300000000
+ 1DD70E2905A53BC200000000
+ 1DD70E2905A54E8700000000
+ 1DD70E2921C2F78300000000
+ 1DD70E2921C30A4800000000
+ 1DD70E29BDC7BBF300000000
+ 1DD70E2956ECDFBD00000000
+ 1DD70E2986AF18EB00000000
+ 1DD70E290F1C936700000000
+ 1DD70E290F1CA62C00000000
B401C979909F23CE00000000
@@ -211,12 +323,40 @@
B401C979909F23CE00000000
- E7A30F04213163D300000000
+ E7A30F0405A53BC200000000
isa
PBXBuildFile
fileRef
- 1DD70E29213163D300000000
+ 1DD70E2905A53BC200000000
+
+ E7A30F0421C2F78300000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2921C2F78300000000
+
+ E7A30F04BDC7BBF300000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29BDC7BBF300000000
+
+ E7A30F0486AF18EB00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2986AF18EB00000000
+
+ E7A30F040F1C936700000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E290F1C936700000000
1870857F0000000000000000
@@ -224,7 +364,11 @@
PBXSourcesBuildPhase
files
- E7A30F04213163D300000000
+ E7A30F0405A53BC200000000
+ E7A30F0421C2F78300000000
+ E7A30F04BDC7BBF300000000
+ E7A30F0486AF18EB00000000
+ E7A30F040F1C936700000000
E7A30F04FF334B1F00000000
diff --git a/submodules/QrCode/Sources/BitBuffer.cpp b/submodules/QrCode/Sources/BitBuffer.cpp
new file mode 100755
index 0000000000..e22e9d3381
--- /dev/null
+++ b/submodules/QrCode/Sources/BitBuffer.cpp
@@ -0,0 +1,41 @@
+/*
+ * QR Code generator library (C++)
+ *
+ * Copyright (c) Project Nayuki. (MIT License)
+ * https://www.nayuki.io/page/qr-code-generator-library
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * - The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * - The Software is provided "as is", without warranty of any kind, express or
+ * implied, including but not limited to the warranties of merchantability,
+ * fitness for a particular purpose and noninfringement. In no event shall the
+ * authors or copyright holders be liable for any claim, damages or other
+ * liability, whether in an action of contract, tort or otherwise, arising from,
+ * out of or in connection with the Software or the use or other dealings in the
+ * Software.
+ */
+
+#include
+#include "BitBuffer.hpp"
+
+
+namespace qrcodegen {
+
+BitBuffer::BitBuffer()
+ : std::vector() {}
+
+
+void BitBuffer::appendBits(std::uint32_t val, int len) {
+ if (len < 0 || len > 31 || val >> len != 0)
+ throw std::domain_error("Value out of range");
+ for (int i = len - 1; i >= 0; i--) // Append bit by bit
+ this->push_back(((val >> i) & 1) != 0);
+}
+
+}
diff --git a/submodules/QrCode/Sources/BitBuffer.hpp b/submodules/QrCode/Sources/BitBuffer.hpp
new file mode 100755
index 0000000000..f30913a891
--- /dev/null
+++ b/submodules/QrCode/Sources/BitBuffer.hpp
@@ -0,0 +1,52 @@
+/*
+ * QR Code generator library (C++)
+ *
+ * Copyright (c) Project Nayuki. (MIT License)
+ * https://www.nayuki.io/page/qr-code-generator-library
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * - The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * - The Software is provided "as is", without warranty of any kind, express or
+ * implied, including but not limited to the warranties of merchantability,
+ * fitness for a particular purpose and noninfringement. In no event shall the
+ * authors or copyright holders be liable for any claim, damages or other
+ * liability, whether in an action of contract, tort or otherwise, arising from,
+ * out of or in connection with the Software or the use or other dealings in the
+ * Software.
+ */
+
+#pragma once
+
+#include
+#include
+
+
+namespace qrcodegen {
+
+/*
+ * An appendable sequence of bits (0s and 1s). Mainly used by QrSegment.
+ */
+class BitBuffer final : public std::vector {
+
+ /*---- Constructor ----*/
+
+ // Creates an empty bit buffer (length 0).
+ public: BitBuffer();
+
+
+
+ /*---- Method ----*/
+
+ // Appends the given number of low-order bits of the given value
+ // to this buffer. Requires 0 <= len <= 31 and val < 2^len.
+ public: void appendBits(std::uint32_t val, int len);
+
+};
+
+}
diff --git a/submodules/QrCode/Sources/QrCode.cpp b/submodules/QrCode/Sources/QrCode.cpp
new file mode 100755
index 0000000000..a6e25683c6
--- /dev/null
+++ b/submodules/QrCode/Sources/QrCode.cpp
@@ -0,0 +1,660 @@
+/*
+ * QR Code generator library (C++)
+ *
+ * Copyright (c) Project Nayuki. (MIT License)
+ * https://www.nayuki.io/page/qr-code-generator-library
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * - The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * - The Software is provided "as is", without warranty of any kind, express or
+ * implied, including but not limited to the warranties of merchantability,
+ * fitness for a particular purpose and noninfringement. In no event shall the
+ * authors or copyright holders be liable for any claim, damages or other
+ * liability, whether in an action of contract, tort or otherwise, arising from,
+ * out of or in connection with the Software or the use or other dealings in the
+ * Software.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include "BitBuffer.hpp"
+#include "QrCode.hpp"
+
+using std::int8_t;
+using std::uint8_t;
+using std::size_t;
+using std::vector;
+
+
+namespace qrcodegen {
+
+int QrCode::getFormatBits(Ecc ecl) {
+ switch (ecl) {
+ case Ecc::LOW : return 1;
+ case Ecc::MEDIUM : return 0;
+ case Ecc::QUARTILE: return 3;
+ case Ecc::HIGH : return 2;
+ default: throw std::logic_error("Assertion error");
+ }
+}
+
+
+QrCode QrCode::encodeText(const char *text, Ecc ecl) {
+ vector segs = QrSegment::makeSegments(text);
+ return encodeSegments(segs, ecl);
+}
+
+
+QrCode QrCode::encodeBinary(const vector &data, Ecc ecl) {
+ vector segs{QrSegment::makeBytes(data)};
+ return encodeSegments(segs, ecl);
+}
+
+
+QrCode QrCode::encodeSegments(const vector &segs, Ecc ecl,
+ int minVersion, int maxVersion, int mask, bool boostEcl) {
+ if (!(MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= MAX_VERSION) || mask < -1 || mask > 7)
+ throw std::invalid_argument("Invalid value");
+
+ // Find the minimal version number to use
+ int version, dataUsedBits;
+ for (version = minVersion; ; version++) {
+ int dataCapacityBits = getNumDataCodewords(version, ecl) * 8; // Number of data bits available
+ dataUsedBits = QrSegment::getTotalBits(segs, version);
+ if (dataUsedBits != -1 && dataUsedBits <= dataCapacityBits)
+ break; // This version number is found to be suitable
+ if (version >= maxVersion) { // All versions in the range could not fit the given data
+ std::ostringstream sb;
+ if (dataUsedBits == -1)
+ sb << "Segment too long";
+ else {
+ sb << "Data length = " << dataUsedBits << " bits, ";
+ sb << "Max capacity = " << dataCapacityBits << " bits";
+ }
+ throw data_too_long(sb.str());
+ }
+ }
+ if (dataUsedBits == -1)
+ throw std::logic_error("Assertion error");
+
+ // Increase the error correction level while the data still fits in the current version number
+ for (Ecc newEcl : vector{Ecc::MEDIUM, Ecc::QUARTILE, Ecc::HIGH}) { // From low to high
+ if (boostEcl && dataUsedBits <= getNumDataCodewords(version, newEcl) * 8)
+ ecl = newEcl;
+ }
+
+ // Concatenate all segments to create the data bit string
+ BitBuffer bb;
+ for (const QrSegment &seg : segs) {
+ bb.appendBits(static_cast(seg.getMode().getModeBits()), 4);
+ bb.appendBits(static_cast(seg.getNumChars()), seg.getMode().numCharCountBits(version));
+ bb.insert(bb.end(), seg.getData().begin(), seg.getData().end());
+ }
+ if (bb.size() != static_cast(dataUsedBits))
+ throw std::logic_error("Assertion error");
+
+ // Add terminator and pad up to a byte if applicable
+ size_t dataCapacityBits = static_cast(getNumDataCodewords(version, ecl)) * 8;
+ if (bb.size() > dataCapacityBits)
+ throw std::logic_error("Assertion error");
+ bb.appendBits(0, std::min(4, static_cast(dataCapacityBits - bb.size())));
+ bb.appendBits(0, (8 - static_cast(bb.size() % 8)) % 8);
+ if (bb.size() % 8 != 0)
+ throw std::logic_error("Assertion error");
+
+ // Pad with alternating bytes until data capacity is reached
+ for (uint8_t padByte = 0xEC; bb.size() < dataCapacityBits; padByte ^= 0xEC ^ 0x11)
+ bb.appendBits(padByte, 8);
+
+ // Pack bits into bytes in big endian
+ vector dataCodewords(bb.size() / 8);
+ for (size_t i = 0; i < bb.size(); i++)
+ dataCodewords[i >> 3] |= (bb.at(i) ? 1 : 0) << (7 - (i & 7));
+
+ // Create the QR Code object
+ return QrCode(version, ecl, dataCodewords, mask);
+}
+
+
+QrCode::QrCode(int ver, Ecc ecl, const vector &dataCodewords, int mask) :
+ // Initialize fields and check arguments
+ version(ver),
+ errorCorrectionLevel(ecl) {
+ if (ver < MIN_VERSION || ver > MAX_VERSION)
+ throw std::domain_error("Version value out of range");
+ if (mask < -1 || mask > 7)
+ throw std::domain_error("Mask value out of range");
+ size = ver * 4 + 17;
+ size_t sz = static_cast(size);
+ modules = vector >(sz, vector(sz)); // Initially all white
+ isFunction = vector >(sz, vector(sz));
+
+ // Compute ECC, draw modules
+ drawFunctionPatterns();
+ const vector allCodewords = addEccAndInterleave(dataCodewords);
+ drawCodewords(allCodewords);
+
+ // Do masking
+ if (mask == -1) { // Automatically choose best mask
+ long minPenalty = LONG_MAX;
+ for (int i = 0; i < 8; i++) {
+ applyMask(i);
+ drawFormatBits(i);
+ long penalty = getPenaltyScore();
+ if (penalty < minPenalty) {
+ mask = i;
+ minPenalty = penalty;
+ }
+ applyMask(i); // Undoes the mask due to XOR
+ }
+ }
+ if (mask < 0 || mask > 7)
+ throw std::logic_error("Assertion error");
+ this->mask = mask;
+ applyMask(mask); // Apply the final choice of mask
+ drawFormatBits(mask); // Overwrite old format bits
+
+ isFunction.clear();
+ isFunction.shrink_to_fit();
+}
+
+
+int QrCode::getVersion() const {
+ return version;
+}
+
+
+int QrCode::getSize() const {
+ return size;
+}
+
+
+QrCode::Ecc QrCode::getErrorCorrectionLevel() const {
+ return errorCorrectionLevel;
+}
+
+
+int QrCode::getMask() const {
+ return mask;
+}
+
+
+bool QrCode::getModule(int x, int y) const {
+ return 0 <= x && x < size && 0 <= y && y < size && module(x, y);
+}
+
+
+std::string QrCode::toSvgString(int border) const {
+ if (border < 0)
+ throw std::domain_error("Border must be non-negative");
+ if (border > INT_MAX / 2 || border * 2 > INT_MAX - size)
+ throw std::overflow_error("Border too large");
+
+ std::ostringstream sb;
+ sb << "\n";
+ sb << "\n";
+ sb << "\n";
+ return sb.str();
+}
+
+
+void QrCode::drawFunctionPatterns() {
+ // Draw horizontal and vertical timing patterns
+ for (int i = 0; i < size; i++) {
+ setFunctionModule(6, i, i % 2 == 0);
+ setFunctionModule(i, 6, i % 2 == 0);
+ }
+
+ // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)
+ drawFinderPattern(3, 3);
+ drawFinderPattern(size - 4, 3);
+ drawFinderPattern(3, size - 4);
+
+ // Draw numerous alignment patterns
+ const vector alignPatPos = getAlignmentPatternPositions();
+ size_t numAlign = alignPatPos.size();
+ for (size_t i = 0; i < numAlign; i++) {
+ for (size_t j = 0; j < numAlign; j++) {
+ // Don't draw on the three finder corners
+ if (!((i == 0 && j == 0) || (i == 0 && j == numAlign - 1) || (i == numAlign - 1 && j == 0)))
+ drawAlignmentPattern(alignPatPos.at(i), alignPatPos.at(j));
+ }
+ }
+
+ // Draw configuration data
+ drawFormatBits(0); // Dummy mask value; overwritten later in the constructor
+ drawVersion();
+}
+
+
+void QrCode::drawFormatBits(int mask) {
+ // Calculate error correction code and pack bits
+ int data = getFormatBits(errorCorrectionLevel) << 3 | mask; // errCorrLvl is uint2, mask is uint3
+ int rem = data;
+ for (int i = 0; i < 10; i++)
+ rem = (rem << 1) ^ ((rem >> 9) * 0x537);
+ int bits = (data << 10 | rem) ^ 0x5412; // uint15
+ if (bits >> 15 != 0)
+ throw std::logic_error("Assertion error");
+
+ // Draw first copy
+ for (int i = 0; i <= 5; i++)
+ setFunctionModule(8, i, getBit(bits, i));
+ setFunctionModule(8, 7, getBit(bits, 6));
+ setFunctionModule(8, 8, getBit(bits, 7));
+ setFunctionModule(7, 8, getBit(bits, 8));
+ for (int i = 9; i < 15; i++)
+ setFunctionModule(14 - i, 8, getBit(bits, i));
+
+ // Draw second copy
+ for (int i = 0; i < 8; i++)
+ setFunctionModule(size - 1 - i, 8, getBit(bits, i));
+ for (int i = 8; i < 15; i++)
+ setFunctionModule(8, size - 15 + i, getBit(bits, i));
+ setFunctionModule(8, size - 8, true); // Always black
+}
+
+
+void QrCode::drawVersion() {
+ if (version < 7)
+ return;
+
+ // Calculate error correction code and pack bits
+ int rem = version; // version is uint6, in the range [7, 40]
+ for (int i = 0; i < 12; i++)
+ rem = (rem << 1) ^ ((rem >> 11) * 0x1F25);
+ long bits = static_cast(version) << 12 | rem; // uint18
+ if (bits >> 18 != 0)
+ throw std::logic_error("Assertion error");
+
+ // Draw two copies
+ for (int i = 0; i < 18; i++) {
+ bool bit = getBit(bits, i);
+ int a = size - 11 + i % 3;
+ int b = i / 3;
+ setFunctionModule(a, b, bit);
+ setFunctionModule(b, a, bit);
+ }
+}
+
+
+void QrCode::drawFinderPattern(int x, int y) {
+ for (int dy = -4; dy <= 4; dy++) {
+ for (int dx = -4; dx <= 4; dx++) {
+ int dist = std::max(std::abs(dx), std::abs(dy)); // Chebyshev/infinity norm
+ int xx = x + dx, yy = y + dy;
+ if (0 <= xx && xx < size && 0 <= yy && yy < size)
+ setFunctionModule(xx, yy, dist != 2 && dist != 4);
+ }
+ }
+}
+
+
+void QrCode::drawAlignmentPattern(int x, int y) {
+ for (int dy = -2; dy <= 2; dy++) {
+ for (int dx = -2; dx <= 2; dx++)
+ setFunctionModule(x + dx, y + dy, std::max(std::abs(dx), std::abs(dy)) != 1);
+ }
+}
+
+
+void QrCode::setFunctionModule(int x, int y, bool isBlack) {
+ size_t ux = static_cast(x);
+ size_t uy = static_cast(y);
+ modules .at(uy).at(ux) = isBlack;
+ isFunction.at(uy).at(ux) = true;
+}
+
+
+bool QrCode::module(int x, int y) const {
+ return modules.at(static_cast(y)).at(static_cast(x));
+}
+
+
+vector QrCode::addEccAndInterleave(const vector &data) const {
+ if (data.size() != static_cast(getNumDataCodewords(version, errorCorrectionLevel)))
+ throw std::invalid_argument("Invalid argument");
+
+ // Calculate parameter numbers
+ int numBlocks = NUM_ERROR_CORRECTION_BLOCKS[static_cast(errorCorrectionLevel)][version];
+ int blockEccLen = ECC_CODEWORDS_PER_BLOCK [static_cast(errorCorrectionLevel)][version];
+ int rawCodewords = getNumRawDataModules(version) / 8;
+ int numShortBlocks = numBlocks - rawCodewords % numBlocks;
+ int shortBlockLen = rawCodewords / numBlocks;
+
+ // Split data into blocks and append ECC to each block
+ vector > blocks;
+ const vector rsDiv = reedSolomonComputeDivisor(blockEccLen);
+ for (int i = 0, k = 0; i < numBlocks; i++) {
+ vector dat(data.cbegin() + k, data.cbegin() + (k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1)));
+ k += static_cast(dat.size());
+ const vector ecc = reedSolomonComputeRemainder(dat, rsDiv);
+ if (i < numShortBlocks)
+ dat.push_back(0);
+ dat.insert(dat.end(), ecc.cbegin(), ecc.cend());
+ blocks.push_back(std::move(dat));
+ }
+
+ // Interleave (not concatenate) the bytes from every block into a single sequence
+ vector result;
+ for (size_t i = 0; i < blocks.at(0).size(); i++) {
+ for (size_t j = 0; j < blocks.size(); j++) {
+ // Skip the padding byte in short blocks
+ if (i != static_cast(shortBlockLen - blockEccLen) || j >= static_cast(numShortBlocks))
+ result.push_back(blocks.at(j).at(i));
+ }
+ }
+ if (result.size() != static_cast(rawCodewords))
+ throw std::logic_error("Assertion error");
+ return result;
+}
+
+
+void QrCode::drawCodewords(const vector &data) {
+ if (data.size() != static_cast(getNumRawDataModules(version) / 8))
+ throw std::invalid_argument("Invalid argument");
+
+ size_t i = 0; // Bit index into the data
+ // Do the funny zigzag scan
+ for (int right = size - 1; right >= 1; right -= 2) { // Index of right column in each column pair
+ if (right == 6)
+ right = 5;
+ for (int vert = 0; vert < size; vert++) { // Vertical counter
+ for (int j = 0; j < 2; j++) {
+ size_t x = static_cast(right - j); // Actual x coordinate
+ bool upward = ((right + 1) & 2) == 0;
+ size_t y = static_cast(upward ? size - 1 - vert : vert); // Actual y coordinate
+ if (!isFunction.at(y).at(x) && i < data.size() * 8) {
+ modules.at(y).at(x) = getBit(data.at(i >> 3), 7 - static_cast(i & 7));
+ i++;
+ }
+ // If this QR Code has any remainder bits (0 to 7), they were assigned as
+ // 0/false/white by the constructor and are left unchanged by this method
+ }
+ }
+ }
+ if (i != data.size() * 8)
+ throw std::logic_error("Assertion error");
+}
+
+
+void QrCode::applyMask(int mask) {
+ if (mask < 0 || mask > 7)
+ throw std::domain_error("Mask value out of range");
+ size_t sz = static_cast(size);
+ for (size_t y = 0; y < sz; y++) {
+ for (size_t x = 0; x < sz; x++) {
+ bool invert;
+ switch (mask) {
+ case 0: invert = (x + y) % 2 == 0; break;
+ case 1: invert = y % 2 == 0; break;
+ case 2: invert = x % 3 == 0; break;
+ case 3: invert = (x + y) % 3 == 0; break;
+ case 4: invert = (x / 3 + y / 2) % 2 == 0; break;
+ case 5: invert = x * y % 2 + x * y % 3 == 0; break;
+ case 6: invert = (x * y % 2 + x * y % 3) % 2 == 0; break;
+ case 7: invert = ((x + y) % 2 + x * y % 3) % 2 == 0; break;
+ default: throw std::logic_error("Assertion error");
+ }
+ modules.at(y).at(x) = modules.at(y).at(x) ^ (invert & !isFunction.at(y).at(x));
+ }
+ }
+}
+
+
+long QrCode::getPenaltyScore() const {
+ long result = 0;
+
+ // Adjacent modules in row having same color, and finder-like patterns
+ for (int y = 0; y < size; y++) {
+ bool runColor = false;
+ int runX = 0;
+ std::array runHistory = {};
+ int padRun = size; // Add white border to initial run
+ for (int x = 0; x < size; x++) {
+ if (module(x, y) == runColor) {
+ runX++;
+ if (runX == 5)
+ result += PENALTY_N1;
+ else if (runX > 5)
+ result++;
+ } else {
+ finderPenaltyAddHistory(runX + padRun, runHistory);
+ padRun = 0;
+ if (!runColor)
+ result += finderPenaltyCountPatterns(runHistory) * PENALTY_N3;
+ runColor = module(x, y);
+ runX = 1;
+ }
+ }
+ result += finderPenaltyTerminateAndCount(runColor, runX + padRun, runHistory) * PENALTY_N3;
+ }
+ // Adjacent modules in column having same color, and finder-like patterns
+ for (int x = 0; x < size; x++) {
+ bool runColor = false;
+ int runY = 0;
+ std::array runHistory = {};
+ int padRun = size; // Add white border to initial run
+ for (int y = 0; y < size; y++) {
+ if (module(x, y) == runColor) {
+ runY++;
+ if (runY == 5)
+ result += PENALTY_N1;
+ else if (runY > 5)
+ result++;
+ } else {
+ finderPenaltyAddHistory(runY + padRun, runHistory);
+ padRun = 0;
+ if (!runColor)
+ result += finderPenaltyCountPatterns(runHistory) * PENALTY_N3;
+ runColor = module(x, y);
+ runY = 1;
+ }
+ }
+ result += finderPenaltyTerminateAndCount(runColor, runY + padRun, runHistory) * PENALTY_N3;
+ }
+
+ // 2*2 blocks of modules having same color
+ for (int y = 0; y < size - 1; y++) {
+ for (int x = 0; x < size - 1; x++) {
+ bool color = module(x, y);
+ if ( color == module(x + 1, y) &&
+ color == module(x, y + 1) &&
+ color == module(x + 1, y + 1))
+ result += PENALTY_N2;
+ }
+ }
+
+ // Balance of black and white modules
+ int black = 0;
+ for (const vector &row : modules) {
+ for (bool color : row) {
+ if (color)
+ black++;
+ }
+ }
+ int total = size * size; // Note that size is odd, so black/total != 1/2
+ // Compute the smallest integer k >= 0 such that (45-5k)% <= black/total <= (55+5k)%
+ int k = static_cast((std::abs(black * 20L - total * 10L) + total - 1) / total) - 1;
+ result += k * PENALTY_N4;
+ return result;
+}
+
+
+vector QrCode::getAlignmentPatternPositions() const {
+ if (version == 1)
+ return vector();
+ else {
+ int numAlign = version / 7 + 2;
+ int step = (version == 32) ? 26 :
+ (version*4 + numAlign*2 + 1) / (numAlign*2 - 2) * 2;
+ vector result;
+ for (int i = 0, pos = size - 7; i < numAlign - 1; i++, pos -= step)
+ result.insert(result.begin(), pos);
+ result.insert(result.begin(), 6);
+ return result;
+ }
+}
+
+
+int QrCode::getNumRawDataModules(int ver) {
+ if (ver < MIN_VERSION || ver > MAX_VERSION)
+ throw std::domain_error("Version number out of range");
+ int result = (16 * ver + 128) * ver + 64;
+ if (ver >= 2) {
+ int numAlign = ver / 7 + 2;
+ result -= (25 * numAlign - 10) * numAlign - 55;
+ if (ver >= 7)
+ result -= 36;
+ }
+ if (!(208 <= result && result <= 29648))
+ throw std::logic_error("Assertion error");
+ return result;
+}
+
+
+int QrCode::getNumDataCodewords(int ver, Ecc ecl) {
+ return getNumRawDataModules(ver) / 8
+ - ECC_CODEWORDS_PER_BLOCK [static_cast(ecl)][ver]
+ * NUM_ERROR_CORRECTION_BLOCKS[static_cast(ecl)][ver];
+}
+
+
+vector QrCode::reedSolomonComputeDivisor(int degree) {
+ if (degree < 1 || degree > 255)
+ throw std::domain_error("Degree out of range");
+ // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.
+ // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array {255, 8, 93}.
+ vector result(static_cast(degree));
+ result.at(result.size() - 1) = 1; // Start off with the monomial x^0
+
+ // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),
+ // and drop the highest monomial term which is always 1x^degree.
+ // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).
+ uint8_t root = 1;
+ for (int i = 0; i < degree; i++) {
+ // Multiply the current product by (x - r^i)
+ for (size_t j = 0; j < result.size(); j++) {
+ result.at(j) = reedSolomonMultiply(result.at(j), root);
+ if (j + 1 < result.size())
+ result.at(j) ^= result.at(j + 1);
+ }
+ root = reedSolomonMultiply(root, 0x02);
+ }
+ return result;
+}
+
+
+vector QrCode::reedSolomonComputeRemainder(const vector &data, const vector &divisor) {
+ vector result(divisor.size());
+ for (uint8_t b : data) { // Polynomial division
+ uint8_t factor = b ^ result.at(0);
+ result.erase(result.begin());
+ result.push_back(0);
+ for (size_t i = 0; i < result.size(); i++)
+ result.at(i) ^= reedSolomonMultiply(divisor.at(i), factor);
+ }
+ return result;
+}
+
+
+uint8_t QrCode::reedSolomonMultiply(uint8_t x, uint8_t y) {
+ // Russian peasant multiplication
+ int z = 0;
+ for (int i = 7; i >= 0; i--) {
+ z = (z << 1) ^ ((z >> 7) * 0x11D);
+ z ^= ((y >> i) & 1) * x;
+ }
+ if (z >> 8 != 0)
+ throw std::logic_error("Assertion error");
+ return static_cast(z);
+}
+
+
+int QrCode::finderPenaltyCountPatterns(const std::array &runHistory) const {
+ int n = runHistory.at(1);
+ if (n > size * 3)
+ throw std::logic_error("Assertion error");
+ bool core = n > 0 && runHistory.at(2) == n && runHistory.at(3) == n * 3 && runHistory.at(4) == n && runHistory.at(5) == n;
+ return (core && runHistory.at(0) >= n * 4 && runHistory.at(6) >= n ? 1 : 0)
+ + (core && runHistory.at(6) >= n * 4 && runHistory.at(0) >= n ? 1 : 0);
+}
+
+
+int QrCode::finderPenaltyTerminateAndCount(bool currentRunColor, int currentRunLength, std::array &runHistory) const {
+ if (currentRunColor) { // Terminate black run
+ finderPenaltyAddHistory(currentRunLength, runHistory);
+ currentRunLength = 0;
+ }
+ currentRunLength += size; // Add white border to final run
+ finderPenaltyAddHistory(currentRunLength, runHistory);
+ return finderPenaltyCountPatterns(runHistory);
+}
+
+
+void QrCode::finderPenaltyAddHistory(int currentRunLength, std::array &runHistory) {
+ std::copy_backward(runHistory.cbegin(), runHistory.cend() - 1, runHistory.end());
+ runHistory.at(0) = currentRunLength;
+}
+
+
+bool QrCode::getBit(long x, int i) {
+ return ((x >> i) & 1) != 0;
+}
+
+
+/*---- Tables of constants ----*/
+
+const int QrCode::PENALTY_N1 = 3;
+const int QrCode::PENALTY_N2 = 3;
+const int QrCode::PENALTY_N3 = 40;
+const int QrCode::PENALTY_N4 = 10;
+
+
+const int8_t QrCode::ECC_CODEWORDS_PER_BLOCK[4][41] = {
+ // Version: (note that index 0 is for padding, and is set to an illegal value)
+ //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
+ {-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, // Low
+ {-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28}, // Medium
+ {-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, // Quartile
+ {-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30}, // High
+};
+
+const int8_t QrCode::NUM_ERROR_CORRECTION_BLOCKS[4][41] = {
+ // Version: (note that index 0 is for padding, and is set to an illegal value)
+ //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
+ {-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25}, // Low
+ {-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49}, // Medium
+ {-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68}, // Quartile
+ {-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81}, // High
+};
+
+
+data_too_long::data_too_long(const std::string &msg) :
+ std::length_error(msg) {}
+
+}
diff --git a/submodules/QrCode/Sources/QrCode.hpp b/submodules/QrCode/Sources/QrCode.hpp
new file mode 100755
index 0000000000..8ad519f3f4
--- /dev/null
+++ b/submodules/QrCode/Sources/QrCode.hpp
@@ -0,0 +1,350 @@
+/*
+ * QR Code generator library (C++)
+ *
+ * Copyright (c) Project Nayuki. (MIT License)
+ * https://www.nayuki.io/page/qr-code-generator-library
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * - The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * - The Software is provided "as is", without warranty of any kind, express or
+ * implied, including but not limited to the warranties of merchantability,
+ * fitness for a particular purpose and noninfringement. In no event shall the
+ * authors or copyright holders be liable for any claim, damages or other
+ * liability, whether in an action of contract, tort or otherwise, arising from,
+ * out of or in connection with the Software or the use or other dealings in the
+ * Software.
+ */
+
+#pragma once
+
+#include
+#include
+#include
+#include
+#include
+#include "QrSegment.hpp"
+
+
+namespace qrcodegen {
+
+/*
+ * A QR Code symbol, which is a type of two-dimension barcode.
+ * Invented by Denso Wave and described in the ISO/IEC 18004 standard.
+ * Instances of this class represent an immutable square grid of black and white cells.
+ * The class provides static factory functions to create a QR Code from text or binary data.
+ * The class covers the QR Code Model 2 specification, supporting all versions (sizes)
+ * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.
+ *
+ * Ways to create a QR Code object:
+ * - High level: Take the payload data and call QrCode::encodeText() or QrCode::encodeBinary().
+ * - Mid level: Custom-make the list of segments and call QrCode::encodeSegments().
+ * - Low level: Custom-make the array of data codeword bytes (including
+ * segment headers and final padding, excluding error correction codewords),
+ * supply the appropriate version number, and call the QrCode() constructor.
+ * (Note that all ways require supplying the desired error correction level.)
+ */
+class QrCode final {
+
+ /*---- Public helper enumeration ----*/
+
+ /*
+ * The error correction level in a QR Code symbol.
+ */
+ public: enum class Ecc {
+ LOW = 0 , // The QR Code can tolerate about 7% erroneous codewords
+ MEDIUM , // The QR Code can tolerate about 15% erroneous codewords
+ QUARTILE, // The QR Code can tolerate about 25% erroneous codewords
+ HIGH , // The QR Code can tolerate about 30% erroneous codewords
+ };
+
+
+ // Returns a value in the range 0 to 3 (unsigned 2-bit integer).
+ private: static int getFormatBits(Ecc ecl);
+
+
+
+ /*---- Static factory functions (high level) ----*/
+
+ /*
+ * Returns a QR Code representing the given Unicode text string at the given error correction level.
+ * As a conservative upper bound, this function is guaranteed to succeed for strings that have 2953 or fewer
+ * UTF-8 code units (not Unicode code points) if the low error correction level is used. The smallest possible
+ * QR Code version is automatically chosen for the output. The ECC level of the result may be higher than
+ * the ecl argument if it can be done without increasing the version.
+ */
+ public: static QrCode encodeText(const char *text, Ecc ecl);
+
+
+ /*
+ * Returns a QR Code representing the given binary data at the given error correction level.
+ * This function always encodes using the binary segment mode, not any text mode. The maximum number of
+ * bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.
+ * The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
+ */
+ public: static QrCode encodeBinary(const std::vector &data, Ecc ecl);
+
+
+ /*---- Static factory functions (mid level) ----*/
+
+ /*
+ * Returns a QR Code representing the given segments with the given encoding parameters.
+ * The smallest possible QR Code version within the given range is automatically
+ * chosen for the output. Iff boostEcl is true, then the ECC level of the result
+ * may be higher than the ecl argument if it can be done without increasing the
+ * version. The mask number is either between 0 to 7 (inclusive) to force that
+ * mask, or -1 to automatically choose an appropriate mask (which may be slow).
+ * This function allows the user to create a custom sequence of segments that switches
+ * between modes (such as alphanumeric and byte) to encode text in less space.
+ * This is a mid-level API; the high-level API is encodeText() and encodeBinary().
+ */
+ public: static QrCode encodeSegments(const std::vector &segs, Ecc ecl,
+ int minVersion=1, int maxVersion=40, int mask=-1, bool boostEcl=true); // All optional parameters
+
+
+
+ /*---- Instance fields ----*/
+
+ // Immutable scalar parameters:
+
+ /* The version number of this QR Code, which is between 1 and 40 (inclusive).
+ * This determines the size of this barcode. */
+ private: int version;
+
+ /* The width and height of this QR Code, measured in modules, between
+ * 21 and 177 (inclusive). This is equal to version * 4 + 17. */
+ private: int size;
+
+ /* The error correction level used in this QR Code. */
+ private: Ecc errorCorrectionLevel;
+
+ /* The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).
+ * Even if a QR Code is created with automatic masking requested (mask = -1),
+ * the resulting object still has a mask value between 0 and 7. */
+ private: int mask;
+
+ // Private grids of modules/pixels, with dimensions of size*size:
+
+ // The modules of this QR Code (false = white, true = black).
+ // Immutable after constructor finishes. Accessed through getModule().
+ private: std::vector > modules;
+
+ // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.
+ private: std::vector > isFunction;
+
+
+
+ /*---- Constructor (low level) ----*/
+
+ /*
+ * Creates a new QR Code with the given version number,
+ * error correction level, data codeword bytes, and mask number.
+ * This is a low-level API that most users should not use directly.
+ * A mid-level API is the encodeSegments() function.
+ */
+ public: QrCode(int ver, Ecc ecl, const std::vector &dataCodewords, int mask);
+
+
+
+ /*---- Public instance methods ----*/
+
+ /*
+ * Returns this QR Code's version, in the range [1, 40].
+ */
+ public: int getVersion() const;
+
+
+ /*
+ * Returns this QR Code's size, in the range [21, 177].
+ */
+ public: int getSize() const;
+
+
+ /*
+ * Returns this QR Code's error correction level.
+ */
+ public: Ecc getErrorCorrectionLevel() const;
+
+
+ /*
+ * Returns this QR Code's mask, in the range [0, 7].
+ */
+ public: int getMask() const;
+
+
+ /*
+ * Returns the color of the module (pixel) at the given coordinates, which is false
+ * for white or true for black. The top left corner has the coordinates (x=0, y=0).
+ * If the given coordinates are out of bounds, then false (white) is returned.
+ */
+ public: bool getModule(int x, int y) const;
+
+
+ /*
+ * Returns a string of SVG code for an image depicting this QR Code, with the given number
+ * of border modules. The string always uses Unix newlines (\n), regardless of the platform.
+ */
+ public: std::string toSvgString(int border) const;
+
+
+
+ /*---- Private helper methods for constructor: Drawing function modules ----*/
+
+ // Reads this object's version field, and draws and marks all function modules.
+ private: void drawFunctionPatterns();
+
+
+ // Draws two copies of the format bits (with its own error correction code)
+ // based on the given mask and this object's error correction level field.
+ private: void drawFormatBits(int mask);
+
+
+ // Draws two copies of the version bits (with its own error correction code),
+ // based on this object's version field, iff 7 <= version <= 40.
+ private: void drawVersion();
+
+
+ // Draws a 9*9 finder pattern including the border separator,
+ // with the center module at (x, y). Modules can be out of bounds.
+ private: void drawFinderPattern(int x, int y);
+
+
+ // Draws a 5*5 alignment pattern, with the center module
+ // at (x, y). All modules must be in bounds.
+ private: void drawAlignmentPattern(int x, int y);
+
+
+ // Sets the color of a module and marks it as a function module.
+ // Only used by the constructor. Coordinates must be in bounds.
+ private: void setFunctionModule(int x, int y, bool isBlack);
+
+
+ // Returns the color of the module at the given coordinates, which must be in range.
+ private: bool module(int x, int y) const;
+
+
+ /*---- Private helper methods for constructor: Codewords and masking ----*/
+
+ // Returns a new byte string representing the given data with the appropriate error correction
+ // codewords appended to it, based on this object's version and error correction level.
+ private: std::vector addEccAndInterleave(const std::vector &data) const;
+
+
+ // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
+ // data area of this QR Code. Function modules need to be marked off before this is called.
+ private: void drawCodewords(const std::vector &data);
+
+
+ // XORs the codeword modules in this QR Code with the given mask pattern.
+ // The function modules must be marked and the codeword bits must be drawn
+ // before masking. Due to the arithmetic of XOR, calling applyMask() with
+ // the same mask value a second time will undo the mask. A final well-formed
+ // QR Code needs exactly one (not zero, two, etc.) mask applied.
+ private: void applyMask(int mask);
+
+
+ // Calculates and returns the penalty score based on state of this QR Code's current modules.
+ // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.
+ private: long getPenaltyScore() const;
+
+
+
+ /*---- Private helper functions ----*/
+
+ // Returns an ascending list of positions of alignment patterns for this version number.
+ // Each position is in the range [0,177), and are used on both the x and y axes.
+ // This could be implemented as lookup table of 40 variable-length lists of unsigned bytes.
+ private: std::vector getAlignmentPatternPositions() const;
+
+
+ // Returns the number of data bits that can be stored in a QR Code of the given version number, after
+ // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
+ // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
+ private: static int getNumRawDataModules(int ver);
+
+
+ // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any
+ // QR Code of the given version number and error correction level, with remainder bits discarded.
+ // This stateless pure function could be implemented as a (40*4)-cell lookup table.
+ private: static int getNumDataCodewords(int ver, Ecc ecl);
+
+
+ // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
+ // implemented as a lookup table over all possible parameter values, instead of as an algorithm.
+ private: static std::vector reedSolomonComputeDivisor(int degree);
+
+
+ // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.
+ private: static std::vector reedSolomonComputeRemainder(const std::vector &data, const std::vector &divisor);
+
+
+ // Returns the product of the two given field elements modulo GF(2^8/0x11D).
+ // All inputs are valid. This could be implemented as a 256*256 lookup table.
+ private: static std::uint8_t reedSolomonMultiply(std::uint8_t x, std::uint8_t y);
+
+
+ // Can only be called immediately after a white run is added, and
+ // returns either 0, 1, or 2. A helper function for getPenaltyScore().
+ private: int finderPenaltyCountPatterns(const std::array &runHistory) const;
+
+
+ // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().
+ private: int finderPenaltyTerminateAndCount(bool currentRunColor, int currentRunLength, std::array &runHistory) const;
+
+
+ // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().
+ private: static void finderPenaltyAddHistory(int currentRunLength, std::array &runHistory);
+
+
+ // Returns true iff the i'th bit of x is set to 1.
+ private: static bool getBit(long x, int i);
+
+
+ /*---- Constants and tables ----*/
+
+ // The minimum version number supported in the QR Code Model 2 standard.
+ public: static constexpr int MIN_VERSION = 1;
+
+ // The maximum version number supported in the QR Code Model 2 standard.
+ public: static constexpr int MAX_VERSION = 40;
+
+
+ // For use in getPenaltyScore(), when evaluating which mask is best.
+ private: static const int PENALTY_N1;
+ private: static const int PENALTY_N2;
+ private: static const int PENALTY_N3;
+ private: static const int PENALTY_N4;
+
+
+ private: static const std::int8_t ECC_CODEWORDS_PER_BLOCK[4][41];
+ private: static const std::int8_t NUM_ERROR_CORRECTION_BLOCKS[4][41];
+
+};
+
+
+
+/*---- Public exception class ----*/
+
+/*
+ * Thrown when the supplied data does not fit any QR Code version. Ways to handle this exception include:
+ * - Decrease the error correction level if it was greater than Ecc::LOW.
+ * - If the encodeSegments() function was called with a maxVersion argument, then increase
+ * it if it was less than QrCode::MAX_VERSION. (This advice does not apply to the other
+ * factory functions because they search all versions up to QrCode::MAX_VERSION.)
+ * - Split the text data into better or optimal segments in order to reduce the number of bits required.
+ * - Change the text or binary data to be shorter.
+ * - Change the text to fit the character set of a particular segment mode (e.g. alphanumeric).
+ * - Propagate the error upward to the caller/user.
+ */
+class data_too_long : public std::length_error {
+
+ public: explicit data_too_long(const std::string &msg);
+
+};
+
+}
diff --git a/submodules/QrCode/Sources/QRCode.swift b/submodules/QrCode/Sources/QrCode.swift
similarity index 52%
rename from submodules/QrCode/Sources/QRCode.swift
rename to submodules/QrCode/Sources/QrCode.swift
index 9475cd4e44..521fc7fe88 100644
--- a/submodules/QrCode/Sources/QRCode.swift
+++ b/submodules/QrCode/Sources/QrCode.swift
@@ -4,11 +4,17 @@ import CoreImage
import SwiftSignalKit
import Display
-public func qrCode(string: String, color: UIColor, backgroundColor: UIColor? = nil, scale: CGFloat = 0.0) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
+public enum QrCodeIcon {
+ case none
+ case proxy
+ case custom(UIImage?)
+}
+
+public func qrCode(string: String, color: UIColor, backgroundColor: UIColor? = nil, icon: QrCodeIcon, ecl: String = "M", scale: CGFloat = 0.0) -> Signal<(TransformImageArguments) -> DrawingContext?, NoError> {
return Signal { subscriber in
if let data = string.data(using: .isoLatin1, allowLossyConversion: false), let filter = CIFilter(name: "CIQRCodeGenerator") {
filter.setValue(data, forKey: "inputMessage")
- filter.setValue("M", forKey: "inputCorrectionLevel")
+ filter.setValue(ecl, forKey: "inputCorrectionLevel")
if let output = filter.outputImage {
subscriber.putNext(output)
@@ -67,28 +73,50 @@ public func qrCode(string: String, color: UIColor, backgroundColor: UIColor? = n
}
let clipSide = 81.0 * fittedRect.width / 267.0 * codeScale
- c.fill(CGRect(x: fittedRect.midX - clipSide / 2.0, y: fittedRect.midY - clipSide / 2.0, width: clipSide, height: clipSide))
- c.setBlendMode(.normal)
-
- let iconScale = fittedRect.width / 308.0 * codeScale
- let iconSize = CGSize(width: 65.0 * iconScale, height: 79.0 * iconScale)
- let point = CGPoint(x: fittedRect.midX - iconSize.width / 2.0, y: fittedRect.midY - iconSize.height / 2.0)
- c.translateBy(x: point.x, y: point.y)
- c.scaleBy(x: iconScale, y: iconScale)
- c.setFillColor(color.cgColor)
- let _ = try? drawSvgPath(c, path: "M0.0,40 C0,20.3664202 20.1230605,0.0 32.5,0.0 C44.8769395,0.0 65,20.3664202 65,40 C65,47.217934 65,55.5505326 65,64.9977957 L32.5,79 L0.0,64.9977957 C0.0,55.0825772 0.0,46.7499786 0.0,40 Z")
-
- if let backgroundColor = backgroundColor {
- c.setFillColor(backgroundColor.cgColor)
- } else {
- c.setBlendMode(.clear)
- c.setFillColor(UIColor.clear.cgColor)
+ let clipRect = CGRect(x: fittedRect.midX - clipSide / 2.0, y: fittedRect.midY - clipSide / 2.0, width: clipSide, height: clipSide)
+ switch icon {
+ case .proxy, .custom:
+ c.fill(clipRect)
+ default:
+ break
}
- let _ = try? drawSvgPath(c, path: "M7.03608247,43.556701 L18.9836689,32.8350515 L32.5,39.871134 L45.8888139,32.8350515 L57.9639175,43.556701 L57.9639175,60.0 L32.5,71.0 L7.03608247,60.0 Z")
-
+
c.setBlendMode(.normal)
- c.setFillColor(color.cgColor)
- let _ = try? drawSvgPath(c, path: "M24.1237113,50.5927835 L40.8762887,50.5927835 L40.8762887,60.9793814 L32.5,64.0928525 L24.1237113,60.9793814 Z")
+
+ switch icon {
+ case .proxy:
+ let iconScale = fittedRect.width / 308.0 * codeScale
+ let iconSize = CGSize(width: 65.0 * iconScale, height: 79.0 * iconScale)
+ let point = CGPoint(x: fittedRect.midX - iconSize.width / 2.0, y: fittedRect.midY - iconSize.height / 2.0)
+ c.translateBy(x: point.x, y: point.y)
+ c.scaleBy(x: iconScale, y: iconScale)
+ c.setFillColor(color.cgColor)
+ let _ = try? drawSvgPath(c, path: "M0.0,40 C0,20.3664202 20.1230605,0.0 32.5,0.0 C44.8769395,0.0 65,20.3664202 65,40 C65,47.217934 65,55.5505326 65,64.9977957 L32.5,79 L0.0,64.9977957 C0.0,55.0825772 0.0,46.7499786 0.0,40 Z")
+
+ if let backgroundColor = backgroundColor {
+ c.setFillColor(backgroundColor.cgColor)
+ } else {
+ c.setBlendMode(.clear)
+ c.setFillColor(UIColor.clear.cgColor)
+ }
+ let _ = try? drawSvgPath(c, path: "M7.03608247,43.556701 L18.9836689,32.8350515 L32.5,39.871134 L45.8888139,32.8350515 L57.9639175,43.556701 L57.9639175,60.0 L32.5,71.0 L7.03608247,60.0 Z")
+
+ c.setBlendMode(.normal)
+ c.setFillColor(color.cgColor)
+ let _ = try? drawSvgPath(c, path: "M24.1237113,50.5927835 L40.8762887,50.5927835 L40.8762887,60.9793814 L32.5,64.0928525 L24.1237113,60.9793814 Z")
+ case let .custom(image):
+ if let image = image {
+ let fittedSize = image.size.fitted(clipRect.size)
+ let fittedRect = CGRect(origin: CGPoint(x: fittedRect.midX - fittedSize.width / 2.0, y: fittedRect.midY - fittedSize.height / 2.0), size: fittedSize)
+ c.translateBy(x: fittedRect.midX, y: fittedRect.midY)
+ c.scaleBy(x: 1.0, y: -1.0)
+ c.translateBy(x: -fittedRect.midX, y: -fittedRect.midY)
+ c.draw(image.cgImage!, in: fittedRect)
+ }
+ break
+ default:
+ break
+ }
}
return context
}
diff --git a/submodules/QrCode/Sources/QrCodeInstance.h b/submodules/QrCode/Sources/QrCodeInstance.h
new file mode 100755
index 0000000000..791ec4a5af
--- /dev/null
+++ b/submodules/QrCode/Sources/QrCodeInstance.h
@@ -0,0 +1,18 @@
+#ifndef QrCodeInstance_h
+#define QrCodeInstance_h
+
+#import
+#import
+
+@interface QrCodeInstance : NSObject
+
+@property (nonatomic, readonly) NSString *string;
+@property (nonatomic, readonly) int32_t size;
+
+- (instancetype _Nullable)initWithStirng:(NSString * _Nonnull)string;
+
+- (BOOL)getModuleAtX:(int32_t)x y:(int32_t)y;
+
+@end
+
+#endif /* QrCodeInstance_h */
diff --git a/submodules/QrCode/Sources/QrCodeInstance.mm b/submodules/QrCode/Sources/QrCodeInstance.mm
new file mode 100755
index 0000000000..7c38129a48
--- /dev/null
+++ b/submodules/QrCode/Sources/QrCodeInstance.mm
@@ -0,0 +1,28 @@
+#import "QrCodeInstance.h"
+
+#include "QrCode.hpp"
+
+@interface QrCodeInstance () {
+ std::unique_ptr _qrCode;
+}
+@end
+
+@implementation QrCodeInstance
+
+- (instancetype _Nullable)initWithStirng:(NSString * _Nonnull)string {
+ self = [super init];
+ if (self != nil) {
+ _qrCode = std::make_unique(qrcodegen::QrCode::encodeText(string.UTF8String, qrcodegen::QrCode::Ecc::MEDIUM));
+ }
+ return self;
+}
+
+- (int32_t)size {
+ return _qrCode->getSize()
+}
+
+- (BOOL)getModuleAtX:(int32_t)x y:(int32_t)y {
+ return _qrCode->getModule(x, y);
+}
+
+@end
diff --git a/submodules/QrCode/Sources/QrSegment.cpp b/submodules/QrCode/Sources/QrSegment.cpp
new file mode 100755
index 0000000000..45ea8433fa
--- /dev/null
+++ b/submodules/QrCode/Sources/QrSegment.cpp
@@ -0,0 +1,225 @@
+/*
+ * QR Code generator library (C++)
+ *
+ * Copyright (c) Project Nayuki. (MIT License)
+ * https://www.nayuki.io/page/qr-code-generator-library
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * - The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * - The Software is provided "as is", without warranty of any kind, express or
+ * implied, including but not limited to the warranties of merchantability,
+ * fitness for a particular purpose and noninfringement. In no event shall the
+ * authors or copyright holders be liable for any claim, damages or other
+ * liability, whether in an action of contract, tort or otherwise, arising from,
+ * out of or in connection with the Software or the use or other dealings in the
+ * Software.
+ */
+
+#include
+#include
+#include
+#include
+#include "QrSegment.hpp"
+
+using std::uint8_t;
+using std::vector;
+
+
+namespace qrcodegen {
+
+QrSegment::Mode::Mode(int mode, int cc0, int cc1, int cc2) :
+ modeBits(mode) {
+ numBitsCharCount[0] = cc0;
+ numBitsCharCount[1] = cc1;
+ numBitsCharCount[2] = cc2;
+}
+
+
+int QrSegment::Mode::getModeBits() const {
+ return modeBits;
+}
+
+
+int QrSegment::Mode::numCharCountBits(int ver) const {
+ return numBitsCharCount[(ver + 7) / 17];
+}
+
+
+const QrSegment::Mode QrSegment::Mode::NUMERIC (0x1, 10, 12, 14);
+const QrSegment::Mode QrSegment::Mode::ALPHANUMERIC(0x2, 9, 11, 13);
+const QrSegment::Mode QrSegment::Mode::BYTE (0x4, 8, 16, 16);
+const QrSegment::Mode QrSegment::Mode::KANJI (0x8, 8, 10, 12);
+const QrSegment::Mode QrSegment::Mode::ECI (0x7, 0, 0, 0);
+
+
+
+QrSegment QrSegment::makeBytes(const vector &data) {
+ if (data.size() > static_cast(INT_MAX))
+ throw std::length_error("Data too long");
+ BitBuffer bb;
+ for (uint8_t b : data)
+ bb.appendBits(b, 8);
+ return QrSegment(Mode::BYTE, static_cast(data.size()), std::move(bb));
+}
+
+
+QrSegment QrSegment::makeNumeric(const char *digits) {
+ BitBuffer bb;
+ int accumData = 0;
+ int accumCount = 0;
+ int charCount = 0;
+ for (; *digits != '\0'; digits++, charCount++) {
+ char c = *digits;
+ if (c < '0' || c > '9')
+ throw std::domain_error("String contains non-numeric characters");
+ accumData = accumData * 10 + (c - '0');
+ accumCount++;
+ if (accumCount == 3) {
+ bb.appendBits(static_cast(accumData), 10);
+ accumData = 0;
+ accumCount = 0;
+ }
+ }
+ if (accumCount > 0) // 1 or 2 digits remaining
+ bb.appendBits(static_cast(accumData), accumCount * 3 + 1);
+ return QrSegment(Mode::NUMERIC, charCount, std::move(bb));
+}
+
+
+QrSegment QrSegment::makeAlphanumeric(const char *text) {
+ BitBuffer bb;
+ int accumData = 0;
+ int accumCount = 0;
+ int charCount = 0;
+ for (; *text != '\0'; text++, charCount++) {
+ const char *temp = std::strchr(ALPHANUMERIC_CHARSET, *text);
+ if (temp == nullptr)
+ throw std::domain_error("String contains unencodable characters in alphanumeric mode");
+ accumData = accumData * 45 + static_cast(temp - ALPHANUMERIC_CHARSET);
+ accumCount++;
+ if (accumCount == 2) {
+ bb.appendBits(static_cast(accumData), 11);
+ accumData = 0;
+ accumCount = 0;
+ }
+ }
+ if (accumCount > 0) // 1 character remaining
+ bb.appendBits(static_cast(accumData), 6);
+ return QrSegment(Mode::ALPHANUMERIC, charCount, std::move(bb));
+}
+
+
+vector QrSegment::makeSegments(const char *text) {
+ // Select the most efficient segment encoding automatically
+ vector result;
+ if (*text == '\0'); // Leave result empty
+ else if (isNumeric(text))
+ result.push_back(makeNumeric(text));
+ else if (isAlphanumeric(text))
+ result.push_back(makeAlphanumeric(text));
+ else {
+ vector bytes;
+ for (; *text != '\0'; text++)
+ bytes.push_back(static_cast(*text));
+ result.push_back(makeBytes(bytes));
+ }
+ return result;
+}
+
+
+QrSegment QrSegment::makeEci(long assignVal) {
+ BitBuffer bb;
+ if (assignVal < 0)
+ throw std::domain_error("ECI assignment value out of range");
+ else if (assignVal < (1 << 7))
+ bb.appendBits(static_cast(assignVal), 8);
+ else if (assignVal < (1 << 14)) {
+ bb.appendBits(2, 2);
+ bb.appendBits(static_cast(assignVal), 14);
+ } else if (assignVal < 1000000L) {
+ bb.appendBits(6, 3);
+ bb.appendBits(static_cast(assignVal), 21);
+ } else
+ throw std::domain_error("ECI assignment value out of range");
+ return QrSegment(Mode::ECI, 0, std::move(bb));
+}
+
+
+QrSegment::QrSegment(Mode md, int numCh, const std::vector &dt) :
+ mode(md),
+ numChars(numCh),
+ data(dt) {
+ if (numCh < 0)
+ throw std::domain_error("Invalid value");
+}
+
+
+QrSegment::QrSegment(Mode md, int numCh, std::vector &&dt) :
+ mode(md),
+ numChars(numCh),
+ data(std::move(dt)) {
+ if (numCh < 0)
+ throw std::domain_error("Invalid value");
+}
+
+
+int QrSegment::getTotalBits(const vector &segs, int version) {
+ int result = 0;
+ for (const QrSegment &seg : segs) {
+ int ccbits = seg.mode.numCharCountBits(version);
+ if (seg.numChars >= (1L << ccbits))
+ return -1; // The segment's length doesn't fit the field's bit width
+ if (4 + ccbits > INT_MAX - result)
+ return -1; // The sum will overflow an int type
+ result += 4 + ccbits;
+ if (seg.data.size() > static_cast(INT_MAX - result))
+ return -1; // The sum will overflow an int type
+ result += static_cast(seg.data.size());
+ }
+ return result;
+}
+
+
+bool QrSegment::isAlphanumeric(const char *text) {
+ for (; *text != '\0'; text++) {
+ if (std::strchr(ALPHANUMERIC_CHARSET, *text) == nullptr)
+ return false;
+ }
+ return true;
+}
+
+
+bool QrSegment::isNumeric(const char *text) {
+ for (; *text != '\0'; text++) {
+ char c = *text;
+ if (c < '0' || c > '9')
+ return false;
+ }
+ return true;
+}
+
+
+QrSegment::Mode QrSegment::getMode() const {
+ return mode;
+}
+
+
+int QrSegment::getNumChars() const {
+ return numChars;
+}
+
+
+const std::vector &QrSegment::getData() const {
+ return data;
+}
+
+
+const char *QrSegment::ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";
+
+}
diff --git a/submodules/QrCode/Sources/QrSegment.hpp b/submodules/QrCode/Sources/QrSegment.hpp
new file mode 100755
index 0000000000..663b8bba3a
--- /dev/null
+++ b/submodules/QrCode/Sources/QrSegment.hpp
@@ -0,0 +1,216 @@
+/*
+ * QR Code generator library (C++)
+ *
+ * Copyright (c) Project Nayuki. (MIT License)
+ * https://www.nayuki.io/page/qr-code-generator-library
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+ * the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * - The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * - The Software is provided "as is", without warranty of any kind, express or
+ * implied, including but not limited to the warranties of merchantability,
+ * fitness for a particular purpose and noninfringement. In no event shall the
+ * authors or copyright holders be liable for any claim, damages or other
+ * liability, whether in an action of contract, tort or otherwise, arising from,
+ * out of or in connection with the Software or the use or other dealings in the
+ * Software.
+ */
+
+#pragma once
+
+#include
+#include
+#include "BitBuffer.hpp"
+
+
+namespace qrcodegen {
+
+/*
+ * A segment of character/binary/control data in a QR Code symbol.
+ * Instances of this class are immutable.
+ * The mid-level way to create a segment is to take the payload data
+ * and call a static factory function such as QrSegment::makeNumeric().
+ * The low-level way to create a segment is to custom-make the bit buffer
+ * and call the QrSegment() constructor with appropriate values.
+ * This segment class imposes no length restrictions, but QR Codes have restrictions.
+ * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
+ * Any segment longer than this is meaningless for the purpose of generating QR Codes.
+ */
+class QrSegment final {
+
+ /*---- Public helper enumeration ----*/
+
+ /*
+ * Describes how a segment's data bits are interpreted. Immutable.
+ */
+ public: class Mode final {
+
+ /*-- Constants --*/
+
+ public: static const Mode NUMERIC;
+ public: static const Mode ALPHANUMERIC;
+ public: static const Mode BYTE;
+ public: static const Mode KANJI;
+ public: static const Mode ECI;
+
+
+ /*-- Fields --*/
+
+ // The mode indicator bits, which is a uint4 value (range 0 to 15).
+ private: int modeBits;
+
+ // Number of character count bits for three different version ranges.
+ private: int numBitsCharCount[3];
+
+
+ /*-- Constructor --*/
+
+ private: Mode(int mode, int cc0, int cc1, int cc2);
+
+
+ /*-- Methods --*/
+
+ /*
+ * (Package-private) Returns the mode indicator bits, which is an unsigned 4-bit value (range 0 to 15).
+ */
+ public: int getModeBits() const;
+
+ /*
+ * (Package-private) Returns the bit width of the character count field for a segment in
+ * this mode in a QR Code at the given version number. The result is in the range [0, 16].
+ */
+ public: int numCharCountBits(int ver) const;
+
+ };
+
+
+
+ /*---- Static factory functions (mid level) ----*/
+
+ /*
+ * Returns a segment representing the given binary data encoded in
+ * byte mode. All input byte vectors are acceptable. Any text string
+ * can be converted to UTF-8 bytes and encoded as a byte mode segment.
+ */
+ public: static QrSegment makeBytes(const std::vector &data);
+
+
+ /*
+ * Returns a segment representing the given string of decimal digits encoded in numeric mode.
+ */
+ public: static QrSegment makeNumeric(const char *digits);
+
+
+ /*
+ * Returns a segment representing the given text string encoded in alphanumeric mode.
+ * The characters allowed are: 0 to 9, A to Z (uppercase only), space,
+ * dollar, percent, asterisk, plus, hyphen, period, slash, colon.
+ */
+ public: static QrSegment makeAlphanumeric(const char *text);
+
+
+ /*
+ * Returns a list of zero or more segments to represent the given text string. The result
+ * may use various segment modes and switch modes to optimize the length of the bit stream.
+ */
+ public: static std::vector makeSegments(const char *text);
+
+
+ /*
+ * Returns a segment representing an Extended Channel Interpretation
+ * (ECI) designator with the given assignment value.
+ */
+ public: static QrSegment makeEci(long assignVal);
+
+
+ /*---- Public static helper functions ----*/
+
+ /*
+ * Tests whether the given string can be encoded as a segment in alphanumeric mode.
+ * A string is encodable iff each character is in the following set: 0 to 9, A to Z
+ * (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
+ */
+ public: static bool isAlphanumeric(const char *text);
+
+
+ /*
+ * Tests whether the given string can be encoded as a segment in numeric mode.
+ * A string is encodable iff each character is in the range 0 to 9.
+ */
+ public: static bool isNumeric(const char *text);
+
+
+
+ /*---- Instance fields ----*/
+
+ /* The mode indicator of this segment. Accessed through getMode(). */
+ private: Mode mode;
+
+ /* The length of this segment's unencoded data. Measured in characters for
+ * numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.
+ * Always zero or positive. Not the same as the data's bit length.
+ * Accessed through getNumChars(). */
+ private: int numChars;
+
+ /* The data bits of this segment. Accessed through getData(). */
+ private: std::vector data;
+
+
+ /*---- Constructors (low level) ----*/
+
+ /*
+ * Creates a new QR Code segment with the given attributes and data.
+ * The character count (numCh) must agree with the mode and the bit buffer length,
+ * but the constraint isn't checked. The given bit buffer is copied and stored.
+ */
+ public: QrSegment(Mode md, int numCh, const std::vector &dt);
+
+
+ /*
+ * Creates a new QR Code segment with the given parameters and data.
+ * The character count (numCh) must agree with the mode and the bit buffer length,
+ * but the constraint isn't checked. The given bit buffer is moved and stored.
+ */
+ public: QrSegment(Mode md, int numCh, std::vector &&dt);
+
+
+ /*---- Methods ----*/
+
+ /*
+ * Returns the mode field of this segment.
+ */
+ public: Mode getMode() const;
+
+
+ /*
+ * Returns the character count field of this segment.
+ */
+ public: int getNumChars() const;
+
+
+ /*
+ * Returns the data bits of this segment.
+ */
+ public: const std::vector &getData() const;
+
+
+ // (Package-private) Calculates the number of bits needed to encode the given segments at
+ // the given version. Returns a non-negative number if successful. Otherwise returns -1 if a
+ // segment has too many characters to fit its length field, or the total bits exceeds INT_MAX.
+ public: static int getTotalBits(const std::vector &segs, int version);
+
+
+ /*---- Private constant ----*/
+
+ /* The set of all legal characters in alphanumeric mode, where
+ * each character value maps to the index in the string. */
+ private: static const char *ALPHANUMERIC_CHARSET;
+
+};
+
+}
diff --git a/submodules/SettingsUI/SettingsUI.xcodeproj/project.pbxproj b/submodules/SettingsUI/SettingsUI.xcodeproj/project.pbxproj
index 6fc68ad753..dbbce2fb6b 100644
--- a/submodules/SettingsUI/SettingsUI.xcodeproj/project.pbxproj
+++ b/submodules/SettingsUI/SettingsUI.xcodeproj/project.pbxproj
@@ -182,6 +182,19 @@
explicitFileType
archive.ar
+ 1DD70E29BFBD457D00000000
+
+ isa
+ PBXFileReference
+ name
+ libCamera.a
+ path
+ libCamera.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E29FD72F45600000000
isa
@@ -1539,6 +1552,7 @@
1DD70E296A100F7B00000000
1DD70E29A54A195300000000
1DD70E2938C0E4C800000000
+ 1DD70E29BFBD457D00000000
1DD70E29FD72F45600000000
1DD70E2907DC840B00000000
1DD70E297AB043C800000000
@@ -4754,6 +4768,13 @@
fileRef
1DD70E29D81471E200000000
+ E7A30F04BFBD457D00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29BFBD457D00000000
+
E7A30F04D097476500000000
isa
@@ -4889,6 +4910,7 @@
E7A30F04F18DE1D900000000
E7A30F04DA3FBAD600000000
E7A30F04D81471E200000000
+ E7A30F04BFBD457D00000000
E7A30F04D097476500000000
E7A30F04A7E1559B00000000
E7A30F04DF12291E00000000
diff --git a/submodules/SettingsUI/Sources/Data and Storage/ShareProxyServerActionSheetController.swift b/submodules/SettingsUI/Sources/Data and Storage/ShareProxyServerActionSheetController.swift
index 29c12410f7..96ca2be9b0 100644
--- a/submodules/SettingsUI/Sources/Data and Storage/ShareProxyServerActionSheetController.swift
+++ b/submodules/SettingsUI/Sources/Data and Storage/ShareProxyServerActionSheetController.swift
@@ -38,7 +38,7 @@ public final class ShareProxyServerActionSheetController: ActionSheetController
}))
items.append(ActionSheetButtonItem(title: strings.SocksProxySetup_ShareQRCode, action: { [weak self] in
self?.dismissAnimated()
- let _ = (qrCode(string: link, color: .black, backgroundColor: .white, scale: 1.0)
+ let _ = (qrCode(string: link, color: .black, backgroundColor: .white, icon: .proxy, scale: 1.0)
|> map { generator -> UIImage? in
let imageSize = CGSize(width: 512.0, height: 512.0)
let context = generator(TransformImageArguments(corners: ImageCorners(), imageSize: imageSize, boundingSize: imageSize, intrinsicInsets: UIEdgeInsets()))
@@ -126,7 +126,7 @@ private final class ProxyServerQRCodeItemNode: ActionSheetItemNode {
self.label.attributedText = NSAttributedString(string: strings.SocksProxySetup_ShareQRCodeInfo, font: ActionSheetTextNode.defaultFont, textColor: self.theme.secondaryTextColor, paragraphAlignment: .center)
self.imageNode = TransformImageNode()
- self.imageNode.setSignal(qrCode(string: link, color: .black, backgroundColor: .white), attemptSynchronously: true)
+ self.imageNode.setSignal(qrCode(string: link, color: .black, backgroundColor: .white, icon: .proxy), attemptSynchronously: true)
super.init(theme: theme)
diff --git a/submodules/SettingsUI/Sources/EditSettingsController.swift b/submodules/SettingsUI/Sources/EditSettingsController.swift
index 3fd8ed5c3d..ee04356ba7 100644
--- a/submodules/SettingsUI/Sources/EditSettingsController.swift
+++ b/submodules/SettingsUI/Sources/EditSettingsController.swift
@@ -201,8 +201,7 @@ private enum SettingsEntry: ItemListNodeEntry {
case let .bioText(theme, currentText, placeholder):
return ItemListMultilineInputItem(theme: theme, text: currentText, placeholder: placeholder, maxLength: ItemListMultilineInputItemTextLimit(value: 70, display: true), sectionId: self.section, style: .blocks, textUpdated: { updatedText in
arguments.updateBioText(currentText, updatedText)
- }, tag: EditSettingsEntryTag.bio, action: {
- })
+ }, tag: EditSettingsEntryTag.bio)
case let .bioInfo(theme, text):
return ItemListTextItem(theme: theme, text: .plain(text), sectionId: self.section)
case let .phoneNumber(theme, text, number):
diff --git a/submodules/TelegramCallsUI/Sources/CallFeedbackController.swift b/submodules/TelegramCallsUI/Sources/CallFeedbackController.swift
index e877128d18..7431144131 100644
--- a/submodules/TelegramCallsUI/Sources/CallFeedbackController.swift
+++ b/submodules/TelegramCallsUI/Sources/CallFeedbackController.swift
@@ -158,7 +158,7 @@ private enum CallFeedbackControllerEntry: ItemListNodeEntry {
case let .comment(theme, text, placeholder):
return ItemListMultilineInputItem(theme: theme, text: text, placeholder: placeholder, maxLength: nil, sectionId: self.section, style: .blocks, textUpdated: { updatedText in
arguments.updateComment(updatedText)
- }, action: {})
+ })
case let .includeLogs(theme, title, value):
return ItemListSwitchItem(theme: theme, title: title, value: value, sectionId: self.section, style: .blocks, updated: { value in
arguments.toggleIncludeLogs(value)
diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Test.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Settings/Test.imageset/Contents.json
new file mode 100644
index 0000000000..77b88f3827
--- /dev/null
+++ b/submodules/TelegramUI/Images.xcassets/Settings/Test.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "Test.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Test.imageset/Test.png b/submodules/TelegramUI/Images.xcassets/Settings/Test.imageset/Test.png
new file mode 100644
index 0000000000..ef1d2a3710
Binary files /dev/null and b/submodules/TelegramUI/Images.xcassets/Settings/Test.imageset/Test.png differ
diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Wallet/PasscodeIcon.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Settings/Wallet/PasscodeIcon.imageset/Contents.json
new file mode 100644
index 0000000000..702de074c0
--- /dev/null
+++ b/submodules/TelegramUI/Images.xcassets/Settings/Wallet/PasscodeIcon.imageset/Contents.json
@@ -0,0 +1,12 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "PasscodeIcon.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Wallet/PasscodeIcon.imageset/PasscodeIcon.pdf b/submodules/TelegramUI/Images.xcassets/Settings/Wallet/PasscodeIcon.imageset/PasscodeIcon.pdf
new file mode 100644
index 0000000000..b272a7c4b4
Binary files /dev/null and b/submodules/TelegramUI/Images.xcassets/Settings/Wallet/PasscodeIcon.imageset/PasscodeIcon.pdf differ
diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Wallet/SendingIcon.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Settings/Wallet/SendingIcon.imageset/Contents.json
new file mode 100644
index 0000000000..adf381a552
--- /dev/null
+++ b/submodules/TelegramUI/Images.xcassets/Settings/Wallet/SendingIcon.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "SendingIcon@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Wallet/SendingIcon.imageset/SendingIcon@3x.png b/submodules/TelegramUI/Images.xcassets/Settings/Wallet/SendingIcon.imageset/SendingIcon@3x.png
new file mode 100644
index 0000000000..39869786e8
Binary files /dev/null and b/submodules/TelegramUI/Images.xcassets/Settings/Wallet/SendingIcon.imageset/SendingIcon@3x.png differ
diff --git a/submodules/TelegramUI/TelegramUI/AppDelegate.swift b/submodules/TelegramUI/TelegramUI/AppDelegate.swift
index ed7d9a9fff..368743212a 100644
--- a/submodules/TelegramUI/TelegramUI/AppDelegate.swift
+++ b/submodules/TelegramUI/TelegramUI/AppDelegate.swift
@@ -70,7 +70,7 @@ private class ApplicationStatusBarHost: StatusBarHost {
}
var statusBarWindow: UIView? {
- return nil//self.application.value(forKey: "statusBarWindow") as? UIView
+ return self.application.value(forKey: "statusBarWindow") as? UIView
}
var statusBarView: UIView? {
diff --git a/submodules/TelegramUI/TelegramUI/CreateChannelController.swift b/submodules/TelegramUI/TelegramUI/CreateChannelController.swift
index 3849e891d0..e2b2f560e3 100644
--- a/submodules/TelegramUI/TelegramUI/CreateChannelController.swift
+++ b/submodules/TelegramUI/TelegramUI/CreateChannelController.swift
@@ -146,8 +146,6 @@ private enum CreateChannelEntry: ItemListNodeEntry {
case let .descriptionSetup(theme, text, value):
return ItemListMultilineInputItem(theme: theme, text: value, placeholder: text, maxLength: ItemListMultilineInputItemTextLimit(value: 255, display: true), sectionId: self.section, style: .blocks, textUpdated: { updatedText in
arguments.updateEditingDescriptionText(updatedText)
- }, action: {
-
})
case let .descriptionInfo(theme, text):
return ItemListTextItem(theme: theme, text: .plain(text), sectionId: self.section)
diff --git a/submodules/TelegramUpdateUI/Sources/UpdateInfoController.swift b/submodules/TelegramUpdateUI/Sources/UpdateInfoController.swift
index 5e6b683696..8c4a1f8495 100644
--- a/submodules/TelegramUpdateUI/Sources/UpdateInfoController.swift
+++ b/submodules/TelegramUpdateUI/Sources/UpdateInfoController.swift
@@ -135,7 +135,7 @@ public func updateInfoController(context: AccountContext, appUpdateInfo: AppUpda
}
dismissImpl = { [weak controller] in
controller?.view.endEditing(true)
- controller?.dismiss()
+ controller?.presentingViewController?.dismiss(animated: true, completion: nil)
}
return controller
}
diff --git a/submodules/TextFormat/Sources/StringPadding.swift b/submodules/TextFormat/Sources/StringPadding.swift
new file mode 100644
index 0000000000..25c0b5fdd6
--- /dev/null
+++ b/submodules/TextFormat/Sources/StringPadding.swift
@@ -0,0 +1,17 @@
+import Foundation
+
+public extension String {
+ func rightJustified(width: Int, pad: String = " ", truncate: Bool = false) -> String {
+ guard width > count else {
+ return truncate ? String(suffix(width)) : self
+ }
+ return String(repeating: pad, count: width - count) + self
+ }
+
+ func leftJustified(width: Int, pad: String = " ", truncate: Bool = false) -> String {
+ guard width > count else {
+ return truncate ? String(prefix(width)) : self
+ }
+ return self + String(repeating: pad, count: width - count)
+ }
+}
diff --git a/submodules/TextFormat/TextFormat.xcodeproj/project.pbxproj b/submodules/TextFormat/TextFormat.xcodeproj/project.pbxproj
index 5c70809e31..a8784728c0 100644
--- a/submodules/TextFormat/TextFormat.xcodeproj/project.pbxproj
+++ b/submodules/TextFormat/TextFormat.xcodeproj/project.pbxproj
@@ -271,6 +271,17 @@
sourceTree
SOURCE_ROOT
+ 1DD70E29C71C514500000000
+
+ isa
+ PBXFileReference
+ name
+ StringPadding.swift
+ path
+ Sources/StringPadding.swift
+ sourceTree
+ SOURCE_ROOT
+
1DD70E294ED72F2C00000000
isa
@@ -307,6 +318,7 @@
1DD70E29D54426E100000000
1DD70E294757B6A800000000
1DD70E29080E447400000000
+ 1DD70E29C71C514500000000
1DD70E294ED72F2C00000000
1DD70E29E70765FD00000000
@@ -369,6 +381,13 @@
fileRef
1DD70E29080E447400000000
+ E7A30F04C71C514500000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29C71C514500000000
+
E7A30F044ED72F2C00000000
isa
@@ -393,6 +412,7 @@
E7A30F04D54426E100000000
E7A30F044757B6A800000000
E7A30F04080E447400000000
+ E7A30F04C71C514500000000
E7A30F044ED72F2C00000000
E7A30F04E70765FD00000000
diff --git a/submodules/WalletUI/BUCK b/submodules/WalletUI/BUCK
index 72b2b7c1ac..9969005169 100644
--- a/submodules/WalletUI/BUCK
+++ b/submodules/WalletUI/BUCK
@@ -15,9 +15,15 @@ static_library(
"//submodules/OverlayStatusController:OverlayStatusController",
"//submodules/AppBundle:AppBundle",
"//submodules/SolidRoundedButtonNode:SolidRoundedButtonNode",
- "//submodules/AccountContext:AccountContext",
- "//submodules/UndoUI:UndoUI",
- "//submodules/AlertUI:AlertUI",
+ "//submodules/ItemListUI:ItemListUI",
+ "//submodules/AccountContext:AccountContext",
+ "//submodules/UndoUI:UndoUI",
+ "//submodules/AlertUI:AlertUI",
+ "//submodules/TextFormat:TextFormat",
+ "//submodules/Camera:Camera",
+ "//submodules/ShareController:ShareController",
+ "//submodules/PasscodeUI:PasscodeUI",
+ "//submodules/QrCode:QrCode",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
diff --git a/submodules/WalletUI/Sources/WalletInfoScreen.swift b/submodules/WalletUI/Sources/WalletInfoScreen.swift
index 9754906135..f2c7c3db97 100644
--- a/submodules/WalletUI/Sources/WalletInfoScreen.swift
+++ b/submodules/WalletUI/Sources/WalletInfoScreen.swift
@@ -36,6 +36,8 @@ public final class WalletInfoScreen: ViewController {
self.supportedOrientations = ViewControllerSupportedOrientations(regularSize: .all, compactSize: .portrait)
self.navigationBar?.intrinsicCanTransitionInline = false
+ self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Receive", style: .plain, target: self, action: #selector(receivePressed))
+
self.navigationItem.backBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Back, style: .plain, target: nil, action: nil)
}
@@ -47,6 +49,10 @@ public final class WalletInfoScreen: ViewController {
self.dismiss()
}
+ @objc private func receivePressed() {
+ self.push(walletReceiveScreen(context: self.context, tonContext: self.tonContext, walletInfo: self.walletInfo, address: self.address))
+ }
+
override public func loadDisplayNode() {
self.displayNode = WalletInfoScreenNode(account: self.context.account, tonContext: self.tonContext, presentationData: self.presentationData, walletInfo: self.walletInfo, address: self.address, exportAction: { [weak self] in
guard let strongSelf = self else {
@@ -57,7 +63,8 @@ public final class WalletInfoScreen: ViewController {
guard let strongSelf = self else {
return
}
- strongSelf.push(WalletWordDisplayScreen(context: strongSelf.context, tonContext: strongSelf.tonContext, walletInfo: strongSelf.walletInfo, wordList: wordList))
+ strongSelf.push(walletSendScreen(context: strongSelf.context, tonContext: strongSelf.tonContext, walletInfo: strongSelf.walletInfo))
+ //strongSelf.push(WalletWordDisplayScreen(context: strongSelf.context, tonContext: strongSelf.tonContext, walletInfo: strongSelf.walletInfo, wordList: wordList))
}, error: { _ in
guard let strongSelf = self else {
return
@@ -104,7 +111,7 @@ private final class WalletInfoScreenNode: ViewControllerTracingNode {
let title: String = address
let text: String = "..."
- let buttonText: String = "Export"
+ let buttonText: String = "Send"
self.titleNode = ImmediateTextNode()
self.titleNode.displaysAsynchronously = false
diff --git a/submodules/WalletUI/Sources/WalletPasscodeScreen.swift b/submodules/WalletUI/Sources/WalletPasscodeScreen.swift
new file mode 100644
index 0000000000..903a6d6327
--- /dev/null
+++ b/submodules/WalletUI/Sources/WalletPasscodeScreen.swift
@@ -0,0 +1,250 @@
+import Foundation
+import UIKit
+import AppBundle
+import AccountContext
+import TelegramPresentationData
+import AsyncDisplayKit
+import Display
+import Postbox
+import TelegramCore
+import AnimationUI
+import SwiftSignalKit
+import OverlayStatusController
+import PasscodeUI
+
+public enum WalletPasscodeMode {
+ case setup
+ case authorizeTransfer(WalletInfo, String, Int64, String)
+}
+
+public final class WalletPasscodeScreen: ViewController {
+ private let context: AccountContext
+ private let tonContext: TonContext
+ private var presentationData: PresentationData
+ private let mode: WalletPasscodeMode
+
+ public init(context: AccountContext, tonContext: TonContext, mode: WalletPasscodeMode) {
+ self.context = context
+ self.tonContext = tonContext
+ self.mode = mode
+
+ self.presentationData = context.sharedContext.currentPresentationData.with { $0 }
+
+ let defaultNavigationPresentationData = NavigationBarPresentationData(presentationTheme: self.presentationData.theme, presentationStrings: self.presentationData.strings)
+ let navigationBarTheme = NavigationBarTheme(buttonColor: defaultNavigationPresentationData.theme.buttonColor, disabledButtonColor: defaultNavigationPresentationData.theme.disabledButtonColor, primaryTextColor: defaultNavigationPresentationData.theme.primaryTextColor, backgroundColor: .clear, separatorColor: .clear, badgeBackgroundColor: defaultNavigationPresentationData.theme.badgeBackgroundColor, badgeStrokeColor: defaultNavigationPresentationData.theme.badgeStrokeColor, badgeTextColor: defaultNavigationPresentationData.theme.badgeTextColor)
+
+ super.init(navigationBarPresentationData: NavigationBarPresentationData(theme: navigationBarTheme, strings: defaultNavigationPresentationData.strings))
+
+ self.navigationPresentation = .modalInLargeLayout
+ self.supportedOrientations = ViewControllerSupportedOrientations(regularSize: .all, compactSize: .portrait)
+ self.navigationBar?.intrinsicCanTransitionInline = false
+
+ self.navigationItem.setLeftBarButton(UIBarButtonItem(title: self.presentationData.strings.Common_Cancel, style: .plain, target: self, action: #selector(self.backPressed)), animated: false)
+
+ self.navigationItem.backBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Back, style: .plain, target: nil, action: nil)
+ }
+
+ required init(coder aDecoder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+
+ @objc private func backPressed() {
+ self.view.endEditing(true)
+ self.dismiss()
+ }
+
+ override public func loadDisplayNode() {
+ self.displayNode = WalletPasscodeScreenNode(account: self.context.account, presentationData: self.presentationData, mode: self.mode, proceed: { [weak self] in
+ guard let strongSelf = self else {
+ return
+ }
+ switch strongSelf.mode {
+ case .setup:
+ break
+ case let .authorizeTransfer(walletInfo, address, amount, comment):
+ if let navigationController = strongSelf.navigationController as? NavigationController {
+ var controllers = navigationController.viewControllers
+ controllers = controllers.filter { controller in
+ if controller is WalletSplashScreen {
+ return false
+ }
+ if controller is WalletSendScreen {
+ return false
+ }
+ if controller is WalletPasscodeScreen {
+ return false
+ }
+ return true
+ }
+ controllers.append(WalletSplashScreen(context: strongSelf.context, tonContext: strongSelf.tonContext, mode: .sending(walletInfo, address, amount, comment)))
+ strongSelf.view.endEditing(true)
+ navigationController.setViewControllers(controllers, animated: true)
+ }
+ }
+ }, requestBiometrics: {
+
+ })
+
+ self.displayNodeDidLoad()
+ }
+
+ override public func viewWillAppear(_ animated: Bool) {
+ super.viewWillAppear(animated)
+
+ (self.displayNode as! WalletPasscodeScreenNode).activateInput()
+ }
+
+ override public func viewDidAppear(_ animated: Bool) {
+ super.viewDidAppear(animated)
+ self.view.disablesInteractiveTransitionGestureRecognizer = true
+
+ (self.displayNode as! WalletPasscodeScreenNode).activateInput()
+ }
+
+ override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
+ super.containerLayoutUpdated(layout, transition: transition)
+
+ (self.displayNode as! WalletPasscodeScreenNode).containerLayoutUpdated(layout: layout, navigationHeight: self.navigationHeight, transition: transition)
+ }
+}
+
+private final class WalletPasscodeScreenNode: ViewControllerTracingNode {
+ private var presentationData: PresentationData
+ private let mode: WalletPasscodeMode
+ private let requestBiometrics: () -> Void
+
+ private let iconNode: ASImageNode
+ private let animationNode: AnimatedStickerNode
+ private let titleNode: ImmediateTextNode
+ private let biometricsActionTitleNode: ImmediateTextNode
+ private let biometricsActionButtonNode: HighlightTrackingButtonNode
+ private let inputFieldNode: PasscodeEntryInputFieldNode
+
+ private let hapticFeedback = HapticFeedback()
+
+ init(account: Account, presentationData: PresentationData, mode: WalletPasscodeMode, proceed: @escaping () -> Void, requestBiometrics: @escaping () -> Void) {
+ self.presentationData = presentationData
+ self.mode = mode
+ self.requestBiometrics = requestBiometrics
+
+ self.iconNode = ASImageNode()
+ self.iconNode.displayWithoutProcessing = true
+ self.iconNode.displaysAsynchronously = false
+
+ self.animationNode = AnimatedStickerNode()
+
+ let title: String
+ let biometricsActionText: String
+
+ title = "Enter Passcode"
+ biometricsActionText = "Use Face ID"
+
+ self.iconNode.image = UIImage(bundleImageName: "Settings/Wallet/PasscodeIcon")
+
+ self.titleNode = ImmediateTextNode()
+ self.titleNode.displaysAsynchronously = false
+ self.titleNode.attributedText = NSAttributedString(string: title, font: Font.bold(32.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor)
+ self.titleNode.maximumNumberOfLines = 0
+ self.titleNode.textAlignment = .center
+
+ self.biometricsActionTitleNode = ImmediateTextNode()
+ self.biometricsActionTitleNode.displaysAsynchronously = false
+ self.biometricsActionTitleNode.attributedText = NSAttributedString(string: biometricsActionText, font: Font.regular(16.0), textColor: self.presentationData.theme.list.itemAccentColor, paragraphAlignment: .center)
+ self.biometricsActionTitleNode.textAlignment = .center
+
+ self.biometricsActionButtonNode = HighlightTrackingButtonNode()
+
+ self.inputFieldNode = PasscodeEntryInputFieldNode(color: self.presentationData.theme.list.itemPrimaryTextColor, accentColor: self.presentationData.theme.list.itemAccentColor, fieldType: .digits4, keyboardAppearance: self.presentationData.theme.rootController.keyboardColor.keyboardAppearance)
+
+ super.init()
+
+ self.backgroundColor = self.presentationData.theme.list.plainBackgroundColor
+
+ self.addSubnode(self.iconNode)
+ self.addSubnode(self.animationNode)
+ self.addSubnode(self.titleNode)
+ self.addSubnode(self.biometricsActionTitleNode)
+ self.addSubnode(self.biometricsActionButtonNode)
+ self.addSubnode(self.inputFieldNode)
+
+ self.biometricsActionButtonNode.highligthedChanged = { [weak self] highlighted in
+ guard let strongSelf = self else {
+ return
+ }
+ if highlighted {
+ strongSelf.biometricsActionTitleNode.layer.removeAnimation(forKey: "opacity")
+ strongSelf.biometricsActionTitleNode.alpha = 0.4
+ } else {
+ strongSelf.biometricsActionTitleNode.alpha = 1.0
+ strongSelf.biometricsActionTitleNode.layer.animateAlpha(from: 0.4, to: 1.0, duration: 0.2)
+ }
+ }
+
+ self.biometricsActionButtonNode.addTarget(self, action: #selector(self.biometricsActionPressed), forControlEvents: .touchUpInside)
+
+ self.inputFieldNode.complete = { [weak self] passcode in
+ if passcode == "1111" {
+ proceed()
+ } else {
+ self?.animateError()
+ }
+ }
+ }
+
+ @objc private func biometricsActionPressed() {
+ self.requestBiometrics()
+ }
+
+ func containerLayoutUpdated(layout: ContainerViewLayout, navigationHeight: CGFloat, transition: ContainedViewLayoutTransition) {
+ let sideInset: CGFloat = 32.0
+ let buttonSideInset: CGFloat = 48.0
+ let iconSpacing: CGFloat = 21.0
+ let titleSpacing: CGFloat = 60.0
+ let biometricsSpacing: CGFloat = 44.0
+ let buttonHeight: CGFloat = 50.0
+ let inputFieldHeight: CGFloat = 34.0
+
+ let iconSize = self.iconNode.image?.size ?? CGSize(width: 140.0, height: 140.0)
+ var iconOffset = CGPoint()
+
+ let titleSize = self.titleNode.updateLayout(CGSize(width: layout.size.width - sideInset * 2.0, height: layout.size.height))
+ let biometricsActionSize = self.biometricsActionTitleNode.updateLayout(CGSize(width: layout.size.width - sideInset * 2.0, height: layout.size.height))
+
+ let insets = layout.insets(options: [.input])
+ let contentHeight = iconSize.height + iconSpacing + titleSize.height + titleSpacing + inputFieldHeight
+ let contentVerticalOrigin = floor((layout.size.height - contentHeight - iconSize.height / 2.0 - insets.bottom) / 2.0)
+
+ let iconFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - iconSize.width) / 2.0), y: contentVerticalOrigin), size: iconSize).offsetBy(dx: iconOffset.x, dy: iconOffset.y)
+ transition.updateFrameAdditive(node: self.iconNode, frame: iconFrame)
+ self.animationNode.updateLayout(size: iconFrame.size)
+ transition.updateFrameAdditive(node: self.animationNode, frame: iconFrame)
+ let titleFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - titleSize.width) / 2.0), y: iconFrame.maxY + iconSpacing), size: titleSize)
+ transition.updateFrameAdditive(node: self.titleNode, frame: titleFrame)
+
+ let passcodeLayout = PasscodeLayout(layout: layout, titleOffset: 0.0, subtitleOffset: 0.0, inputFieldOffset: titleFrame.maxY + titleSpacing)
+ let inputFieldFrame = self.inputFieldNode.updateLayout(layout: passcodeLayout, transition: transition)
+ transition.updateFrame(node: self.inputFieldNode, frame: CGRect(origin: CGPoint(), size: layout.size))
+
+ let minimalBottomInset: CGFloat = 60.0
+ let bottomInset = layout.intrinsicInsets.bottom + max(minimalBottomInset, biometricsActionSize.height + biometricsSpacing * 2.0)
+
+ if !biometricsActionSize.width.isZero {
+ let biometricsActionFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - biometricsActionSize.width) / 2.0), y: inputFieldFrame.maxY + floor((layout.size.height - insets.bottom - inputFieldFrame.maxY - biometricsActionSize.height) / 2.0)), size: biometricsActionSize)
+ transition.updateFrameAdditive(node: self.biometricsActionTitleNode, frame: biometricsActionFrame)
+ transition.updateFrame(node: self.biometricsActionButtonNode, frame: biometricsActionFrame.insetBy(dx: -10.0, dy: -10.0))
+ }
+ }
+
+ func activateInput() {
+ self.inputFieldNode.activateInput()
+
+ UIAccessibility.post(notification: UIAccessibility.Notification.announcement, argument: self.titleNode.attributedText?.string)
+ }
+
+ func animateError() {
+ self.inputFieldNode.reset()
+ self.inputFieldNode.layer.addShakeAnimation(amplitude: -30.0, duration: 0.5, count: 6, decay: true)
+
+ self.hapticFeedback.error()
+ }
+}
diff --git a/submodules/WalletUI/Sources/WalletQrCodeItem.swift b/submodules/WalletUI/Sources/WalletQrCodeItem.swift
new file mode 100644
index 0000000000..c2bc7e8e76
--- /dev/null
+++ b/submodules/WalletUI/Sources/WalletQrCodeItem.swift
@@ -0,0 +1,209 @@
+import Foundation
+import UIKit
+import Display
+import AsyncDisplayKit
+import SwiftSignalKit
+import TelegramPresentationData
+import ItemListUI
+import QrCode
+
+class WalletQrCodeItem: ListViewItem, ItemListItem {
+ let theme: PresentationTheme
+ let address: String
+ let sectionId: ItemListSectionId
+ let style: ItemListStyle
+
+ init(theme: PresentationTheme, address: String, sectionId: ItemListSectionId, style: ItemListStyle) {
+ self.theme = theme
+ self.address = address
+ self.sectionId = sectionId
+ self.style = style
+ }
+
+ func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal?, (ListViewItemApply) -> Void)) -> Void) {
+ async {
+ let node = WalletQrCodeItemNode()
+ let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
+
+ node.contentSize = layout.contentSize
+ node.insets = layout.insets
+
+ Queue.mainQueue().async {
+ completion(node, {
+ return (nil, { _ in apply() })
+ })
+ }
+ }
+ }
+
+ func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) {
+ Queue.mainQueue().async {
+ if let nodeValue = node() as? WalletQrCodeItemNode {
+ let makeLayout = nodeValue.asyncLayout()
+
+ async {
+ let (layout, apply) = makeLayout(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem))
+ Queue.mainQueue().async {
+ completion(layout, { _ in
+ apply()
+ })
+ }
+ }
+ }
+ }
+ }
+}
+
+class WalletQrCodeItemNode: ListViewItemNode {
+ private let backgroundNode: ASDisplayNode
+ private let topStripeNode: ASDisplayNode
+ private let bottomStripeNode: ASDisplayNode
+
+ private let imageNode: TransformImageNode
+
+ private var item: WalletQrCodeItem?
+
+ var tag: Any? {
+ return self.item?.tag
+ }
+
+ init() {
+ self.backgroundNode = ASDisplayNode()
+ self.backgroundNode.isLayerBacked = true
+ self.backgroundNode.backgroundColor = .white
+
+ self.topStripeNode = ASDisplayNode()
+ self.topStripeNode.isLayerBacked = true
+
+ self.bottomStripeNode = ASDisplayNode()
+ self.bottomStripeNode.isLayerBacked = true
+
+ self.imageNode = TransformImageNode()
+
+ super.init(layerBacked: false, dynamicBounce: false)
+
+ self.addSubnode(self.imageNode)
+ }
+
+ func asyncLayout() -> (_ item: WalletQrCodeItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) {
+ let makeImageLayout = self.imageNode.asyncLayout()
+
+ let currentItem = self.item
+
+ return { item, params, neighbors in
+ var updatedTheme: PresentationTheme?
+ var updatedAddress: String?
+
+ if currentItem?.theme !== item.theme {
+ updatedTheme = item.theme
+ }
+
+ if currentItem?.address != item.address {
+ updatedAddress = item.address
+ }
+
+ let contentSize: CGSize
+ let insets: UIEdgeInsets
+ let separatorHeight = UIScreenPixel
+
+ let inset: CGFloat = 12.0
+ var imageSize = CGSize(width: 256.0, height: 256.0)
+ let imageApply = makeImageLayout(TransformImageArguments(corners: ImageCorners(), imageSize: imageSize, boundingSize: imageSize, intrinsicInsets: UIEdgeInsets(), emptyColor: nil))
+
+ let itemBackgroundColor: UIColor
+ let itemSeparatorColor: UIColor
+ switch item.style {
+ case .plain:
+ itemBackgroundColor = item.theme.list.plainBackgroundColor
+ itemSeparatorColor = item.theme.list.itemPlainSeparatorColor
+ contentSize = CGSize(width: params.width, height: imageSize.height + inset * 2.0)
+ insets = itemListNeighborsPlainInsets(neighbors)
+ case .blocks:
+ itemBackgroundColor = item.theme.list.itemBlocksBackgroundColor
+ itemSeparatorColor = item.theme.list.itemBlocksSeparatorColor
+ contentSize = CGSize(width: params.width, height: imageSize.height + inset * 2.0)
+ insets = itemListNeighborsGroupedInsets(neighbors)
+ }
+
+ let layout = ListViewItemNodeLayout(contentSize: contentSize, insets: insets)
+
+ return (layout, { [weak self] in
+ if let strongSelf = self {
+ strongSelf.item = item
+
+ if let _ = updatedTheme {
+ strongSelf.topStripeNode.backgroundColor = itemSeparatorColor
+ strongSelf.bottomStripeNode.backgroundColor = itemSeparatorColor
+ strongSelf.backgroundNode.backgroundColor = itemBackgroundColor
+ }
+
+ if let updatedAddress = updatedAddress {
+ strongSelf.imageNode.setSignal(qrCode(string: updatedAddress, color: .black, backgroundColor: .white, icon: .custom(UIImage(bundleImageName: "Settings/Wallet/IntroIcon")), ecl: "Q"), attemptSynchronously: true)
+ }
+
+ let _ = imageApply()
+
+ let leftInset: CGFloat
+
+ switch item.style {
+ case .plain:
+ leftInset = 35.0 + params.leftInset
+
+ if strongSelf.backgroundNode.supernode != nil {
+ strongSelf.backgroundNode.removeFromSupernode()
+ }
+ if strongSelf.topStripeNode.supernode != nil {
+ strongSelf.topStripeNode.removeFromSupernode()
+ }
+ if strongSelf.bottomStripeNode.supernode == nil {
+ strongSelf.insertSubnode(strongSelf.bottomStripeNode, at: 0)
+ }
+
+ strongSelf.bottomStripeNode.frame = CGRect(origin: CGPoint(x: leftInset, y: contentSize.height - separatorHeight), size: CGSize(width: params.width - leftInset, height: separatorHeight))
+ case .blocks:
+ leftInset = 16.0 + params.leftInset
+
+ if strongSelf.backgroundNode.supernode == nil {
+ strongSelf.insertSubnode(strongSelf.backgroundNode, at: 0)
+ }
+ if strongSelf.topStripeNode.supernode == nil {
+ strongSelf.insertSubnode(strongSelf.topStripeNode, at: 1)
+ }
+ if strongSelf.bottomStripeNode.supernode == nil {
+ strongSelf.insertSubnode(strongSelf.bottomStripeNode, at: 2)
+ }
+ switch neighbors.top {
+ case .sameSection(false):
+ strongSelf.topStripeNode.isHidden = true
+ default:
+ strongSelf.topStripeNode.isHidden = false
+ }
+ let bottomStripeInset: CGFloat
+ let bottomStripeOffset: CGFloat
+ switch neighbors.bottom {
+ case .sameSection(false):
+ bottomStripeInset = 16.0 + params.leftInset
+ bottomStripeOffset = -separatorHeight
+ default:
+ bottomStripeInset = 0.0
+ bottomStripeOffset = 0.0
+ }
+ strongSelf.backgroundNode.frame = CGRect(origin: CGPoint(x: 0.0, y: -min(insets.top, separatorHeight)), size: CGSize(width: params.width, height: contentSize.height + min(insets.top, separatorHeight) + min(insets.bottom, separatorHeight)))
+ strongSelf.topStripeNode.frame = CGRect(origin: CGPoint(x: 0.0, y: -min(insets.top, separatorHeight)), size: CGSize(width: params.width, height: separatorHeight))
+ strongSelf.bottomStripeNode.frame = CGRect(origin: CGPoint(x: bottomStripeInset, y: contentSize.height + bottomStripeOffset), size: CGSize(width: params.width - bottomStripeInset, height: separatorHeight))
+ }
+
+ strongSelf.imageNode.frame = CGRect(origin: CGPoint(x: (params.width - imageSize.width) / 2.0, y: 12.0), size: imageSize)
+ }
+ })
+ }
+ }
+
+ override func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) {
+ self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4)
+ }
+
+ override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
+ self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
+ }
+}
diff --git a/submodules/WalletUI/Sources/WalletQrScanScreen.swift b/submodules/WalletUI/Sources/WalletQrScanScreen.swift
new file mode 100644
index 0000000000..e904b1f0f1
--- /dev/null
+++ b/submodules/WalletUI/Sources/WalletQrScanScreen.swift
@@ -0,0 +1,184 @@
+import Foundation
+import UIKit
+import AppBundle
+import AccountContext
+import TelegramPresentationData
+import AsyncDisplayKit
+import Display
+import Postbox
+import TelegramCore
+import AlertUI
+
+public final class WalletQrScanScreen: ViewController {
+ private let context: AccountContext
+ private let tonContext: TonContext
+ private var presentationData: PresentationData
+
+ public init(context: AccountContext, tonContext: TonContext) {
+ self.context = context
+ self.tonContext = tonContext
+
+ self.presentationData = context.sharedContext.currentPresentationData.with { $0 }
+
+ let defaultNavigationPresentationData = NavigationBarPresentationData(presentationTheme: self.presentationData.theme, presentationStrings: self.presentationData.strings)
+ let navigationBarTheme = NavigationBarTheme(buttonColor: defaultNavigationPresentationData.theme.buttonColor, disabledButtonColor: defaultNavigationPresentationData.theme.disabledButtonColor, primaryTextColor: defaultNavigationPresentationData.theme.primaryTextColor, backgroundColor: .clear, separatorColor: .clear, badgeBackgroundColor: defaultNavigationPresentationData.theme.badgeBackgroundColor, badgeStrokeColor: defaultNavigationPresentationData.theme.badgeStrokeColor, badgeTextColor: defaultNavigationPresentationData.theme.badgeTextColor)
+
+ super.init(navigationBarPresentationData: NavigationBarPresentationData(theme: navigationBarTheme, strings: defaultNavigationPresentationData.strings))
+
+ self.navigationPresentation = .modalInLargeLayout
+ self.supportedOrientations = ViewControllerSupportedOrientations(regularSize: .all, compactSize: .portrait)
+ self.navigationBar?.intrinsicCanTransitionInline = false
+
+ self.navigationItem.backBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Back, style: .plain, target: nil, action: nil)
+ }
+
+ required init(coder aDecoder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+
+ @objc private func backPressed() {
+ self.dismiss()
+ }
+
+ override public func loadDisplayNode() {
+ self.displayNode = WalletQrScanScreenNode(presentationData: self.presentationData)
+
+ self.displayNodeDidLoad()
+ }
+
+ override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
+ super.containerLayoutUpdated(layout, transition: transition)
+
+ (self.displayNode as! WalletQrScanScreenNode).containerLayoutUpdated(layout: layout, navigationHeight: self.navigationHeight, transition: transition)
+ }
+}
+
+private final class WalletQrScanScreenNode: ViewControllerTracingNode, UIScrollViewDelegate {
+ private var presentationData: PresentationData
+
+ private let navigationBackgroundNode: ASDisplayNode
+ private let navigationSeparatorNode: ASDisplayNode
+ private let navigationTitleNode: ImmediateTextNode
+ private let scrollNode: ASScrollNode
+ private let iconNode: ASImageNode
+ private let titleNode: ImmediateTextNode
+ private let textNode: ImmediateTextNode
+
+ private var navigationHeight: CGFloat?
+
+ init(presentationData: PresentationData) {
+ self.presentationData = presentationData
+
+ self.navigationBackgroundNode = ASDisplayNode()
+ self.navigationBackgroundNode.backgroundColor = self.presentationData.theme.rootController.navigationBar.backgroundColor
+ self.navigationBackgroundNode.alpha = 0.0
+ self.navigationSeparatorNode = ASDisplayNode()
+ self.navigationSeparatorNode.backgroundColor = self.presentationData.theme.rootController.navigationBar.separatorColor
+
+ self.scrollNode = ASScrollNode()
+
+ self.iconNode = ASImageNode()
+ self.iconNode.displayWithoutProcessing = true
+ self.iconNode.displaysAsynchronously = false
+
+ let title: String = "24 Secret Words"
+ let text: String = "Write down these 24 words in the correct order and store them in a secret place.\n\nUse these secret words to restore access to your wallet if you lose your passcode or Telegram account."
+ let buttonText: String = "Done"
+
+ self.iconNode.image = UIImage(bundleImageName: "Settings/Wallet/WordsDisplayIcon")
+
+ self.titleNode = ImmediateTextNode()
+ self.titleNode.displaysAsynchronously = false
+ self.titleNode.attributedText = NSAttributedString(string: title, font: Font.bold(32.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor)
+ self.titleNode.maximumNumberOfLines = 0
+ self.titleNode.textAlignment = .center
+
+ self.navigationTitleNode = ImmediateTextNode()
+ self.navigationTitleNode.displaysAsynchronously = false
+ self.navigationTitleNode.attributedText = NSAttributedString(string: title, font: Font.bold(17.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor)
+ self.navigationTitleNode.maximumNumberOfLines = 0
+ self.navigationTitleNode.textAlignment = .center
+
+ self.textNode = ImmediateTextNode()
+ self.textNode.displaysAsynchronously = false
+ self.textNode.attributedText = NSAttributedString(string: text, font: Font.regular(16.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor)
+ self.textNode.maximumNumberOfLines = 0
+ self.textNode.lineSpacing = 0.1
+ self.textNode.textAlignment = .center
+
+ super.init()
+
+ self.backgroundColor = self.presentationData.theme.list.plainBackgroundColor
+
+ self.addSubnode(self.scrollNode)
+
+ self.scrollNode.addSubnode(self.iconNode)
+ self.scrollNode.addSubnode(self.titleNode)
+ self.scrollNode.addSubnode(self.textNode)
+
+ self.navigationBackgroundNode.addSubnode(self.navigationSeparatorNode)
+ self.navigationBackgroundNode.addSubnode(self.navigationTitleNode)
+ self.addSubnode(self.navigationBackgroundNode)
+ }
+
+ override func didLoad() {
+ super.didLoad()
+
+ self.scrollNode.view.alwaysBounceVertical = false
+ self.scrollNode.view.showsVerticalScrollIndicator = false
+ self.scrollNode.view.showsHorizontalScrollIndicator = false
+ if #available(iOSApplicationExtension 11.0, iOS 11.0, *) {
+ self.scrollNode.view.contentInsetAdjustmentBehavior = .never
+ }
+ self.scrollNode.view.delegate = self
+ }
+
+ func scrollViewDidScroll(_ scrollView: UIScrollView) {
+ let navigationHeight = self.navigationHeight ?? 0.0
+ let alpha: CGFloat = scrollView.contentOffset.y >= (self.titleNode.frame.maxY - navigationHeight) ? 1.0 : 0.0
+ if self.navigationBackgroundNode.alpha != alpha {
+ let transition: ContainedViewLayoutTransition = .animated(duration: 0.12, curve: .easeInOut)
+ transition.updateAlpha(node: self.navigationBackgroundNode, alpha: alpha, beginWithCurrentState: true)
+ }
+ }
+
+ func containerLayoutUpdated(layout: ContainerViewLayout, navigationHeight: CGFloat, transition: ContainedViewLayoutTransition) {
+ self.navigationHeight = navigationHeight
+
+ let sideInset: CGFloat = 32.0
+ let buttonSideInset: CGFloat = 48.0
+ let iconSpacing: CGFloat = 5.0
+ let titleSpacing: CGFloat = 19.0
+ let textSpacing: CGFloat = 37.0
+ let buttonHeight: CGFloat = 50.0
+ let buttonSpacing: CGFloat = 45.0
+ let wordSpacing: CGFloat = 12.0
+ let indexSpacing: CGFloat = 4.0
+
+ transition.updateFrame(node: self.navigationBackgroundNode, frame: CGRect(origin: CGPoint(), size: CGSize(width: layout.size.width, height: navigationHeight)))
+ transition.updateFrame(node: self.navigationSeparatorNode, frame: CGRect(origin: CGPoint(x: 0.0, y: navigationHeight), size: CGSize(width: layout.size.width, height: UIScreenPixel)))
+
+ transition.updateFrame(node: self.scrollNode, frame: CGRect(origin: CGPoint(), size: layout.size))
+
+ let iconSize = self.iconNode.image?.size ?? CGSize(width: 50.0, height: 50.0)
+
+ let titleSize = self.titleNode.updateLayout(CGSize(width: layout.size.width - sideInset * 2.0, height: layout.size.height))
+ let navigationTitleSize = self.navigationTitleNode.updateLayout(CGSize(width: layout.size.width - sideInset * 2.0, height: layout.size.height))
+ let textSize = self.textNode.updateLayout(CGSize(width: layout.size.width - sideInset * 2.0, height: layout.size.height))
+
+ var contentHeight: CGFloat = 0.0
+
+ let contentVerticalOrigin = navigationHeight + 10.0
+
+ let iconFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - iconSize.width) / 2.0), y: contentVerticalOrigin), size: iconSize)
+ transition.updateFrameAdditive(node: self.iconNode, frame: iconFrame)
+ let titleFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - titleSize.width) / 2.0), y: iconFrame.maxY + iconSpacing), size: titleSize)
+ transition.updateFrameAdditive(node: self.titleNode, frame: titleFrame)
+ let textFrame = CGRect(origin: CGPoint(x: floor((layout.size.width - textSize.width) / 2.0), y: titleFrame.maxY + titleSpacing), size: textSize)
+ transition.updateFrameAdditive(node: self.textNode, frame: textFrame)
+
+ transition.updateFrameAdditive(node: self.navigationTitleNode, frame: CGRect(origin: CGPoint(x: floor((layout.size.width - navigationTitleSize.width) / 2.0), y: navigationHeight - 44.0 + floor((44.0 - navigationTitleSize.height) / 2.0)), size: navigationTitleSize))
+
+ contentHeight = textFrame.maxY + textSpacing
+ }
+}
diff --git a/submodules/WalletUI/Sources/WalletReceiveScreen.swift b/submodules/WalletUI/Sources/WalletReceiveScreen.swift
new file mode 100644
index 0000000000..7cd9494005
--- /dev/null
+++ b/submodules/WalletUI/Sources/WalletReceiveScreen.swift
@@ -0,0 +1,196 @@
+import Foundation
+import UIKit
+import AppBundle
+import AccountContext
+import TelegramPresentationData
+import AsyncDisplayKit
+import Display
+import Postbox
+import TelegramCore
+import ItemListUI
+import SwiftSignalKit
+import OverlayStatusController
+import ShareController
+
+private final class WalletReceiveScreenArguments {
+ let context: AccountContext
+ let copyAddress: () -> Void
+ let shareAddressLink: () -> Void
+
+ init(context: AccountContext, copyAddress: @escaping () -> Void, shareAddressLink: @escaping () -> Void) {
+ self.context = context
+ self.copyAddress = copyAddress
+ self.shareAddressLink = shareAddressLink
+ }
+}
+
+private enum WalletReceiveScreenSection: Int32 {
+ case address
+}
+
+private enum WalletReceiveScreenEntry: ItemListNodeEntry {
+ case addressHeader(PresentationTheme, String)
+ case addressCode(PresentationTheme, String)
+ case address(PresentationTheme, String)
+ case copyAddress(PresentationTheme, String)
+ case shareAddressLink(PresentationTheme, String)
+ case addressInfo(PresentationTheme, String)
+
+ var section: ItemListSectionId {
+ switch self {
+ case .addressHeader, .addressCode, .address, .copyAddress, .shareAddressLink, .addressInfo:
+ return WalletReceiveScreenSection.address.rawValue
+ }
+ }
+
+ var stableId: Int32 {
+ switch self {
+ case .addressHeader:
+ return 0
+ case .addressCode:
+ return 1
+ case .address:
+ return 2
+ case .copyAddress:
+ return 3
+ case .shareAddressLink:
+ return 4
+ case .addressInfo:
+ return 5
+ }
+ }
+
+ static func ==(lhs: WalletReceiveScreenEntry, rhs: WalletReceiveScreenEntry) -> Bool {
+ switch lhs {
+ case let .addressHeader(lhsTheme, lhsText):
+ if case let .addressHeader(rhsTheme, rhsText) = rhs, lhsTheme === rhsTheme, lhsText == rhsText {
+ return true
+ } else {
+ return false
+ }
+ case let .addressCode(lhsTheme, lhsAddress):
+ if case let .addressCode(rhsTheme, rhsAddress) = rhs, lhsTheme === rhsTheme, lhsAddress == rhsAddress {
+ return true
+ } else {
+ return false
+ }
+ case let .address(lhsTheme, lhsAddress):
+ if case let .address(rhsTheme, rhsAddress) = rhs, lhsTheme === rhsTheme, lhsAddress == rhsAddress {
+ return true
+ } else {
+ return false
+ }
+ case let .copyAddress(lhsTheme, lhsText):
+ if case let .copyAddress(rhsTheme, rhsText) = rhs, lhsTheme === rhsTheme, lhsText == rhsText {
+ return true
+ } else {
+ return false
+ }
+ case let .shareAddressLink(lhsTheme, lhsText):
+ if case let .shareAddressLink(rhsTheme, rhsText) = rhs, lhsTheme === rhsTheme, lhsText == rhsText {
+ return true
+ } else {
+ return false
+ }
+ case let .addressInfo(lhsTheme, lhsText):
+ if case let .addressInfo(rhsTheme, rhsText) = rhs, lhsTheme === rhsTheme, lhsText == rhsText {
+ return true
+ } else {
+ return false
+ }
+ }
+ }
+
+ static func <(lhs: WalletReceiveScreenEntry, rhs: WalletReceiveScreenEntry) -> Bool {
+ return lhs.stableId < rhs.stableId
+ }
+
+ func item(_ arguments: WalletReceiveScreenArguments) -> ListViewItem {
+ switch self {
+ case let .addressHeader(theme, text):
+ return ItemListSectionHeaderItem(theme: theme, text: text, sectionId: self.section)
+ case let .addressCode(theme, address):
+ return WalletQrCodeItem(theme: theme, address: "ton://\(address)", sectionId: self.section, style: .blocks)
+ case let .address(theme, address):
+ return ItemListMultilineTextItem(theme: theme, text: address, enabledEntityTypes: [], font: .monospace, sectionId: self.section, style: .blocks)
+ case let .copyAddress(theme, text):
+ return ItemListActionItem(theme: theme, title: text, kind: .generic, alignment: .natural, sectionId: self.section, style: .blocks, action: {
+ arguments.copyAddress()
+ })
+ case let .shareAddressLink(theme, text):
+ return ItemListActionItem(theme: theme, title: text, kind: .generic, alignment: .natural, sectionId: self.section, style: .blocks, action: {
+ arguments.shareAddressLink()
+ })
+ case let .addressInfo(theme, text):
+ return ItemListTextItem(theme: theme, text: .markdown(text), sectionId: self.section)
+ }
+ }
+}
+
+private func walletReceiveScreenEntries(presentationData: PresentationData, address: String) -> [WalletReceiveScreenEntry] {
+ var entries: [WalletReceiveScreenEntry] = []
+ entries.append(.addressHeader(presentationData.theme, "YOUR WALLET ADDRESS"))
+
+ let address = String(address[address.startIndex.., WalletSendScreen {
+
+}
+
+func walletReceiveScreen(context: AccountContext, tonContext: TonContext, walletInfo: WalletInfo, address: String) -> ViewController {
+ var presentControllerImpl: ((ViewController, Any?) -> Void)?
+ var presentInGlobalOverlayImpl: ((ViewController, Any?) -> Void)?
+ var dismissImpl: (() -> Void)?
+
+ let arguments = WalletReceiveScreenArguments(context: context, copyAddress: {
+ let presentationData = context.sharedContext.currentPresentationData.with { $0 }
+
+ UIPasteboard.general.string = address
+
+ presentInGlobalOverlayImpl?(OverlayStatusController(theme: presentationData.theme, strings: presentationData.strings, type: .genericSuccess("Address copied to clipboard.", false)), nil)
+ }, shareAddressLink: {
+ guard let address = address.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) else {
+ return
+ }
+ let controller = ShareController(context: context, subject: .url("ton://\(address)"), preferredAction: .default)
+ presentControllerImpl?(controller, nil)
+ })
+
+ let address: Signal = .single(address)
+
+ let signal = combineLatest(queue: .mainQueue(), context.sharedContext.presentationData, address)
+ |> map { presentationData, address -> (ItemListControllerState, (ItemListNodeState, WalletReceiveScreenEntry.ItemGenerationArguments)) in
+ let rightNavigationButton = ItemListNavigationButton(content: .text(presentationData.strings.Common_Done), style: .regular, enabled: true, action: {
+ dismissImpl?()
+ })
+
+ let controllerState = ItemListControllerState(theme: presentationData.theme, title: .text("Receive Grams"), leftNavigationButton: rightNavigationButton, rightNavigationButton: nil, backNavigationButton: ItemListBackButton(title: presentationData.strings.Common_Back), animateChanges: false)
+ let listState = ItemListNodeState(entries: walletReceiveScreenEntries(presentationData: presentationData, address: address), style: .blocks, animateChanges: false)
+
+ return (controllerState, (listState, arguments))
+ }
+
+ let controller = WalletReceiveScreenImpl(context: context, state: signal)
+ controller.navigationPresentation = .modal
+ presentControllerImpl = { [weak controller] c, a in
+ controller?.present(c, in: .window(.root), with: a)
+ }
+ presentInGlobalOverlayImpl = { [weak controller] c, a in
+ controller?.presentInGlobalOverlay(c, with: a)
+ }
+ dismissImpl = { [weak controller] in
+ let _ = controller?.dismiss()
+ }
+ return controller
+}
diff --git a/submodules/WalletUI/Sources/WalletSendScreen.swift b/submodules/WalletUI/Sources/WalletSendScreen.swift
new file mode 100644
index 0000000000..dc173c92fe
--- /dev/null
+++ b/submodules/WalletUI/Sources/WalletSendScreen.swift
@@ -0,0 +1,425 @@
+import Foundation
+import UIKit
+import AppBundle
+import AccountContext
+import TelegramPresentationData
+import AsyncDisplayKit
+import Display
+import Postbox
+import TelegramCore
+import ItemListUI
+import SwiftSignalKit
+import AlertUI
+import TextFormat
+
+private let walletAddressLength: Int = 48
+
+private final class WalletSendScreenArguments {
+ let context: AccountContext
+ let updateState: ((WalletSendScreenState) -> WalletSendScreenState) -> Void
+ let selectNextInputItem: (WalletSendScreenEntryTag) -> Void
+ let proceed: () -> Void
+
+ init(context: AccountContext, updateState: @escaping ((WalletSendScreenState) -> WalletSendScreenState) -> Void, selectNextInputItem: @escaping (WalletSendScreenEntryTag) -> Void, proceed: @escaping () -> Void) {
+ self.context = context
+ self.updateState = updateState
+ self.selectNextInputItem = selectNextInputItem
+ self.proceed = proceed
+ }
+}
+
+private enum WalletSendScreenSection: Int32 {
+ case address
+ case amount
+ case comment
+}
+
+private enum WalletSendScreenEntryTag: ItemListItemTag {
+ case address
+ case amount
+ case comment
+
+ func isEqual(to other: ItemListItemTag) -> Bool {
+ if let other = other as? WalletSendScreenEntryTag {
+ return self == other
+ } else {
+ return false
+ }
+ }
+}
+
+private let invalidAddressCharacters = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=").inverted
+private func isValidAddress(_ address: String, exactLength: Bool = false) -> Bool {
+ if address.count > walletAddressLength || address.rangeOfCharacter(from: invalidAddressCharacters) != nil {
+ return false
+ }
+ if exactLength && address.count != walletAddressLength {
+ return false
+ }
+ return true
+}
+
+private let invalidAmountCharacters = CharacterSet(charactersIn: "01234567890.,").inverted
+private func isValidAmount(_ amount: String) -> Bool {
+ if amount.rangeOfCharacter(from: invalidAmountCharacters) != nil {
+ return false
+ }
+ var hasDecimalSeparator = false
+ var hasLeadingZero = false
+ var index = 0
+ for c in amount {
+ if c == "." || c == "," {
+ if !hasDecimalSeparator {
+ hasDecimalSeparator = true
+ } else {
+ return false
+ }
+ }
+ index += 1
+ }
+
+ var decimalIndex: String.Index?
+ if let index = amount.firstIndex(of: ".") {
+ decimalIndex = index
+ } else if let index = amount.firstIndex(of: ",") {
+ decimalIndex = index
+ }
+
+ if let decimalIndex = decimalIndex, amount.distance(from: decimalIndex, to: amount.endIndex) > 4 {
+ return false
+ }
+
+ return true
+}
+
+private func stringForGramsAmount(_ amount: Int64, decimalSeparator: String = ".") -> String {
+ if amount < 1000 {
+ return "0\(decimalSeparator)\(String(amount).rightJustified(width: 3, pad: "0"))"
+ } else {
+ var string = String(amount)
+ string.insert(contentsOf: decimalSeparator, at: string.index(string.endIndex, offsetBy: -3))
+ return string
+ }
+}
+
+private func amountValue(_ string: String) -> Int64 {
+ return Int64((Double(string) ?? 0.0) * 1000.0)
+}
+
+private func normalizedStringForGramsString(_ string: String, decimalSeparator: String = ".") -> String {
+ return stringForGramsAmount(amountValue(string), decimalSeparator: decimalSeparator)
+}
+
+private enum WalletSendScreenEntry: ItemListNodeEntry {
+ case addressHeader(PresentationTheme, String)
+ case address(PresentationTheme, String, String)
+ case addressInfo(PresentationTheme, String)
+
+ case amountHeader(PresentationTheme, String, String, Bool)
+ case amount(PresentationTheme, PresentationStrings, String, String)
+
+ case commentHeader(PresentationTheme, String)
+ case comment(PresentationTheme, String, String)
+
+ var section: ItemListSectionId {
+ switch self {
+ case .addressHeader, .address, .addressInfo:
+ return WalletSendScreenSection.address.rawValue
+ case .amountHeader, .amount:
+ return WalletSendScreenSection.amount.rawValue
+ case .commentHeader, .comment:
+ return WalletSendScreenSection.comment.rawValue
+ }
+ }
+
+ var stableId: Int32 {
+ switch self {
+ case .addressHeader:
+ return 0
+ case .address:
+ return 1
+ case .addressInfo:
+ return 2
+ case .amountHeader:
+ return 3
+ case .amount:
+ return 4
+ case .commentHeader:
+ return 5
+ case .comment:
+ return 6
+ }
+ }
+
+ static func ==(lhs: WalletSendScreenEntry, rhs: WalletSendScreenEntry) -> Bool {
+ switch lhs {
+ case let .addressHeader(lhsTheme, lhsText):
+ if case let .addressHeader(rhsTheme, rhsText) = rhs, lhsTheme === rhsTheme, lhsText == rhsText {
+ return true
+ } else {
+ return false
+ }
+ case let .address(lhsTheme, lhsPlaceholder, lhsAddress):
+ if case let .address(rhsTheme, rhsPlaceholder, rhsAddress) = rhs, lhsTheme === rhsTheme, lhsPlaceholder == rhsPlaceholder, lhsAddress == rhsAddress {
+ return true
+ } else {
+ return false
+ }
+ case let .addressInfo(lhsTheme, lhsText):
+ if case let .addressInfo(rhsTheme, rhsText) = rhs, lhsTheme === rhsTheme, lhsText == rhsText {
+ return true
+ } else {
+ return false
+ }
+ case let .amountHeader(lhsTheme, lhsText, lhsBalance, lhsInsufficient):
+ if case let .amountHeader(rhsTheme, rhsText, rhsBalance, rhsInsufficient) = rhs, lhsTheme === rhsTheme, lhsText == rhsText, lhsBalance == rhsBalance, lhsInsufficient == rhsInsufficient {
+ return true
+ } else {
+ return false
+ }
+ case let .amount(lhsTheme, lhsStrings, lhsPlaceholder, lhsBalance):
+ if case let .amount(rhsTheme, rhsStrings, rhsPlaceholder, rhsBalance) = rhs, lhsTheme === rhsTheme, lhsStrings === rhsStrings, lhsPlaceholder == rhsPlaceholder, lhsBalance == rhsBalance {
+ return true
+ } else {
+ return false
+ }
+ case let .commentHeader(lhsTheme, lhsText):
+ if case let .commentHeader(rhsTheme, rhsText) = rhs, lhsTheme === rhsTheme, lhsText == rhsText {
+ return true
+ } else {
+ return false
+ }
+ case let .comment(lhsTheme, lhsPlaceholder, lhsText):
+ if case let .comment(rhsTheme, rhsPlaceholder, rhsText) = rhs, lhsTheme === rhsTheme, lhsPlaceholder == rhsPlaceholder, lhsText == rhsText {
+ return true
+ } else {
+ return false
+ }
+ }
+ }
+
+ static func <(lhs: WalletSendScreenEntry, rhs: WalletSendScreenEntry) -> Bool {
+ return lhs.stableId < rhs.stableId
+ }
+
+ func item(_ arguments: WalletSendScreenArguments) -> ListViewItem {
+ switch self {
+ case let .addressHeader(theme, text):
+ return ItemListSectionHeaderItem(theme: theme, text: text, sectionId: self.section)
+ case let .address(theme, placeholder, address):
+ return ItemListMultilineInputItem(theme: theme, text: address, placeholder: "Enter wallet address...", maxLength: .init(value: walletAddressLength, display: false), sectionId: self.section, style: .blocks, capitalization: false, autocorrection: false, returnKeyType: .next, minimalHeight: 68.0, textUpdated: { address in
+ arguments.updateState { state in
+ var state = state
+ state.address = address
+ return state
+ }
+ }, shouldUpdateText: { text in
+ return isValidAddress(text)
+ }, tag: WalletSendScreenEntryTag.address, action: {
+ arguments.selectNextInputItem(WalletSendScreenEntryTag.address)
+ })
+ case let .addressInfo(theme, text):
+ return ItemListTextItem(theme: theme, text: .markdown(text), sectionId: self.section)
+ case let .amountHeader(theme, text, balance, insufficient):
+ return ItemListSectionHeaderItem(theme: theme, text: text, accessoryText: ItemListSectionHeaderAccessoryText(value: balance, color: insufficient ? .destructive : .generic), sectionId: self.section)
+ case let .amount(theme, strings, placeholder, text):
+ return ItemListSingleLineInputItem(theme: theme, strings: strings, title: NSAttributedString(string: ""), text: text, placeholder: placeholder, type: .decimal, returnKeyType: .next, tag: WalletSendScreenEntryTag.amount, sectionId: self.section, textUpdated: { text in
+ arguments.updateState { state in
+ var state = state
+ state.amount = text
+ return state
+ }
+ }, shouldUpdateText: { text in
+ return isValidAmount(text)
+ }, processPaste: { pastedText in
+ if isValidAmount(pastedText) {
+ return normalizedStringForGramsString(pastedText)
+ } else {
+ return text
+ }
+ }, updatedFocus: { focus in
+ if !focus {
+ let presentationData = arguments.context.sharedContext.currentPresentationData.with { $0 }
+ arguments.updateState { state in
+ var state = state
+ if !state.amount.isEmpty {
+ state.amount = normalizedStringForGramsString(state.amount, decimalSeparator: presentationData.dateTimeFormat.decimalSeparator)
+ }
+ return state
+ }
+ }
+ }, action: {
+ arguments.selectNextInputItem(WalletSendScreenEntryTag.amount)
+ })
+ case let .commentHeader(theme, text):
+ return ItemListSectionHeaderItem(theme: theme, text: text, sectionId: self.section)
+ case let .comment(theme, placeholder, value):
+ return ItemListMultilineInputItem(theme: theme, text: value, placeholder: placeholder, maxLength: nil, sectionId: self.section, style: .blocks, returnKeyType: .send, textUpdated: { comment in
+ arguments.updateState { state in
+ var state = state
+ state.comment = comment
+ return state
+ }
+ }, tag: WalletSendScreenEntryTag.comment, action: {
+ arguments.proceed()
+ })
+ }
+ }
+}
+
+private struct WalletSendScreenState: Equatable {
+ var address: String
+ var amount: String
+ var comment: String
+}
+
+private func walletSendScreenEntries(presentationData: PresentationData, balance: Int64?, state: WalletSendScreenState) -> [WalletSendScreenEntry] {
+ var entries: [WalletSendScreenEntry] = []
+ entries.append(.addressHeader(presentationData.theme, "RECIPIENT WALLET ADDRESS"))
+ entries.append(.address(presentationData.theme, "Enter wallet address...", state.address))
+ entries.append(.addressInfo(presentationData.theme, "Copy the 48-letter address of the recipient here or ask them to send you a ton:// link."))
+
+ let amount = amountValue(state.amount)
+ entries.append(.amountHeader(presentationData.theme, "AMOUNT", "BALANCE: \(stringForGramsAmount(balance ?? 0, decimalSeparator: presentationData.dateTimeFormat.decimalSeparator))💎", amount > 0 && (balance ?? 0) < amount))
+ entries.append(.amount(presentationData.theme, presentationData.strings, "Grams to send", state.amount ?? ""))
+
+ entries.append(.commentHeader(presentationData.theme, "COMMENT"))
+ entries.append(.comment(presentationData.theme, "Optional description of the payment", state.comment))
+ return entries
+}
+
+protocol WalletSendScreen {
+
+}
+
+private final class WalletSendScreenImpl: ItemListController, WalletSendScreen {
+
+}
+
+func walletSendScreen(context: AccountContext, tonContext: TonContext, walletInfo: WalletInfo, address: String? = nil, amount: Int64? = nil) -> ViewController {
+ let presentationData = context.sharedContext.currentPresentationData.with { $0 }
+ let initialState = WalletSendScreenState(address: address ?? "", amount: amount.flatMap { stringForGramsAmount($0, decimalSeparator: presentationData.dateTimeFormat.decimalSeparator) } ?? "", comment: "")
+
+ let statePromise = ValuePromise(initialState, ignoreRepeated: true)
+ let stateValue = Atomic(value: initialState)
+ let updateState: ((WalletSendScreenState) -> WalletSendScreenState) -> Void = { f in
+ statePromise.set(stateValue.modify { f($0) })
+ }
+
+ var presentControllerImpl: ((ViewController, Any?) -> Void)?
+ var presentInGlobalOverlayImpl: ((ViewController, Any?) -> Void)?
+ var pushImpl: ((ViewController) -> Void)?
+ var dismissImpl: (() -> Void)?
+ var selectNextInputItemImpl: ((WalletSendScreenEntryTag) -> Void)?
+
+ let arguments = WalletSendScreenArguments(context: context, updateState: { f in
+ updateState(f)
+ }, selectNextInputItem: { tag in
+ selectNextInputItemImpl?(tag)
+ }, proceed: {
+ let presentationData = context.sharedContext.currentPresentationData.with { $0 }
+ let state = stateValue.with { $0 }
+ let amount = amountValue(state.amount)
+
+ updateState { state in
+ var state = state
+ state.amount = stringForGramsAmount(amount, decimalSeparator: presentationData.dateTimeFormat.decimalSeparator)
+ return state
+ }
+
+ let title = NSAttributedString(string: "Confirmation", font: Font.semibold(17.0), textColor: presentationData.theme.actionSheet.primaryTextColor)
+
+ let address = state.address[state.address.startIndex.. Void)?
+ let controller = richTextAlertController(context: context, title: title, text: attributedText, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {
+ dismissAlertImpl?(true)
+ }), TextAlertAction(type: .defaultAction, title: "Confirm", action: {
+ dismissAlertImpl?(false)
+ pushImpl?(WalletPasscodeScreen(context: context, tonContext: tonContext, mode: .authorizeTransfer(walletInfo, state.address, amount, state.comment)))
+ })], dismissAutomatically: false)
+ presentInGlobalOverlayImpl?(controller, nil)
+
+ dismissAlertImpl = { [weak controller] animated in
+ if animated {
+ controller?.dismissAnimated()
+ } else {
+ controller?.dismiss()
+ }
+ }
+ })
+
+ let balance: Signal = Signal.single(WalletBalance(rawValue: 2500))
+
+ var focusItemTag: ItemListItemTag?
+ if address == nil {
+ focusItemTag = WalletSendScreenEntryTag.address
+ } else if amount == nil {
+ focusItemTag = WalletSendScreenEntryTag.amount
+ }
+
+ let signal = combineLatest(queue: .mainQueue(), context.sharedContext.presentationData, balance, statePromise.get())
+ |> map { presentationData, balance, state -> (ItemListControllerState, (ItemListNodeState, WalletSendScreenEntry.ItemGenerationArguments)) in
+ let leftNavigationButton = ItemListNavigationButton(content: .text(presentationData.strings.Common_Cancel), style: .regular, enabled: true, action: {
+ dismissImpl?()
+ })
+
+ let amount = amountValue(state.amount)
+ var sendEnabled = false
+ if let balance = balance {
+ sendEnabled = isValidAddress(state.address, exactLength: true) && amount > 0 && amount <= balance.rawValue
+ }
+ let rightNavigationButton = ItemListNavigationButton(content: .text("Send"), style: .bold, enabled: sendEnabled, action: {
+ arguments.proceed()
+ })
+
+ let controllerState = ItemListControllerState(theme: presentationData.theme, title: .text("Send Grams"), leftNavigationButton: leftNavigationButton, rightNavigationButton: rightNavigationButton, backNavigationButton: ItemListBackButton(title: presentationData.strings.Common_Back), animateChanges: false)
+ let listState = ItemListNodeState(entries: walletSendScreenEntries(presentationData: presentationData, balance: balance?.rawValue, state: state), style: .blocks, focusItemTag: focusItemTag, animateChanges: false)
+
+ return (controllerState, (listState, arguments))
+ }
+
+ let controller = WalletSendScreenImpl(context: context, state: signal)
+ controller.navigationPresentation = .modalInLargeLayout
+ presentControllerImpl = { [weak controller] c, a in
+ controller?.present(c, in: .window(.root), with: a)
+ }
+ presentInGlobalOverlayImpl = { [weak controller] c, a in
+ controller?.presentInGlobalOverlay(c, with: a)
+ }
+ pushImpl = { [weak controller] c in
+ controller?.push(c)
+ }
+ dismissImpl = { [weak controller] in
+ controller?.view.endEditing(true)
+ let _ = controller?.dismiss()
+ }
+ selectNextInputItemImpl = { [weak controller] currentTag in
+ guard let controller = controller else {
+ return
+ }
+ var resultItemNode: ItemListItemFocusableNode?
+ var focusOnNext = false
+ let _ = controller.frameForItemNode({ itemNode in
+ if let itemNode = itemNode as? ItemListItemNode, let tag = itemNode.tag, let focusableItemNode = itemNode as? ItemListItemFocusableNode {
+ if focusOnNext && resultItemNode == nil {
+ resultItemNode = focusableItemNode
+ return true
+ } else if currentTag.isEqual(to: tag) {
+ focusOnNext = true
+ }
+ }
+ return false
+ })
+ if let resultItemNode = resultItemNode {
+ resultItemNode.focus()
+ }
+ }
+ return controller
+}
diff --git a/submodules/WalletUI/Sources/WalletSplashScreen.swift b/submodules/WalletUI/Sources/WalletSplashScreen.swift
index 60e960cdba..c64f38b7f0 100644
--- a/submodules/WalletUI/Sources/WalletSplashScreen.swift
+++ b/submodules/WalletUI/Sources/WalletSplashScreen.swift
@@ -11,12 +11,15 @@ import SolidRoundedButtonNode
import AnimationUI
import SwiftSignalKit
import OverlayStatusController
+import ItemListUI
public enum WalletSplashMode {
case intro
case created(WalletInfo, [String])
case success(WalletInfo)
case restoreFailed
+ case sending(WalletInfo, String, Int64, String)
+ case sent(WalletInfo, Int64)
}
public final class WalletSplashScreen: ViewController {
@@ -45,6 +48,33 @@ public final class WalletSplashScreen: ViewController {
case .intro:
self.navigationItem.setLeftBarButton(UIBarButtonItem(title: "Not Now", style: .plain, target: self, action: #selector(self.backPressed)), animated: false)
self.navigationItem.setRightBarButton(UIBarButtonItem(title: "Import existing wallet", style: .plain, target: self, action: #selector(self.importPressed)), animated: false)
+ case let .sending(walletInfo, address, amount, comment):
+ self.navigationItem.setLeftBarButton(UIBarButtonItem(customDisplayNode: ASDisplayNode())!, animated: false)
+ let _ = (Signal.complete() |> delay(3.0, queue: Queue.mainQueue())).start(completed: { [weak self] in
+ guard let strongSelf = self else {
+ return
+ }
+ if let navigationController = strongSelf.navigationController as? NavigationController {
+ var controllers = navigationController.viewControllers
+ controllers = controllers.filter { controller in
+ if controller is WalletSplashScreen {
+ return false
+ }
+ if controller is WalletSendScreen {
+ return false
+ }
+ if controller is WalletInfoScreen {
+ return false
+ }
+ return true
+ }
+ controllers.append(WalletSplashScreen(context: strongSelf.context, tonContext: strongSelf.tonContext, mode: .sent(walletInfo, amount)))
+ strongSelf.view.endEditing(true)
+ navigationController.setViewControllers(controllers, animated: true)
+ }
+ })
+ case .sent:
+ self.navigationItem.setLeftBarButton(UIBarButtonItem(customDisplayNode: ASDisplayNode())!, animated: false)
case .created, .success, .restoreFailed:
break
}
@@ -83,7 +113,7 @@ public final class WalletSplashScreen: ViewController {
})
case let .created(walletInfo, wordList):
strongSelf.push(WalletWordDisplayScreen(context: strongSelf.context, tonContext: strongSelf.tonContext, walletInfo: walletInfo, wordList: wordList))
- case let .success(walletInfo):
+ case let .success(walletInfo), let .sent(walletInfo, _):
let _ = (walletAddress(publicKey: walletInfo.publicKey, tonInstance: strongSelf.tonContext.instance)
|> deliverOnMainQueue).start(next: { address in
guard let strongSelf = self else {
@@ -127,6 +157,8 @@ public final class WalletSplashScreen: ViewController {
strongSelf.view.endEditing(true)
navigationController.setViewControllers(controllers, animated: true)
}
+ case .sending:
+ break
}
}, secondaryAction: { [weak self] in
guard let strongSelf = self else {
@@ -182,7 +214,7 @@ private final class WalletSplashScreenNode: ViewControllerTracingNode {
let buttonText: String
let termsText: String
let secondaryActionText: String
-
+
switch mode {
case .intro:
title = "Gram Wallet"
@@ -220,6 +252,24 @@ private final class WalletSplashScreenNode: ViewControllerTracingNode {
self.animationNode.visibility = true
}
secondaryActionText = "Enter 24 words"
+ case .sending:
+ title = "Sending Grams"
+ text = "Please wait a few seconds for your transaction to be processed..."
+ buttonText = ""
+ termsText = ""
+ self.iconNode.image = UIImage(bundleImageName: "Settings/Wallet/SendingIcon")
+ secondaryActionText = ""
+ case let .sent(_, amount):
+ title = "Done!"
+ text = "\(amount) Grams have been sent."
+ buttonText = "View My Wallet"
+ termsText = ""
+ self.iconNode.image = nil
+ if let path = getAppBundle().path(forResource: "celebrate", ofType: "tgs") {
+ self.animationNode.setup(account: account, resource: .localFile(path), width: 280, height: 280, mode: .direct)
+ self.animationNode.visibility = true
+ }
+ secondaryActionText = ""
}
self.titleNode = ImmediateTextNode()
@@ -248,6 +298,7 @@ private final class WalletSplashScreenNode: ViewControllerTracingNode {
self.secondaryActionButtonNode = HighlightTrackingButtonNode()
self.buttonNode = SolidRoundedButtonNode(title: buttonText, theme: self.presentationData.theme, height: 50.0, cornerRadius: 10.0, gloss: true)
+ self.buttonNode.isHidden = buttonText.isEmpty
super.init()
diff --git a/submodules/WalletUI/WalletUI.xcodeproj/project.pbxproj b/submodules/WalletUI/WalletUI.xcodeproj/project.pbxproj
index e86b59dcee..1942d162a1 100644
--- a/submodules/WalletUI/WalletUI.xcodeproj/project.pbxproj
+++ b/submodules/WalletUI/WalletUI.xcodeproj/project.pbxproj
@@ -91,6 +91,32 @@
explicitFileType
archive.ar
+ 1DD70E291E16CC6C00000000
+
+ isa
+ PBXFileReference
+ name
+ libActionSheetPeerItem.a
+ path
+ libActionSheetPeerItem.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29BF0846EE00000000
+
+ isa
+ PBXFileReference
+ name
+ libActivityIndicator.a
+ path
+ libActivityIndicator.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E29F523B9DE00000000
isa
@@ -117,6 +143,84 @@
explicitFileType
archive.ar
+ 1DD70E29A54A195300000000
+
+ isa
+ PBXFileReference
+ name
+ libAvatarNode.a
+ path
+ libAvatarNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29BFBD457D00000000
+
+ isa
+ PBXFileReference
+ name
+ libCamera.a
+ path
+ libCamera.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E297AB043C800000000
+
+ isa
+ PBXFileReference
+ name
+ libChatListSearchRecentPeersNode.a
+ path
+ libChatListSearchRecentPeersNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E2997B4D6D800000000
+
+ isa
+ PBXFileReference
+ name
+ libCheckNode.a
+ path
+ libCheckNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E296C9831F100000000
+
+ isa
+ PBXFileReference
+ name
+ libContextUI.a
+ path
+ libContextUI.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E292417E0B200000000
+
+ isa
+ PBXFileReference
+ name
+ libDeviceAccess.a
+ path
+ libDeviceAccess.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E295915423000000000
isa
@@ -143,6 +247,19 @@
explicitFileType
compiled.mach-o.dylib
+ 1DD70E2971ED41B100000000
+
+ isa
+ PBXFileReference
+ name
+ libHorizontalPeerItem.a
+ path
+ libHorizontalPeerItem.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E29D6F14E1000000000
isa
@@ -156,6 +273,45 @@
explicitFileType
archive.ar
+ 1DD70E295A26607D00000000
+
+ isa
+ PBXFileReference
+ name
+ libItemListUI.a
+ path
+ libItemListUI.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29AC43662400000000
+
+ isa
+ PBXFileReference
+ name
+ libListSectionHeaderNode.a
+ path
+ libListSectionHeaderNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29A889192100000000
+
+ isa
+ PBXFileReference
+ name
+ libLocalAuth.a
+ path
+ libLocalAuth.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E29CE34063500000000
isa
@@ -182,6 +338,19 @@
explicitFileType
archive.ar
+ 1DD70E29C37F741500000000
+
+ isa
+ PBXFileReference
+ name
+ libMergeLists.a
+ path
+ libMergeLists.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E29BBAF750C00000000
isa
@@ -195,6 +364,45 @@
explicitFileType
archive.ar
+ 1DD70E29D0DBC52A00000000
+
+ isa
+ PBXFileReference
+ name
+ libPasscodeUI.a
+ path
+ libPasscodeUI.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29928D142900000000
+
+ isa
+ PBXFileReference
+ name
+ libPeerOnlineMarkerNode.a
+ path
+ libPeerOnlineMarkerNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29D233F68C00000000
+
+ isa
+ PBXFileReference
+ name
+ libPeerPresenceStatusManager.a
+ path
+ libPeerPresenceStatusManager.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E290F1A3C6400000000
isa
@@ -221,6 +429,32 @@
explicitFileType
compiled.mach-o.dylib
+ 1DD70E29CBE117ED00000000
+
+ isa
+ PBXFileReference
+ name
+ libProgressNavigationButtonNode.a
+ path
+ libProgressNavigationButtonNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29AA32BBC600000000
+
+ isa
+ PBXFileReference
+ name
+ libQrCode.a
+ path
+ libQrCode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E293E4DE92B00000000
isa
@@ -234,6 +468,71 @@
explicitFileType
archive.ar
+ 1DD70E29AD66967300000000
+
+ isa
+ PBXFileReference
+ name
+ libReactionSelectionNode.a
+ path
+ libReactionSelectionNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E291D58331200000000
+
+ isa
+ PBXFileReference
+ name
+ libSaveToCameraRoll.a
+ path
+ libSaveToCameraRoll.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E2957B5522500000000
+
+ isa
+ PBXFileReference
+ name
+ libSegmentedControlNode.a
+ path
+ libSegmentedControlNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E29097DBE9200000000
+
+ isa
+ PBXFileReference
+ name
+ libSelectablePeerNode.a
+ path
+ libSelectablePeerNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
+ 1DD70E2981AE180900000000
+
+ isa
+ PBXFileReference
+ name
+ libShareController.a
+ path
+ libShareController.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E29524F478E00000000
isa
@@ -273,6 +572,19 @@
explicitFileType
compiled.mach-o.dylib
+ 1DD70E2925BBFEEE00000000
+
+ isa
+ PBXFileReference
+ name
+ libSwitchNode.a
+ path
+ libSwitchNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E29F33FDAC300000000
isa
@@ -364,6 +676,19 @@
explicitFileType
archive.ar
+ 1DD70E29F40A586F00000000
+
+ isa
+ PBXFileReference
+ name
+ libTextSelectionNode.a
+ path
+ libTextSelectionNode.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
1DD70E29CD296A8300000000
isa
@@ -403,6 +728,19 @@
explicitFileType
archive.ar
+ 1DD70E29597BAFBB00000000
+
+ isa
+ PBXFileReference
+ name
+ libUrlEscaping.a
+ path
+ libUrlEscaping.a
+ sourceTree
+ BUILT_PRODUCTS_DIR
+ explicitFileType
+ archive.ar
+
B401C97968022A5500000000
isa
@@ -414,20 +752,44 @@
children
1DD70E299D2580DA00000000
+ 1DD70E291E16CC6C00000000
+ 1DD70E29BF0846EE00000000
1DD70E29F523B9DE00000000
1DD70E292420028600000000
+ 1DD70E29A54A195300000000
+ 1DD70E29BFBD457D00000000
+ 1DD70E297AB043C800000000
+ 1DD70E2997B4D6D800000000
+ 1DD70E296C9831F100000000
+ 1DD70E292417E0B200000000
1DD70E295915423000000000
1DD70E29FF334B1F00000000
+ 1DD70E2971ED41B100000000
1DD70E29D6F14E1000000000
+ 1DD70E295A26607D00000000
+ 1DD70E29AC43662400000000
+ 1DD70E29A889192100000000
1DD70E29CE34063500000000
1DD70E2936DE2CF900000000
+ 1DD70E29C37F741500000000
1DD70E29BBAF750C00000000
+ 1DD70E29D0DBC52A00000000
+ 1DD70E29928D142900000000
+ 1DD70E29D233F68C00000000
1DD70E290F1A3C6400000000
1DD70E29DB6520C800000000
+ 1DD70E29CBE117ED00000000
+ 1DD70E29AA32BBC600000000
1DD70E293E4DE92B00000000
+ 1DD70E29AD66967300000000
+ 1DD70E291D58331200000000
+ 1DD70E2957B5522500000000
+ 1DD70E29097DBE9200000000
+ 1DD70E2981AE180900000000
1DD70E29524F478E00000000
1DD70E293594DCC000000000
1DD70E29D65BA68200000000
+ 1DD70E2925BBFEEE00000000
1DD70E29F33FDAC300000000
1DD70E29119CDA0700000000
1DD70E2984A59C1D00000000
@@ -435,9 +797,11 @@
1DD70E292395015100000000
1DD70E29BA06E3A600000000
1DD70E29F0C15F9C00000000
+ 1DD70E29F40A586F00000000
1DD70E29CD296A8300000000
1DD70E29AE67341000000000
1DD70E2951398CF200000000
+ 1DD70E29597BAFBB00000000
1DD70E29D097476500000000
@@ -490,6 +854,61 @@
sourceTree
SOURCE_ROOT
+ 1DD70E29E336006800000000
+
+ isa
+ PBXFileReference
+ name
+ WalletPasscodeScreen.swift
+ path
+ Sources/WalletPasscodeScreen.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E296D49CFFF00000000
+
+ isa
+ PBXFileReference
+ name
+ WalletQrCodeItem.swift
+ path
+ Sources/WalletQrCodeItem.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E29DE28A96800000000
+
+ isa
+ PBXFileReference
+ name
+ WalletQrScanScreen.swift
+ path
+ Sources/WalletQrScanScreen.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E2979DDEBBB00000000
+
+ isa
+ PBXFileReference
+ name
+ WalletReceiveScreen.swift
+ path
+ Sources/WalletReceiveScreen.swift
+ sourceTree
+ SOURCE_ROOT
+
+ 1DD70E2948FA33F200000000
+
+ isa
+ PBXFileReference
+ name
+ WalletSendScreen.swift
+ path
+ Sources/WalletSendScreen.swift
+ sourceTree
+ SOURCE_ROOT
+
1DD70E2964068E1100000000
isa
@@ -534,6 +953,11 @@
children
1DD70E29D2B1401800000000
+ 1DD70E29E336006800000000
+ 1DD70E296D49CFFF00000000
+ 1DD70E29DE28A96800000000
+ 1DD70E2979DDEBBB00000000
+ 1DD70E2948FA33F200000000
1DD70E2964068E1100000000
1DD70E2936794EB600000000
1DD70E290678D03000000000
@@ -576,6 +1000,41 @@
fileRef
1DD70E29D2B1401800000000
+ E7A30F04E336006800000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29E336006800000000
+
+ E7A30F046D49CFFF00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E296D49CFFF00000000
+
+ E7A30F04DE28A96800000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29DE28A96800000000
+
+ E7A30F0479DDEBBB00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2979DDEBBB00000000
+
+ E7A30F0448FA33F200000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2948FA33F200000000
+
E7A30F0464068E1100000000
isa
@@ -604,6 +1063,11 @@
files
E7A30F04D2B1401800000000
+ E7A30F04E336006800000000
+ E7A30F046D49CFFF00000000
+ E7A30F04DE28A96800000000
+ E7A30F0479DDEBBB00000000
+ E7A30F0448FA33F200000000
E7A30F0464068E1100000000
E7A30F0436794EB600000000
E7A30F040678D03000000000
@@ -728,19 +1192,12 @@
fileRef
1DD70E29F523B9DE00000000
- E7A30F04BBAF750C00000000
+ E7A30F04BFBD457D00000000
isa
PBXBuildFile
fileRef
- 1DD70E29BBAF750C00000000
-
- E7A30F04524F478E00000000
-
- isa
- PBXBuildFile
- fileRef
- 1DD70E29524F478E00000000
+ 1DD70E29BFBD457D00000000
E7A30F04D6F14E1000000000
@@ -770,6 +1227,160 @@
fileRef
1DD70E292420028600000000
+ E7A30F0497B4D6D800000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2997B4D6D800000000
+
+ E7A30F04C37F741500000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29C37F741500000000
+
+ E7A30F04BF0846EE00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29BF0846EE00000000
+
+ E7A30F04CBE117ED00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29CBE117ED00000000
+
+ E7A30F0457B5522500000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2957B5522500000000
+
+ E7A30F0425BBFEEE00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2925BBFEEE00000000
+
+ E7A30F045A26607D00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E295A26607D00000000
+
+ E7A30F04BBAF750C00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29BBAF750C00000000
+
+ E7A30F04A889192100000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29A889192100000000
+
+ E7A30F04D0DBC52A00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29D0DBC52A00000000
+
+ E7A30F04AA32BBC600000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29AA32BBC600000000
+
+ E7A30F04A54A195300000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29A54A195300000000
+
+ E7A30F041E16CC6C00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E291E16CC6C00000000
+
+ E7A30F04AD66967300000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29AD66967300000000
+
+ E7A30F04F40A586F00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29F40A586F00000000
+
+ E7A30F046C9831F100000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E296C9831F100000000
+
+ E7A30F04928D142900000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29928D142900000000
+
+ E7A30F04097DBE9200000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29097DBE9200000000
+
+ E7A30F0471ED41B100000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2971ED41B100000000
+
+ E7A30F04AC43662400000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29AC43662400000000
+
+ E7A30F047AB043C800000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E297AB043C800000000
+
+ E7A30F04D233F68C00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29D233F68C00000000
+
E7A30F043E4DE92B00000000
isa
@@ -777,6 +1388,41 @@
fileRef
1DD70E293E4DE92B00000000
+ E7A30F042417E0B200000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E292417E0B200000000
+
+ E7A30F041D58331200000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E291D58331200000000
+
+ E7A30F04597BAFBB00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29597BAFBB00000000
+
+ E7A30F0481AE180900000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E2981AE180900000000
+
+ E7A30F04524F478E00000000
+
+ isa
+ PBXBuildFile
+ fileRef
+ 1DD70E29524F478E00000000
+
E7A30F04AE67341000000000
isa
@@ -807,13 +1453,39 @@
E7A30F04BA06E3A600000000
E7A30F049D2580DA00000000
E7A30F04F523B9DE00000000
- E7A30F04BBAF750C00000000
- E7A30F04524F478E00000000
+ E7A30F04BFBD457D00000000
E7A30F04D6F14E1000000000
E7A30F04CD296A8300000000
E7A30F043594DCC000000000
E7A30F042420028600000000
+ E7A30F0497B4D6D800000000
+ E7A30F04C37F741500000000
+ E7A30F04BF0846EE00000000
+ E7A30F04CBE117ED00000000
+ E7A30F0457B5522500000000
+ E7A30F0425BBFEEE00000000
+ E7A30F045A26607D00000000
+ E7A30F04BBAF750C00000000
+ E7A30F04A889192100000000
+ E7A30F04D0DBC52A00000000
+ E7A30F04AA32BBC600000000
+ E7A30F04A54A195300000000
+ E7A30F041E16CC6C00000000
+ E7A30F04AD66967300000000
+ E7A30F04F40A586F00000000
+ E7A30F046C9831F100000000
+ E7A30F04928D142900000000
+ E7A30F04097DBE9200000000
+ E7A30F0471ED41B100000000
+ E7A30F04AC43662400000000
+ E7A30F047AB043C800000000
+ E7A30F04D233F68C00000000
E7A30F043E4DE92B00000000
+ E7A30F042417E0B200000000
+ E7A30F041D58331200000000
+ E7A30F04597BAFBB00000000
+ E7A30F0481AE180900000000
+ E7A30F04524F478E00000000
E7A30F04AE67341000000000
name