diff --git a/TelegramCore.xcodeproj/project.pbxproj b/TelegramCore.xcodeproj/project.pbxproj index 6379cc75df..f03335be55 100644 --- a/TelegramCore.xcodeproj/project.pbxproj +++ b/TelegramCore.xcodeproj/project.pbxproj @@ -218,7 +218,6 @@ D03B0E541D631E8500955575 /* RingBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E501D631E8500955575 /* RingBuffer.m */; }; D03B0E561D631EA500955575 /* MediaFrameSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E551D631EA500955575 /* MediaFrameSource.swift */; }; D03B0E581D631EB900955575 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E571D631EB900955575 /* CoreMedia.framework */; }; - D03B0E5A1D63215200955575 /* TelegramCore.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = D03B0E591D63215200955575 /* TelegramCore.xcconfig */; }; D03B0E5C1D63241D00955575 /* TelegramCoreIncludes.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */; }; D03B0E5E1D6327F600955575 /* SSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E5D1D6327F600955575 /* SSignalKit.framework */; }; D03B0E601D6327FF00955575 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E5F1D6327FF00955575 /* libz.tbd */; }; @@ -228,6 +227,9 @@ D03B0E681D63281A00955575 /* libswresample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E641D63281A00955575 /* libswresample.a */; }; D03B0E6A1D63283000955575 /* libwebp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E691D63283000955575 /* libwebp.a */; }; D03B0E6C1D63283C00955575 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E6B1D63283C00955575 /* libiconv.tbd */; }; + D03B0E6E1D632E3800955575 /* AuthorizationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E6D1D632E3800955575 /* AuthorizationController.swift */; }; + D03B0E8F1D63520500955575 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D03B0E8E1D63520500955575 /* Images.xcassets */; }; + D03B0E911D6352C900955575 /* FrameworkBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E901D6352C900955575 /* FrameworkBundle.swift */; }; D06706691D512ADB00DED3E3 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706641D512ADB00DED3E3 /* AsyncDisplayKit.framework */; }; D067066A1D512ADB00DED3E3 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706651D512ADB00DED3E3 /* Display.framework */; }; D067066C1D512ADB00DED3E3 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706671D512ADB00DED3E3 /* Postbox.framework */; }; @@ -236,6 +238,104 @@ D09D8C0B1D4FAB1D0081DBEC /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D09D8C011D4FAB1D0081DBEC /* TelegramCore.framework */; }; D09D8C101D4FAB1D0081DBEC /* TelegramCoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D09D8C0F1D4FAB1D0081DBEC /* TelegramCoreTests.m */; }; D09D8C121D4FAB1D0081DBEC /* TelegramCore.h in Headers */ = {isa = PBXBuildFile; fileRef = D09D8C041D4FAB1D0081DBEC /* TelegramCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D0AB0B921D65E9FA002C78E7 /* ManagedServiceViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B911D65E9FA002C78E7 /* ManagedServiceViews.swift */; }; + D0AB0B941D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B931D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift */; }; + D0AB0B961D662F0B002C78E7 /* ManagedChatListHoles.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */; }; + D0AB0B981D664E18002C78E7 /* ManagedUnsentMessageIndices.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */; }; + D0AB0B9A1D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */; }; + D0DB83661D638F6300A44C96 /* avcodec.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83011D638F6300A44C96 /* avcodec.h */; }; + D0DB83671D638F6300A44C96 /* avdct.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83021D638F6300A44C96 /* avdct.h */; }; + D0DB83681D638F6300A44C96 /* avfft.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83031D638F6300A44C96 /* avfft.h */; }; + D0DB83691D638F6300A44C96 /* d3d11va.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83041D638F6300A44C96 /* d3d11va.h */; }; + D0DB836A1D638F6300A44C96 /* dirac.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83051D638F6300A44C96 /* dirac.h */; }; + D0DB836B1D638F6300A44C96 /* dv_profile.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83061D638F6300A44C96 /* dv_profile.h */; }; + D0DB836C1D638F6300A44C96 /* dxva2.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83071D638F6300A44C96 /* dxva2.h */; }; + D0DB836D1D638F6300A44C96 /* jni.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83081D638F6300A44C96 /* jni.h */; }; + D0DB836E1D638F6300A44C96 /* qsv.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83091D638F6300A44C96 /* qsv.h */; }; + D0DB836F1D638F6300A44C96 /* vaapi.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830A1D638F6300A44C96 /* vaapi.h */; }; + D0DB83701D638F6300A44C96 /* vda.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830B1D638F6300A44C96 /* vda.h */; }; + D0DB83711D638F6300A44C96 /* vdpau.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830C1D638F6300A44C96 /* vdpau.h */; }; + D0DB83721D638F6300A44C96 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830D1D638F6300A44C96 /* version.h */; }; + D0DB83731D638F6300A44C96 /* videotoolbox.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830E1D638F6300A44C96 /* videotoolbox.h */; }; + D0DB83741D638F6300A44C96 /* vorbis_parser.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830F1D638F6300A44C96 /* vorbis_parser.h */; }; + D0DB83751D638F6300A44C96 /* xvmc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83101D638F6300A44C96 /* xvmc.h */; }; + D0DB83761D638F6300A44C96 /* avformat.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83121D638F6300A44C96 /* avformat.h */; }; + D0DB83771D638F6300A44C96 /* avio.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83131D638F6300A44C96 /* avio.h */; }; + D0DB83781D638F6300A44C96 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83141D638F6300A44C96 /* version.h */; }; + D0DB83791D638F6300A44C96 /* adler32.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83161D638F6300A44C96 /* adler32.h */; }; + D0DB837A1D638F6300A44C96 /* aes.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83171D638F6300A44C96 /* aes.h */; }; + D0DB837B1D638F6300A44C96 /* aes_ctr.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83181D638F6300A44C96 /* aes_ctr.h */; }; + D0DB837C1D638F6300A44C96 /* attributes.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83191D638F6300A44C96 /* attributes.h */; }; + D0DB837D1D638F6300A44C96 /* audio_fifo.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831A1D638F6300A44C96 /* audio_fifo.h */; }; + D0DB837E1D638F6300A44C96 /* avassert.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831B1D638F6300A44C96 /* avassert.h */; }; + D0DB837F1D638F6300A44C96 /* avconfig.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831C1D638F6300A44C96 /* avconfig.h */; }; + D0DB83801D638F6300A44C96 /* avstring.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831D1D638F6300A44C96 /* avstring.h */; }; + D0DB83811D638F6300A44C96 /* avutil.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831E1D638F6300A44C96 /* avutil.h */; }; + D0DB83821D638F6300A44C96 /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831F1D638F6300A44C96 /* base64.h */; }; + D0DB83831D638F6300A44C96 /* blowfish.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83201D638F6300A44C96 /* blowfish.h */; }; + D0DB83841D638F6300A44C96 /* bprint.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83211D638F6300A44C96 /* bprint.h */; }; + D0DB83851D638F6400A44C96 /* bswap.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83221D638F6300A44C96 /* bswap.h */; }; + D0DB83861D638F6400A44C96 /* buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83231D638F6300A44C96 /* buffer.h */; }; + D0DB83871D638F6400A44C96 /* camellia.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83241D638F6300A44C96 /* camellia.h */; }; + D0DB83881D638F6400A44C96 /* cast5.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83251D638F6300A44C96 /* cast5.h */; }; + D0DB83891D638F6400A44C96 /* channel_layout.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83261D638F6300A44C96 /* channel_layout.h */; }; + D0DB838A1D638F6400A44C96 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83271D638F6300A44C96 /* common.h */; }; + D0DB838B1D638F6400A44C96 /* cpu.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83281D638F6300A44C96 /* cpu.h */; }; + D0DB838C1D638F6400A44C96 /* crc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83291D638F6300A44C96 /* crc.h */; }; + D0DB838D1D638F6400A44C96 /* des.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832A1D638F6300A44C96 /* des.h */; }; + D0DB838E1D638F6400A44C96 /* dict.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832B1D638F6300A44C96 /* dict.h */; }; + D0DB838F1D638F6400A44C96 /* display.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832C1D638F6300A44C96 /* display.h */; }; + D0DB83901D638F6400A44C96 /* downmix_info.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832D1D638F6300A44C96 /* downmix_info.h */; }; + D0DB83911D638F6400A44C96 /* error.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832E1D638F6300A44C96 /* error.h */; }; + D0DB83921D638F6400A44C96 /* eval.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832F1D638F6300A44C96 /* eval.h */; }; + D0DB83931D638F6400A44C96 /* ffversion.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83301D638F6300A44C96 /* ffversion.h */; }; + D0DB83941D638F6400A44C96 /* fifo.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83311D638F6300A44C96 /* fifo.h */; }; + D0DB83951D638F6400A44C96 /* file.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83321D638F6300A44C96 /* file.h */; }; + D0DB83961D638F6400A44C96 /* frame.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83331D638F6300A44C96 /* frame.h */; }; + D0DB83971D638F6400A44C96 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83341D638F6300A44C96 /* hash.h */; }; + D0DB83981D638F6400A44C96 /* hmac.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83351D638F6300A44C96 /* hmac.h */; }; + D0DB83991D638F6400A44C96 /* hwcontext.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83361D638F6300A44C96 /* hwcontext.h */; }; + D0DB839A1D638F6400A44C96 /* hwcontext_cuda.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83371D638F6300A44C96 /* hwcontext_cuda.h */; }; + D0DB839B1D638F6400A44C96 /* hwcontext_dxva2.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83381D638F6300A44C96 /* hwcontext_dxva2.h */; }; + D0DB839C1D638F6400A44C96 /* hwcontext_vaapi.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83391D638F6300A44C96 /* hwcontext_vaapi.h */; }; + D0DB839D1D638F6400A44C96 /* hwcontext_vdpau.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833A1D638F6300A44C96 /* hwcontext_vdpau.h */; }; + D0DB839E1D638F6400A44C96 /* imgutils.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833B1D638F6300A44C96 /* imgutils.h */; }; + D0DB839F1D638F6400A44C96 /* intfloat.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833C1D638F6300A44C96 /* intfloat.h */; }; + D0DB83A01D638F6400A44C96 /* intreadwrite.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833D1D638F6300A44C96 /* intreadwrite.h */; }; + D0DB83A11D638F6400A44C96 /* lfg.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833E1D638F6300A44C96 /* lfg.h */; }; + D0DB83A21D638F6400A44C96 /* log.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833F1D638F6300A44C96 /* log.h */; }; + D0DB83A31D638F6400A44C96 /* macros.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83401D638F6300A44C96 /* macros.h */; }; + D0DB83A41D638F6400A44C96 /* mastering_display_metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83411D638F6300A44C96 /* mastering_display_metadata.h */; }; + D0DB83A51D638F6400A44C96 /* mathematics.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83421D638F6300A44C96 /* mathematics.h */; }; + D0DB83A61D638F6400A44C96 /* md5.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83431D638F6300A44C96 /* md5.h */; }; + D0DB83A71D638F6400A44C96 /* mem.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83441D638F6300A44C96 /* mem.h */; }; + D0DB83A81D638F6400A44C96 /* motion_vector.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83451D638F6300A44C96 /* motion_vector.h */; }; + D0DB83A91D638F6400A44C96 /* murmur3.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83461D638F6300A44C96 /* murmur3.h */; }; + D0DB83AA1D638F6400A44C96 /* opt.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83471D638F6300A44C96 /* opt.h */; }; + D0DB83AB1D638F6400A44C96 /* parseutils.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83481D638F6300A44C96 /* parseutils.h */; }; + D0DB83AC1D638F6400A44C96 /* pixdesc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83491D638F6300A44C96 /* pixdesc.h */; }; + D0DB83AD1D638F6400A44C96 /* pixelutils.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834A1D638F6300A44C96 /* pixelutils.h */; }; + D0DB83AE1D638F6400A44C96 /* pixfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834B1D638F6300A44C96 /* pixfmt.h */; }; + D0DB83AF1D638F6400A44C96 /* random_seed.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834C1D638F6300A44C96 /* random_seed.h */; }; + D0DB83B01D638F6400A44C96 /* rational.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834D1D638F6300A44C96 /* rational.h */; }; + D0DB83B11D638F6400A44C96 /* rc4.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834E1D638F6300A44C96 /* rc4.h */; }; + D0DB83B21D638F6400A44C96 /* replaygain.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834F1D638F6300A44C96 /* replaygain.h */; }; + D0DB83B31D638F6400A44C96 /* ripemd.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83501D638F6300A44C96 /* ripemd.h */; }; + D0DB83B41D638F6400A44C96 /* samplefmt.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83511D638F6300A44C96 /* samplefmt.h */; }; + D0DB83B51D638F6400A44C96 /* sha.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83521D638F6300A44C96 /* sha.h */; }; + D0DB83B61D638F6400A44C96 /* sha512.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83531D638F6300A44C96 /* sha512.h */; }; + D0DB83B71D638F6400A44C96 /* stereo3d.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83541D638F6300A44C96 /* stereo3d.h */; }; + D0DB83B81D638F6400A44C96 /* tea.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83551D638F6300A44C96 /* tea.h */; }; + D0DB83B91D638F6400A44C96 /* threadmessage.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83561D638F6300A44C96 /* threadmessage.h */; }; + D0DB83BA1D638F6400A44C96 /* time.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83571D638F6300A44C96 /* time.h */; }; + D0DB83BB1D638F6400A44C96 /* timecode.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83581D638F6300A44C96 /* timecode.h */; }; + D0DB83BC1D638F6400A44C96 /* timestamp.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83591D638F6300A44C96 /* timestamp.h */; }; + D0DB83BD1D638F6400A44C96 /* tree.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835A1D638F6300A44C96 /* tree.h */; }; + D0DB83BE1D638F6400A44C96 /* twofish.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835B1D638F6300A44C96 /* twofish.h */; }; + D0DB83BF1D638F6400A44C96 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835C1D638F6300A44C96 /* version.h */; }; + D0DB83C01D638F6400A44C96 /* xtea.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835D1D638F6300A44C96 /* xtea.h */; }; + D0DB83C11D638F6400A44C96 /* swresample.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835F1D638F6300A44C96 /* swresample.h */; }; + D0DB83C21D638F6400A44C96 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83601D638F6300A44C96 /* version.h */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -470,9 +570,11 @@ D03B0E641D63281A00955575 /* libswresample.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libswresample.a; path = "third-party/FFmpeg-iOS/lib/libswresample.a"; sourceTree = ""; }; D03B0E691D63283000955575 /* libwebp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebp.a; path = "third-party/libwebp/lib/libwebp.a"; sourceTree = ""; }; D03B0E6B1D63283C00955575 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; }; + D03B0E6D1D632E3800955575 /* AuthorizationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthorizationController.swift; sourceTree = ""; }; + D03B0E8E1D63520500955575 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = TelegramCore/Images.xcassets; sourceTree = ""; }; + D03B0E901D6352C900955575 /* FrameworkBundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FrameworkBundle.swift; sourceTree = ""; }; D06706641D512ADB00DED3E3 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AsyncDisplayKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/AsyncDisplayKit.framework"; sourceTree = ""; }; D06706651D512ADB00DED3E3 /* Display.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Display.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/Display.framework"; sourceTree = ""; }; - D06706661D512ADB00DED3E3 /* MtProtoKitDynamic.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MtProtoKitDynamic.framework; path = "../MtProtoKit/build/Debug-iphoneos/MtProtoKitDynamic.framework"; sourceTree = ""; }; D06706671D512ADB00DED3E3 /* Postbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Postbox.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/Postbox.framework"; sourceTree = ""; }; D06706681D512ADB00DED3E3 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftSignalKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/SwiftSignalKit.framework"; sourceTree = ""; }; D067066E1D512AEB00DED3E3 /* MtProtoKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MtProtoKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/MtProtoKit.framework"; sourceTree = ""; }; @@ -482,6 +584,104 @@ D09D8C0A1D4FAB1D0081DBEC /* TelegramCoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TelegramCoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; D09D8C0F1D4FAB1D0081DBEC /* TelegramCoreTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TelegramCoreTests.m; sourceTree = ""; }; D09D8C111D4FAB1D0081DBEC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D0AB0B911D65E9FA002C78E7 /* ManagedServiceViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedServiceViews.swift; sourceTree = ""; }; + D0AB0B931D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedMessageHistoryHoles.swift; sourceTree = ""; }; + D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedChatListHoles.swift; sourceTree = ""; }; + D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedUnsentMessageIndices.swift; sourceTree = ""; }; + D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedSynchronizePeerReadStates.swift; sourceTree = ""; }; + D0DB83011D638F6300A44C96 /* avcodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avcodec.h; sourceTree = ""; }; + D0DB83021D638F6300A44C96 /* avdct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avdct.h; sourceTree = ""; }; + D0DB83031D638F6300A44C96 /* avfft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avfft.h; sourceTree = ""; }; + D0DB83041D638F6300A44C96 /* d3d11va.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = d3d11va.h; sourceTree = ""; }; + D0DB83051D638F6300A44C96 /* dirac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dirac.h; sourceTree = ""; }; + D0DB83061D638F6300A44C96 /* dv_profile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dv_profile.h; sourceTree = ""; }; + D0DB83071D638F6300A44C96 /* dxva2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dxva2.h; sourceTree = ""; }; + D0DB83081D638F6300A44C96 /* jni.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jni.h; sourceTree = ""; }; + D0DB83091D638F6300A44C96 /* qsv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = qsv.h; sourceTree = ""; }; + D0DB830A1D638F6300A44C96 /* vaapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vaapi.h; sourceTree = ""; }; + D0DB830B1D638F6300A44C96 /* vda.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vda.h; sourceTree = ""; }; + D0DB830C1D638F6300A44C96 /* vdpau.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vdpau.h; sourceTree = ""; }; + D0DB830D1D638F6300A44C96 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; + D0DB830E1D638F6300A44C96 /* videotoolbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = videotoolbox.h; sourceTree = ""; }; + D0DB830F1D638F6300A44C96 /* vorbis_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vorbis_parser.h; sourceTree = ""; }; + D0DB83101D638F6300A44C96 /* xvmc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xvmc.h; sourceTree = ""; }; + D0DB83121D638F6300A44C96 /* avformat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avformat.h; sourceTree = ""; }; + D0DB83131D638F6300A44C96 /* avio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avio.h; sourceTree = ""; }; + D0DB83141D638F6300A44C96 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; + D0DB83161D638F6300A44C96 /* adler32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = adler32.h; sourceTree = ""; }; + D0DB83171D638F6300A44C96 /* aes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes.h; sourceTree = ""; }; + D0DB83181D638F6300A44C96 /* aes_ctr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes_ctr.h; sourceTree = ""; }; + D0DB83191D638F6300A44C96 /* attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = attributes.h; sourceTree = ""; }; + D0DB831A1D638F6300A44C96 /* audio_fifo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio_fifo.h; sourceTree = ""; }; + D0DB831B1D638F6300A44C96 /* avassert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avassert.h; sourceTree = ""; }; + D0DB831C1D638F6300A44C96 /* avconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avconfig.h; sourceTree = ""; }; + D0DB831D1D638F6300A44C96 /* avstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avstring.h; sourceTree = ""; }; + D0DB831E1D638F6300A44C96 /* avutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avutil.h; sourceTree = ""; }; + D0DB831F1D638F6300A44C96 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base64.h; sourceTree = ""; }; + D0DB83201D638F6300A44C96 /* blowfish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blowfish.h; sourceTree = ""; }; + D0DB83211D638F6300A44C96 /* bprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bprint.h; sourceTree = ""; }; + D0DB83221D638F6300A44C96 /* bswap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bswap.h; sourceTree = ""; }; + D0DB83231D638F6300A44C96 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = ""; }; + D0DB83241D638F6300A44C96 /* camellia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = camellia.h; sourceTree = ""; }; + D0DB83251D638F6300A44C96 /* cast5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cast5.h; sourceTree = ""; }; + D0DB83261D638F6300A44C96 /* channel_layout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = channel_layout.h; sourceTree = ""; }; + D0DB83271D638F6300A44C96 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = ""; }; + D0DB83281D638F6300A44C96 /* cpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpu.h; sourceTree = ""; }; + D0DB83291D638F6300A44C96 /* crc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crc.h; sourceTree = ""; }; + D0DB832A1D638F6300A44C96 /* des.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = des.h; sourceTree = ""; }; + D0DB832B1D638F6300A44C96 /* dict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dict.h; sourceTree = ""; }; + D0DB832C1D638F6300A44C96 /* display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = display.h; sourceTree = ""; }; + D0DB832D1D638F6300A44C96 /* downmix_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = downmix_info.h; sourceTree = ""; }; + D0DB832E1D638F6300A44C96 /* error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = error.h; sourceTree = ""; }; + D0DB832F1D638F6300A44C96 /* eval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eval.h; sourceTree = ""; }; + D0DB83301D638F6300A44C96 /* ffversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffversion.h; sourceTree = ""; }; + D0DB83311D638F6300A44C96 /* fifo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fifo.h; sourceTree = ""; }; + D0DB83321D638F6300A44C96 /* file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = ""; }; + D0DB83331D638F6300A44C96 /* frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = frame.h; sourceTree = ""; }; + D0DB83341D638F6300A44C96 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hash.h; sourceTree = ""; }; + D0DB83351D638F6300A44C96 /* hmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hmac.h; sourceTree = ""; }; + D0DB83361D638F6300A44C96 /* hwcontext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext.h; sourceTree = ""; }; + D0DB83371D638F6300A44C96 /* hwcontext_cuda.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext_cuda.h; sourceTree = ""; }; + D0DB83381D638F6300A44C96 /* hwcontext_dxva2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext_dxva2.h; sourceTree = ""; }; + D0DB83391D638F6300A44C96 /* hwcontext_vaapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext_vaapi.h; sourceTree = ""; }; + D0DB833A1D638F6300A44C96 /* hwcontext_vdpau.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext_vdpau.h; sourceTree = ""; }; + D0DB833B1D638F6300A44C96 /* imgutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgutils.h; sourceTree = ""; }; + D0DB833C1D638F6300A44C96 /* intfloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intfloat.h; sourceTree = ""; }; + D0DB833D1D638F6300A44C96 /* intreadwrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intreadwrite.h; sourceTree = ""; }; + D0DB833E1D638F6300A44C96 /* lfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lfg.h; sourceTree = ""; }; + D0DB833F1D638F6300A44C96 /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = log.h; sourceTree = ""; }; + D0DB83401D638F6300A44C96 /* macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macros.h; sourceTree = ""; }; + D0DB83411D638F6300A44C96 /* mastering_display_metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mastering_display_metadata.h; sourceTree = ""; }; + D0DB83421D638F6300A44C96 /* mathematics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mathematics.h; sourceTree = ""; }; + D0DB83431D638F6300A44C96 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md5.h; sourceTree = ""; }; + D0DB83441D638F6300A44C96 /* mem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mem.h; sourceTree = ""; }; + D0DB83451D638F6300A44C96 /* motion_vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = motion_vector.h; sourceTree = ""; }; + D0DB83461D638F6300A44C96 /* murmur3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = murmur3.h; sourceTree = ""; }; + D0DB83471D638F6300A44C96 /* opt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opt.h; sourceTree = ""; }; + D0DB83481D638F6300A44C96 /* parseutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parseutils.h; sourceTree = ""; }; + D0DB83491D638F6300A44C96 /* pixdesc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixdesc.h; sourceTree = ""; }; + D0DB834A1D638F6300A44C96 /* pixelutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixelutils.h; sourceTree = ""; }; + D0DB834B1D638F6300A44C96 /* pixfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixfmt.h; sourceTree = ""; }; + D0DB834C1D638F6300A44C96 /* random_seed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = random_seed.h; sourceTree = ""; }; + D0DB834D1D638F6300A44C96 /* rational.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rational.h; sourceTree = ""; }; + D0DB834E1D638F6300A44C96 /* rc4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rc4.h; sourceTree = ""; }; + D0DB834F1D638F6300A44C96 /* replaygain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = replaygain.h; sourceTree = ""; }; + D0DB83501D638F6300A44C96 /* ripemd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ripemd.h; sourceTree = ""; }; + D0DB83511D638F6300A44C96 /* samplefmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = samplefmt.h; sourceTree = ""; }; + D0DB83521D638F6300A44C96 /* sha.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sha.h; sourceTree = ""; }; + D0DB83531D638F6300A44C96 /* sha512.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sha512.h; sourceTree = ""; }; + D0DB83541D638F6300A44C96 /* stereo3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stereo3d.h; sourceTree = ""; }; + D0DB83551D638F6300A44C96 /* tea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tea.h; sourceTree = ""; }; + D0DB83561D638F6300A44C96 /* threadmessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = threadmessage.h; sourceTree = ""; }; + D0DB83571D638F6300A44C96 /* time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = time.h; sourceTree = ""; }; + D0DB83581D638F6300A44C96 /* timecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timecode.h; sourceTree = ""; }; + D0DB83591D638F6300A44C96 /* timestamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timestamp.h; sourceTree = ""; }; + D0DB835A1D638F6300A44C96 /* tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tree.h; sourceTree = ""; }; + D0DB835B1D638F6300A44C96 /* twofish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = twofish.h; sourceTree = ""; }; + D0DB835C1D638F6300A44C96 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; + D0DB835D1D638F6300A44C96 /* xtea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xtea.h; sourceTree = ""; }; + D0DB835F1D638F6300A44C96 /* swresample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = swresample.h; sourceTree = ""; }; + D0DB83601D638F6300A44C96 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -520,6 +720,7 @@ D03B0C791D62153400955575 /* third-party */ = { isa = PBXGroup; children = ( + D0DB82FE1D638F6300A44C96 /* FFmpeg-iOS */, D03B0CAF1D6222D400955575 /* libwebp */, D03B0C7A1D6222CA00955575 /* libphonenumber-iOS */, ); @@ -760,6 +961,11 @@ D03B0D621D631A8B00955575 /* AccountSettings.swift */, D03B0D631D631A8B00955575 /* AccountViewTracker.swift */, D03B0D641D631A8B00955575 /* RecentPeers.swift */, + D0AB0B911D65E9FA002C78E7 /* ManagedServiceViews.swift */, + D0AB0B931D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift */, + D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */, + D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */, + D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */, ); name = Account; sourceTree = ""; @@ -786,6 +992,7 @@ children = ( D03B0D741D631AF200955575 /* Components */, D03B0DA01D631B9200955575 /* Controllers */, + D03B0E901D6352C900955575 /* FrameworkBundle.swift */, ); name = "User Interface"; sourceTree = ""; @@ -879,6 +1086,7 @@ D03B0DA11D631BA800955575 /* Authorization */ = { isa = PBXGroup; children = ( + D03B0E6D1D632E3800955575 /* AuthorizationController.swift */, D03B0DA21D631BBF00955575 /* AuthorizationCodeController.swift */, D03B0DA31D631BBF00955575 /* AuthorizationCodeControllerNode.swift */, D03B0DA61D631BBF00955575 /* AuthorizationPasswordController.swift */, @@ -1060,6 +1268,7 @@ D03B0E3A1D631E4400955575 /* Supporting Files */ = { isa = PBXGroup; children = ( + D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */, D03B0E4D1D631E8500955575 /* FFMpegSwResample.h */, D03B0E4E1D631E8500955575 /* FFMpegSwResample.m */, D03B0E4F1D631E8500955575 /* RingBuffer.h */, @@ -1092,7 +1301,6 @@ D067066E1D512AEB00DED3E3 /* MtProtoKit.framework */, D06706641D512ADB00DED3E3 /* AsyncDisplayKit.framework */, D06706651D512ADB00DED3E3 /* Display.framework */, - D06706661D512ADB00DED3E3 /* MtProtoKitDynamic.framework */, D06706671D512ADB00DED3E3 /* Postbox.framework */, D06706681D512ADB00DED3E3 /* SwiftSignalKit.framework */, ); @@ -1102,6 +1310,7 @@ D09D8BF71D4FAB1D0081DBEC = { isa = PBXGroup; children = ( + D03B0E8E1D63520500955575 /* Images.xcassets */, D03B0E591D63215200955575 /* TelegramCore.xcconfig */, D09D8C031D4FAB1D0081DBEC /* TelegramCore */, D09D8C0E1D4FAB1D0081DBEC /* TelegramCoreTests */, @@ -1134,7 +1343,6 @@ D03B0D731D631ADB00955575 /* User Interface */, D03B0E3A1D631E4400955575 /* Supporting Files */, D09D8C041D4FAB1D0081DBEC /* TelegramCore.h */, - D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */, D09D8C051D4FAB1D0081DBEC /* Info.plist */, ); path = TelegramCore; @@ -1149,6 +1357,147 @@ path = TelegramCoreTests; sourceTree = ""; }; + D0DB82FE1D638F6300A44C96 /* FFmpeg-iOS */ = { + isa = PBXGroup; + children = ( + D0DB82FF1D638F6300A44C96 /* include */, + ); + name = "FFmpeg-iOS"; + path = "third-party/FFmpeg-iOS"; + sourceTree = SOURCE_ROOT; + }; + D0DB82FF1D638F6300A44C96 /* include */ = { + isa = PBXGroup; + children = ( + D0DB83001D638F6300A44C96 /* libavcodec */, + D0DB83111D638F6300A44C96 /* libavformat */, + D0DB83151D638F6300A44C96 /* libavutil */, + D0DB835E1D638F6300A44C96 /* libswresample */, + ); + path = include; + sourceTree = ""; + }; + D0DB83001D638F6300A44C96 /* libavcodec */ = { + isa = PBXGroup; + children = ( + D0DB83011D638F6300A44C96 /* avcodec.h */, + D0DB83021D638F6300A44C96 /* avdct.h */, + D0DB83031D638F6300A44C96 /* avfft.h */, + D0DB83041D638F6300A44C96 /* d3d11va.h */, + D0DB83051D638F6300A44C96 /* dirac.h */, + D0DB83061D638F6300A44C96 /* dv_profile.h */, + D0DB83071D638F6300A44C96 /* dxva2.h */, + D0DB83081D638F6300A44C96 /* jni.h */, + D0DB83091D638F6300A44C96 /* qsv.h */, + D0DB830A1D638F6300A44C96 /* vaapi.h */, + D0DB830B1D638F6300A44C96 /* vda.h */, + D0DB830C1D638F6300A44C96 /* vdpau.h */, + D0DB830D1D638F6300A44C96 /* version.h */, + D0DB830E1D638F6300A44C96 /* videotoolbox.h */, + D0DB830F1D638F6300A44C96 /* vorbis_parser.h */, + D0DB83101D638F6300A44C96 /* xvmc.h */, + ); + path = libavcodec; + sourceTree = ""; + }; + D0DB83111D638F6300A44C96 /* libavformat */ = { + isa = PBXGroup; + children = ( + D0DB83121D638F6300A44C96 /* avformat.h */, + D0DB83131D638F6300A44C96 /* avio.h */, + D0DB83141D638F6300A44C96 /* version.h */, + ); + path = libavformat; + sourceTree = ""; + }; + D0DB83151D638F6300A44C96 /* libavutil */ = { + isa = PBXGroup; + children = ( + D0DB83161D638F6300A44C96 /* adler32.h */, + D0DB83171D638F6300A44C96 /* aes.h */, + D0DB83181D638F6300A44C96 /* aes_ctr.h */, + D0DB83191D638F6300A44C96 /* attributes.h */, + D0DB831A1D638F6300A44C96 /* audio_fifo.h */, + D0DB831B1D638F6300A44C96 /* avassert.h */, + D0DB831C1D638F6300A44C96 /* avconfig.h */, + D0DB831D1D638F6300A44C96 /* avstring.h */, + D0DB831E1D638F6300A44C96 /* avutil.h */, + D0DB831F1D638F6300A44C96 /* base64.h */, + D0DB83201D638F6300A44C96 /* blowfish.h */, + D0DB83211D638F6300A44C96 /* bprint.h */, + D0DB83221D638F6300A44C96 /* bswap.h */, + D0DB83231D638F6300A44C96 /* buffer.h */, + D0DB83241D638F6300A44C96 /* camellia.h */, + D0DB83251D638F6300A44C96 /* cast5.h */, + D0DB83261D638F6300A44C96 /* channel_layout.h */, + D0DB83271D638F6300A44C96 /* common.h */, + D0DB83281D638F6300A44C96 /* cpu.h */, + D0DB83291D638F6300A44C96 /* crc.h */, + D0DB832A1D638F6300A44C96 /* des.h */, + D0DB832B1D638F6300A44C96 /* dict.h */, + D0DB832C1D638F6300A44C96 /* display.h */, + D0DB832D1D638F6300A44C96 /* downmix_info.h */, + D0DB832E1D638F6300A44C96 /* error.h */, + D0DB832F1D638F6300A44C96 /* eval.h */, + D0DB83301D638F6300A44C96 /* ffversion.h */, + D0DB83311D638F6300A44C96 /* fifo.h */, + D0DB83321D638F6300A44C96 /* file.h */, + D0DB83331D638F6300A44C96 /* frame.h */, + D0DB83341D638F6300A44C96 /* hash.h */, + D0DB83351D638F6300A44C96 /* hmac.h */, + D0DB83361D638F6300A44C96 /* hwcontext.h */, + D0DB83371D638F6300A44C96 /* hwcontext_cuda.h */, + D0DB83381D638F6300A44C96 /* hwcontext_dxva2.h */, + D0DB83391D638F6300A44C96 /* hwcontext_vaapi.h */, + D0DB833A1D638F6300A44C96 /* hwcontext_vdpau.h */, + D0DB833B1D638F6300A44C96 /* imgutils.h */, + D0DB833C1D638F6300A44C96 /* intfloat.h */, + D0DB833D1D638F6300A44C96 /* intreadwrite.h */, + D0DB833E1D638F6300A44C96 /* lfg.h */, + D0DB833F1D638F6300A44C96 /* log.h */, + D0DB83401D638F6300A44C96 /* macros.h */, + D0DB83411D638F6300A44C96 /* mastering_display_metadata.h */, + D0DB83421D638F6300A44C96 /* mathematics.h */, + D0DB83431D638F6300A44C96 /* md5.h */, + D0DB83441D638F6300A44C96 /* mem.h */, + D0DB83451D638F6300A44C96 /* motion_vector.h */, + D0DB83461D638F6300A44C96 /* murmur3.h */, + D0DB83471D638F6300A44C96 /* opt.h */, + D0DB83481D638F6300A44C96 /* parseutils.h */, + D0DB83491D638F6300A44C96 /* pixdesc.h */, + D0DB834A1D638F6300A44C96 /* pixelutils.h */, + D0DB834B1D638F6300A44C96 /* pixfmt.h */, + D0DB834C1D638F6300A44C96 /* random_seed.h */, + D0DB834D1D638F6300A44C96 /* rational.h */, + D0DB834E1D638F6300A44C96 /* rc4.h */, + D0DB834F1D638F6300A44C96 /* replaygain.h */, + D0DB83501D638F6300A44C96 /* ripemd.h */, + D0DB83511D638F6300A44C96 /* samplefmt.h */, + D0DB83521D638F6300A44C96 /* sha.h */, + D0DB83531D638F6300A44C96 /* sha512.h */, + D0DB83541D638F6300A44C96 /* stereo3d.h */, + D0DB83551D638F6300A44C96 /* tea.h */, + D0DB83561D638F6300A44C96 /* threadmessage.h */, + D0DB83571D638F6300A44C96 /* time.h */, + D0DB83581D638F6300A44C96 /* timecode.h */, + D0DB83591D638F6300A44C96 /* timestamp.h */, + D0DB835A1D638F6300A44C96 /* tree.h */, + D0DB835B1D638F6300A44C96 /* twofish.h */, + D0DB835C1D638F6300A44C96 /* version.h */, + D0DB835D1D638F6300A44C96 /* xtea.h */, + ); + path = libavutil; + sourceTree = ""; + }; + D0DB835E1D638F6300A44C96 /* libswresample */ = { + isa = PBXGroup; + children = ( + D0DB835F1D638F6300A44C96 /* swresample.h */, + D0DB83601D638F6300A44C96 /* version.h */, + ); + path = libswresample; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -1156,30 +1505,123 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + D0DB838E1D638F6400A44C96 /* dict.h in Headers */, + D0DB836E1D638F6300A44C96 /* qsv.h in Headers */, + D0DB83701D638F6300A44C96 /* vda.h in Headers */, + D0DB83911D638F6400A44C96 /* error.h in Headers */, + D0DB837B1D638F6300A44C96 /* aes_ctr.h in Headers */, + D0DB83901D638F6400A44C96 /* downmix_info.h in Headers */, + D0DB83841D638F6300A44C96 /* bprint.h in Headers */, D03B0E4B1D631E7200955575 /* UIImage+WebP.h in Headers */, + D0DB83AB1D638F6400A44C96 /* parseutils.h in Headers */, + D0DB83BC1D638F6400A44C96 /* timestamp.h in Headers */, + D0DB839C1D638F6400A44C96 /* hwcontext_vaapi.h in Headers */, D03B0CA11D6222CA00955575 /* NBNumberFormat.h in Headers */, + D0DB83991D638F6400A44C96 /* hwcontext.h in Headers */, D03B0CA91D6222CA00955575 /* NBPhoneNumberDefines.h in Headers */, D03B0CB51D6222E500955575 /* types.h in Headers */, + D0DB836B1D638F6300A44C96 /* dv_profile.h in Headers */, + D0DB83AE1D638F6400A44C96 /* pixfmt.h in Headers */, D03B0E531D631E8500955575 /* RingBuffer.h in Headers */, + D0DB83851D638F6400A44C96 /* bswap.h in Headers */, D03B0E511D631E8500955575 /* FFMpegSwResample.h in Headers */, + D0DB83891D638F6400A44C96 /* channel_layout.h in Headers */, + D0DB83721D638F6300A44C96 /* version.h in Headers */, + D0DB837F1D638F6300A44C96 /* avconfig.h in Headers */, + D0DB83881D638F6400A44C96 /* cast5.h in Headers */, + D0DB83B41D638F6400A44C96 /* samplefmt.h in Headers */, + D0DB837E1D638F6300A44C96 /* avassert.h in Headers */, + D0DB83751D638F6300A44C96 /* xvmc.h in Headers */, + D0DB83B81D638F6400A44C96 /* tea.h in Headers */, D03B0E431D631E6600955575 /* NetworkLogging.h in Headers */, + D0DB83C11D638F6400A44C96 /* swresample.h in Headers */, + D0DB83A01D638F6400A44C96 /* intreadwrite.h in Headers */, D03B0E491D631E7200955575 /* TryCatchCpp.h in Headers */, + D0DB83B61D638F6400A44C96 /* sha512.h in Headers */, D03B0C9B1D6222CA00955575 /* NBMetadataCoreTest.h in Headers */, + D0DB83681D638F6300A44C96 /* avfft.h in Headers */, + D0DB83981D638F6400A44C96 /* hmac.h in Headers */, + D0DB837C1D638F6300A44C96 /* attributes.h in Headers */, + D0DB836F1D638F6300A44C96 /* vaapi.h in Headers */, + D0DB836A1D638F6300A44C96 /* dirac.h in Headers */, D03B0CAB1D6222CA00955575 /* NBPhoneNumberDesc.h in Headers */, + D0DB83C21D638F6400A44C96 /* version.h in Headers */, + D0DB83BB1D638F6400A44C96 /* timecode.h in Headers */, + D0DB83831D638F6300A44C96 /* blowfish.h in Headers */, + D0DB83781D638F6300A44C96 /* version.h in Headers */, + D0DB83761D638F6300A44C96 /* avformat.h in Headers */, + D0DB83B51D638F6400A44C96 /* sha.h in Headers */, D03B0E3F1D631E5E00955575 /* FastBlur.h in Headers */, + D0DB839A1D638F6400A44C96 /* hwcontext_cuda.h in Headers */, + D0DB838F1D638F6400A44C96 /* display.h in Headers */, + D0DB838A1D638F6400A44C96 /* common.h in Headers */, + D0DB837D1D638F6300A44C96 /* audio_fifo.h in Headers */, + D0DB83951D638F6400A44C96 /* file.h in Headers */, + D0DB83A71D638F6400A44C96 /* mem.h in Headers */, + D0DB83671D638F6300A44C96 /* avdct.h in Headers */, + D0DB83931D638F6400A44C96 /* ffversion.h in Headers */, + D0DB838C1D638F6400A44C96 /* crc.h in Headers */, D03B0CA51D6222CA00955575 /* NBPhoneMetaDataGenerator.h in Headers */, + D0DB83731D638F6300A44C96 /* videotoolbox.h in Headers */, + D0DB83971D638F6400A44C96 /* hash.h in Headers */, + D0DB83BE1D638F6400A44C96 /* twofish.h in Headers */, + D0DB83BA1D638F6400A44C96 /* time.h in Headers */, D09D8C121D4FAB1D0081DBEC /* TelegramCore.h in Headers */, + D0DB83AC1D638F6400A44C96 /* pixdesc.h in Headers */, D03B0E5C1D63241D00955575 /* TelegramCoreIncludes.h in Headers */, + D0DB83AD1D638F6400A44C96 /* pixelutils.h in Headers */, + D0DB83871D638F6400A44C96 /* camellia.h in Headers */, + D0DB839B1D638F6400A44C96 /* hwcontext_dxva2.h in Headers */, + D0DB83711D638F6300A44C96 /* vdpau.h in Headers */, + D0DB83661D638F6300A44C96 /* avcodec.h in Headers */, D03B0CA31D6222CA00955575 /* NBPhoneMetaData.h in Headers */, + D0DB83B11D638F6400A44C96 /* rc4.h in Headers */, D03B0CA71D6222CA00955575 /* NBPhoneNumber.h in Headers */, + D0DB83771D638F6300A44C96 /* avio.h in Headers */, + D0DB83961D638F6400A44C96 /* frame.h in Headers */, + D0DB836C1D638F6300A44C96 /* dxva2.h in Headers */, + D0DB83BF1D638F6400A44C96 /* version.h in Headers */, + D0DB839D1D638F6400A44C96 /* hwcontext_vdpau.h in Headers */, + D0DB83A11D638F6400A44C96 /* lfg.h in Headers */, + D0DB83791D638F6300A44C96 /* adler32.h in Headers */, + D0DB837A1D638F6300A44C96 /* aes.h in Headers */, + D0DB83BD1D638F6400A44C96 /* tree.h in Headers */, + D0DB83801D638F6300A44C96 /* avstring.h in Headers */, + D0DB83B21D638F6400A44C96 /* replaygain.h in Headers */, D03B0CB31D6222E500955575 /* decode.h in Headers */, + D0DB83821D638F6300A44C96 /* base64.h in Headers */, + D0DB839E1D638F6400A44C96 /* imgutils.h in Headers */, + D0DB839F1D638F6400A44C96 /* intfloat.h in Headers */, + D0DB83A41D638F6400A44C96 /* mastering_display_metadata.h in Headers */, D03B0C951D6222CA00955575 /* NBAsYouTypeFormatter.h in Headers */, D03B0C9F1D6222CA00955575 /* NBMetadataHelper.h in Headers */, + D0DB83B71D638F6400A44C96 /* stereo3d.h in Headers */, + D0DB83A81D638F6400A44C96 /* motion_vector.h in Headers */, + D0DB838B1D638F6400A44C96 /* cpu.h in Headers */, + D0DB83AF1D638F6400A44C96 /* random_seed.h in Headers */, D03B0C971D6222CA00955575 /* NBMetadataCore.h in Headers */, + D0DB83691D638F6300A44C96 /* d3d11va.h in Headers */, + D0DB83A61D638F6400A44C96 /* md5.h in Headers */, + D0DB83C01D638F6400A44C96 /* xtea.h in Headers */, + D0DB838D1D638F6400A44C96 /* des.h in Headers */, + D0DB83B91D638F6400A44C96 /* threadmessage.h in Headers */, + D0DB83A51D638F6400A44C96 /* mathematics.h in Headers */, D03B0CB41D6222E500955575 /* encode.h in Headers */, + D0DB83921D638F6400A44C96 /* eval.h in Headers */, + D0DB836D1D638F6300A44C96 /* jni.h in Headers */, + D0DB83A21D638F6400A44C96 /* log.h in Headers */, + D0DB83811D638F6300A44C96 /* avutil.h in Headers */, + D0DB83A31D638F6400A44C96 /* macros.h in Headers */, + D0DB83941D638F6400A44C96 /* fifo.h in Headers */, + D0DB83B31D638F6400A44C96 /* ripemd.h in Headers */, D03B0C991D6222CA00955575 /* NBMetadataCoreMapper.h in Headers */, D03B0CAD1D6222CA00955575 /* NBPhoneNumberUtil.h in Headers */, + D0DB83B01D638F6400A44C96 /* rational.h in Headers */, D03B0C9D1D6222CA00955575 /* NBMetadataCoreTestMapper.h in Headers */, + D0DB83741D638F6300A44C96 /* vorbis_parser.h in Headers */, + D0DB83AA1D638F6400A44C96 /* opt.h in Headers */, + D0DB83A91D638F6400A44C96 /* murmur3.h in Headers */, + D0DB83861D638F6400A44C96 /* buffer.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1236,7 +1678,7 @@ DevelopmentTeam = X834Q8SBVP; DevelopmentTeamName = "TELEGRAM MESSENGER LLP"; LastSwiftMigration = 0800; - ProvisioningStyle = Automatic; + ProvisioningStyle = Manual; }; D09D8C091D4FAB1D0081DBEC = { CreatedOnToolsVersion = 8.0; @@ -1269,7 +1711,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D03B0E5A1D63215200955575 /* TelegramCore.xcconfig in Resources */, + D03B0E8F1D63520500955575 /* Images.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1350,7 +1792,9 @@ D03B0D991D631B8800955575 /* ListController.swift in Sources */, D03B0D441D6319F900955575 /* CloudFileMediaResource.swift in Sources */, D03B0C961D6222CA00955575 /* NBAsYouTypeFormatter.m in Sources */, + D03B0E6E1D632E3800955575 /* AuthorizationController.swift in Sources */, D03B0E561D631EA500955575 /* MediaFrameSource.swift in Sources */, + D0AB0B921D65E9FA002C78E7 /* ManagedServiceViews.swift in Sources */, D03B0CA21D6222CA00955575 /* NBNumberFormat.m in Sources */, D03B0CCE1D62239600955575 /* PhoneNumbers.swift in Sources */, D03B0D5A1D631A6900955575 /* Api.swift in Sources */, @@ -1373,6 +1817,7 @@ D03B0CFB1D62250800955575 /* TelegramMediaWebpage.swift in Sources */, D03B0DB01D631BBF00955575 /* AuthorizationPhoneController.swift in Sources */, D03B0D7F1D631B2200955575 /* SearchBarPlaceholderNode.swift in Sources */, + D0AB0B981D664E18002C78E7 /* ManagedUnsentMessageIndices.swift in Sources */, D03B0D301D6319BD00955575 /* AudioStreamPlayer.swift in Sources */, D03B0CF91D62250800955575 /* TelegramMediaMap.swift in Sources */, D03B0DE81D631CE300955575 /* ChatMessageDateAndStatusNode.swift in Sources */, @@ -1428,6 +1873,7 @@ D03B0D5C1D631A6900955575 /* Download.swift in Sources */, D03B0D331D6319BD00955575 /* MediaPlayerAudioRenderer.swift in Sources */, D03B0D5D1D631A6900955575 /* MultipartFetch.swift in Sources */, + D0AB0B961D662F0B002C78E7 /* ManagedChatListHoles.swift in Sources */, D03B0D341D6319BD00955575 /* MediaPlayerNode.swift in Sources */, D03B0DCF1D631C9200955575 /* ChatHistoryLocation.swift in Sources */, D03B0CD71D62245300955575 /* TelegramGroup.swift in Sources */, @@ -1440,6 +1886,7 @@ D03B0CE21D62249B00955575 /* InlineBotMessageAttribute.swift in Sources */, D03B0CFD1D62251400955575 /* TelegramMediaCloudLocations.swift in Sources */, D03B0E141D631D8800955575 /* GalleryItemNode.swift in Sources */, + D0AB0B9A1D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift in Sources */, D03B0D5B1D631A6900955575 /* Buffer.swift in Sources */, D03B0D421D6319F100955575 /* FileResources.swift in Sources */, D03B0D211D63198900955575 /* FFMpegMediaVideoFrameDecoder.swift in Sources */, @@ -1460,10 +1907,12 @@ D03B0CC11D62235000955575 /* StringFormat.swift in Sources */, D03B0E3C1D631E5400955575 /* Localizable.swift in Sources */, D03B0DC71D631C1100955575 /* ChatListSearchRecentPeersNode.swift in Sources */, + D03B0E911D6352C900955575 /* FrameworkBundle.swift in Sources */, D03B0DBB1D631BE900955575 /* ChatListController.swift in Sources */, D03B0DC01D631BE900955575 /* ChatListSearchItem.swift in Sources */, D03B0D651D631A8B00955575 /* Account.swift in Sources */, D03B0E341D631E1B00955575 /* ContactsVCardItem.swift in Sources */, + D0AB0B941D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift in Sources */, D03B0CF41D62250800955575 /* TelegramMediaAction.swift in Sources */, D03B0D481D631A2200955575 /* Cache.swift in Sources */, D03B0D8B1D631B3E00955575 /* ListSectionHeaderNode.swift in Sources */, @@ -1535,6 +1984,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/third-party/FFmpeg-iOS/include"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1545,9 +1995,13 @@ isa = XCBuildConfiguration; baseConfigurationReference = D03B0E591D63215200955575 /* TelegramCore.xcconfig */; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = X834Q8SBVP; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1560,6 +2014,7 @@ "$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib", "$(PROJECT_DIR)/third-party/libwebp/lib", ); + OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1625,6 +2080,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/third-party/FFmpeg-iOS/include"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1668,6 +2124,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/third-party/FFmpeg-iOS/include"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1678,9 +2135,13 @@ isa = XCBuildConfiguration; baseConfigurationReference = D03B0E591D63215200955575 /* TelegramCore.xcconfig */; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = X834Q8SBVP; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1693,6 +2154,7 @@ "$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib", "$(PROJECT_DIR)/third-party/libwebp/lib", ); + OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1706,9 +2168,13 @@ isa = XCBuildConfiguration; baseConfigurationReference = D03B0E591D63215200955575 /* TelegramCore.xcconfig */; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = X834Q8SBVP; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1721,6 +2187,7 @@ "$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib", "$(PROJECT_DIR)/third-party/libwebp/lib", ); + OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/TelegramCore/Account.swift b/TelegramCore/Account.swift index 9b2747a06e..3619a61d9e 100644 --- a/TelegramCore/Account.swift +++ b/TelegramCore/Account.swift @@ -3,17 +3,17 @@ import SwiftSignalKit import Postbox import MtProtoKit import Display -import TelegramCorePrivate +import TelegramCorePrivateModule -struct AccountId { +public struct AccountId { let stringValue: String } -class AccountState: Coding, Equatable { - required init(decoder: Decoder) { +public class AccountState: Coding, Equatable { + public required init(decoder: Decoder) { } - func encode(_ encoder: Encoder) { + public func encode(_ encoder: Encoder) { } private init() { @@ -24,19 +24,19 @@ class AccountState: Coding, Equatable { } } -func ==(lhs: AccountState, rhs: AccountState) -> Bool { +public func ==(lhs: AccountState, rhs: AccountState) -> Bool { return lhs.equalsTo(rhs) } -final class UnauthorizedAccountState: AccountState { +public final class UnauthorizedAccountState: AccountState { let masterDatacenterId: Int32 - required init(decoder: Decoder) { + public required init(decoder: Decoder) { self.masterDatacenterId = decoder.decodeInt32ForKey("masterDatacenterId") super.init() } - override func encode(_ encoder: Encoder) { + override public func encode(_ encoder: Encoder) { encoder.encodeInt32(self.masterDatacenterId, forKey: "masterDatacenterId") } @@ -54,7 +54,7 @@ final class UnauthorizedAccountState: AccountState { } } -class AuthorizedAccountState: AccountState { +public class AuthorizedAccountState: AccountState { final class State: Coding, Equatable, CustomStringConvertible { let pts: Int32 let qts: Int32 @@ -92,7 +92,7 @@ class AuthorizedAccountState: AccountState { let state: State? - required init(decoder: Decoder) { + public required init(decoder: Decoder) { self.masterDatacenterId = decoder.decodeInt32ForKey("masterDatacenterId") self.peerId = PeerId(decoder.decodeInt64ForKey("peerId")) self.state = decoder.decodeObjectForKey("state", decoder: { return State(decoder: $0) }) as? State @@ -100,7 +100,7 @@ class AuthorizedAccountState: AccountState { super.init() } - override func encode(_ encoder: Encoder) { + override public func encode(_ encoder: Encoder) { encoder.encodeInt32(self.masterDatacenterId, forKey: "masterDatacenterId") encoder.encodeInt64(self.peerId.toInt64(), forKey: "peerId") if let state = self.state { @@ -138,22 +138,22 @@ func ==(lhs: AuthorizedAccountState.State, rhs: AuthorizedAccountState.State) -> lhs.seq == rhs.seq } -func currentAccountId() -> AccountId { - let key = "Telegram_currentAccountId" - if let id = UserDefaults.standard.object(forKey: key) as? String { +public func currentAccountId(appGroupPath: String) -> AccountId { + let filePath = "\(appGroupPath)/currentAccountId" + if let id = try? String(contentsOfFile: filePath) { return AccountId(stringValue: id) } else { let id = generateAccountId() - UserDefaults.standard.set(id.stringValue, forKey: key) + let _ = try? id.stringValue.write(toFile: filePath, atomically: true, encoding: .utf8) return id } } -func generateAccountId() -> AccountId { +public func generateAccountId() -> AccountId { return AccountId(stringValue: NSUUID().uuidString) } -class UnauthorizedAccount { +public class UnauthorizedAccount { let id: AccountId let postbox: Postbox let network: Network @@ -186,31 +186,37 @@ class UnauthorizedAccount { } } -func accountWithId(_ id: AccountId) -> Signal, NoError> { +private var declaredEncodables: Void = { + declareEncodable(UnauthorizedAccountState.self, f: { UnauthorizedAccountState(decoder: $0) }) + declareEncodable(AuthorizedAccountState.self, f: { AuthorizedAccountState(decoder: $0) }) + declareEncodable(TelegramUser.self, f: { TelegramUser(decoder: $0) }) + declareEncodable(TelegramGroup.self, f: { TelegramGroup(decoder: $0) }) + declareEncodable(TelegramMediaImage.self, f: { TelegramMediaImage(decoder: $0) }) + declareEncodable(TelegramMediaImageRepresentation.self, f: { TelegramMediaImageRepresentation(decoder: $0) }) + declareEncodable(TelegramMediaVoiceNote.self, f: { TelegramMediaVoiceNote(decoder: $0) }) + declareEncodable(TelegramMediaContact.self, f: { TelegramMediaContact(decoder: $0) }) + declareEncodable(TelegramMediaMap.self, f: { TelegramMediaMap(decoder: $0) }) + declareEncodable(TelegramMediaFile.self, f: { TelegramMediaFile(decoder: $0) }) + declareEncodable(TelegramMediaFileAttribute.self, f: { TelegramMediaFileAttribute(decoder: $0) }) + declareEncodable(TelegramCloudFileLocation.self, f: { TelegramCloudFileLocation(decoder: $0) }) + declareEncodable(ChannelState.self, f: { ChannelState(decoder: $0) }) + declareEncodable(InlineBotMessageAttribute.self, f: { InlineBotMessageAttribute(decoder: $0) }) + declareEncodable(TextEntitiesMessageAttribute.self, f: { TextEntitiesMessageAttribute(decoder: $0) }) + declareEncodable(ReplyMessageAttribute.self, f: { ReplyMessageAttribute(decoder: $0) }) + declareEncodable(TelegramCloudDocumentLocation.self, f: { TelegramCloudDocumentLocation(decoder: $0) }) + declareEncodable(TelegramMediaWebpage.self, f: { TelegramMediaWebpage(decoder: $0) }) + declareEncodable(ViewCountMessageAttribute.self, f: { ViewCountMessageAttribute(decoder: $0) }) + declareEncodable(TelegramMediaAction.self, f: { TelegramMediaAction(decoder: $0) }) + declareEncodable(StreamingResource.self, f: { StreamingResource(decoder: $0) }) + + return +}() + +public func accountWithId(_ id: AccountId, appGroupPath: String) -> Signal, NoError> { return Signal<(Postbox, AccountState?), NoError> { subscriber in - declareEncodable(UnauthorizedAccountState.self, f: { UnauthorizedAccountState(decoder: $0) }) - declareEncodable(AuthorizedAccountState.self, f: { AuthorizedAccountState(decoder: $0) }) - declareEncodable(TelegramUser.self, f: { TelegramUser(decoder: $0) }) - declareEncodable(TelegramGroup.self, f: { TelegramGroup(decoder: $0) }) - declareEncodable(TelegramMediaImage.self, f: { TelegramMediaImage(decoder: $0) }) - declareEncodable(TelegramMediaImageRepresentation.self, f: { TelegramMediaImageRepresentation(decoder: $0) }) - declareEncodable(TelegramMediaVoiceNote.self, f: { TelegramMediaVoiceNote(decoder: $0) }) - declareEncodable(TelegramMediaContact.self, f: { TelegramMediaContact(decoder: $0) }) - declareEncodable(TelegramMediaMap.self, f: { TelegramMediaMap(decoder: $0) }) - declareEncodable(TelegramMediaFile.self, f: { TelegramMediaFile(decoder: $0) }) - declareEncodable(TelegramMediaFileAttribute.self, f: { TelegramMediaFileAttribute(decoder: $0) }) - declareEncodable(TelegramCloudFileLocation.self, f: { TelegramCloudFileLocation(decoder: $0) }) - declareEncodable(ChannelState.self, f: { ChannelState(decoder: $0) }) - declareEncodable(InlineBotMessageAttribute.self, f: { InlineBotMessageAttribute(decoder: $0) }) - declareEncodable(TextEntitiesMessageAttribute.self, f: { TextEntitiesMessageAttribute(decoder: $0) }) - declareEncodable(ReplyMessageAttribute.self, f: { ReplyMessageAttribute(decoder: $0) }) - declareEncodable(TelegramCloudDocumentLocation.self, f: { TelegramCloudDocumentLocation(decoder: $0) }) - declareEncodable(TelegramMediaWebpage.self, f: { TelegramMediaWebpage(decoder: $0) }) - declareEncodable(ViewCountMessageAttribute.self, f: { ViewCountMessageAttribute(decoder: $0) }) - declareEncodable(TelegramMediaAction.self, f: { TelegramMediaAction(decoder: $0) }) - declareEncodable(StreamingResource.self, f: { StreamingResource(decoder: $0) }) + let _ = declaredEncodables - let path = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as String) + "/\(id.stringValue)" + let path = "\(appGroupPath)/account\(id.stringValue)" let seedConfiguration = SeedConfiguration(initializeChatListWithHoles: [ChatListHole(index: MessageIndex(id: MessageId(peerId: PeerId(namespace: Namespaces.Peer.Empty, id: 0), namespace: Namespaces.Message.Cloud, id: 1), timestamp: 1))], initializeMessageNamespacesWithHoles: [Namespaces.Message.Cloud], existingMessageTags: [.PhotoOrVideo]) @@ -245,7 +251,7 @@ func accountWithId(_ id: AccountId) -> Signal Signal { +public func twoStepAuthData(_ network: Network) -> Signal { return network.request(Api.functions.account.getPassword(), dependsOnPasswordEntry: false) |> map { config -> TwoStepAuthData in switch config { @@ -276,7 +282,7 @@ private func sha256(_ data : Data) -> Data { return res } -func verifyPassword(_ account: UnauthorizedAccount, password: String) -> Signal { +public func verifyPassword(_ account: UnauthorizedAccount, password: String) -> Signal { return twoStepAuthData(account.network) |> mapToSignal { authData -> Signal in var data = Data() @@ -289,15 +295,23 @@ func verifyPassword(_ account: UnauthorizedAccount, password: String) -> Signal< } } -class Account { +public enum AccountServiceTaskMasterMode { + case now + case always + case never +} + +public class Account { let id: AccountId - let postbox: Postbox - let network: Network - let peerId: PeerId + public let postbox: Postbox + public let network: Network + public let peerId: PeerId - private(set) var stateManager: StateManager! - private(set) var viewTracker: AccountViewTracker! + public private(set) var stateManager: StateManager! + public private(set) var viewTracker: AccountViewTracker! private let managedContactsDisposable = MetaDisposable() + private let becomeMasterDisposable = MetaDisposable() + private let managedServiceViewsDisposable = MetaDisposable() let graphicsThreadPool = ThreadPool(threadCount: 3, threadPriority: 0.1) //let imageCache: ImageCache = ImageCache(maxResidentSize: 5 * 1024 * 1024) @@ -306,6 +320,11 @@ class Account { var player: AnyObject? + public let notificationToken = Promise() + private let notificationTokenDisposable = MetaDisposable() + + public let shouldBeServiceTaskMaster = Promise() + init(id: AccountId, postbox: Postbox, network: Network, peerId: PeerId) { self.id = id self.postbox = postbox @@ -314,50 +333,70 @@ class Account { self.stateManager = StateManager(account: self) self.viewTracker = AccountViewTracker(account: self) + + let appliedNotificationToken = self.notificationToken.get() + |> distinctUntilChanged + |> mapToSignal { token -> Signal in + var tokenString = "" + token.withUnsafeBytes { (bytes: UnsafePointer) -> Void in + for i in 0 ..< token.count { + let byte = bytes.advanced(by: i).pointee + tokenString = tokenString.appendingFormat("%02x", Int32(byte)) + } + } + + let appVersionString = "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] ?? "") (\(Bundle.main.infoDictionary?["CFBundleVersion"] ?? ""))" + + + let langCode = NSLocale.preferredLanguages.first ?? "en" + + return network.request(Api.functions.account.registerDevice(tokenType: 1, token: tokenString, deviceModel: "iPhome Simulator", systemVersion: UIDevice.current.systemVersion, appVersion: appVersionString, appSandbox: .boolTrue, langCode: langCode)) + |> retryRequest + |> mapToSignal { _ -> Signal in + return .complete() + } + } + self.notificationTokenDisposable.set(appliedNotificationToken.start()) + + let serviceTasksMasterBecomeMaster = shouldBeServiceTaskMaster.get() + |> distinctUntilChanged + |> deliverOn(Queue.concurrentDefaultQueue()) + + self.becomeMasterDisposable.set(serviceTasksMasterBecomeMaster.start(next: { [weak self] value in + if let strongSelf = self, (value == .now || value == .always) { + strongSelf.postbox.becomeMasterClient() + } + })) + + let serviceTasksMaster = combineLatest(shouldBeServiceTaskMaster.get(), postbox.isMasterClient()) + |> map { [weak self] shouldBeMaster, isMaster -> Bool in + if shouldBeMaster == .always && !isMaster { + self?.postbox.becomeMasterClient() + } + return ((shouldBeMaster == .now || shouldBeMaster == .always) || true) && isMaster + } + |> distinctUntilChanged + |> deliverOn(Queue.concurrentDefaultQueue()) + |> mapToSignal { [weak self] value -> Signal in + if let strongSelf = self, value { + trace("Account", what: "Became master") + return managedServiceViews(network: strongSelf.network, postbox: strongSelf.postbox, stateManager: strongSelf.stateManager) + } else { + trace("Account", what: "Resigned master") + return .never() + } + } + self.managedServiceViewsDisposable.set(serviceTasksMaster.start()) } deinit { self.managedContactsDisposable.dispose() + self.notificationTokenDisposable.dispose() + self.managedServiceViewsDisposable.dispose() } } -func setupAccount(_ account: Account) { - account.postbox.setFetchMessageHistoryHole { [weak account] hole, direction, tagMask in - if let strongAccount = account { - return fetchMessageHistoryHole(strongAccount, hole: hole, direction: direction, tagMask: tagMask) - } else { - return never(Void.self, NoError.self) - } - } - account.postbox.setFetchChatListHole { [weak account] hole in - if let strongAccount = account { - return fetchChatListHole(strongAccount, hole: hole) - } else { - return never(Void.self, NoError.self) - } - } - - account.postbox.setSendUnsentMessage { [weak account] message in - if let strongAccount = account { - return sendUnsentMessage(account: strongAccount, message: message) - } else { - return never(Void.self, NoError.self) - } - } - - account.postbox.setSynchronizePeerReadState { [weak account] peerId, operation -> Signal in - if let strongAccount = account { - switch operation { - case .Validate: - return synchronizePeerReadState(account: strongAccount, peerId: peerId, push: false, validate: true) - case let .Push(thenSync): - return synchronizePeerReadState(account: strongAccount, peerId: peerId, push: true, validate: thenSync) - } - } else { - return .never() - } - } - +public func setupAccount(_ account: Account) { account.postbox.mediaBox.fetchResource = { [weak account] resource, range -> Signal in if let strongAccount = account { return fetchResource(account: strongAccount, resource: resource, range: range) diff --git a/TelegramCore/AccountViewTracker.swift b/TelegramCore/AccountViewTracker.swift index 54ff25361d..d4921a0ea3 100644 --- a/TelegramCore/AccountViewTracker.swift +++ b/TelegramCore/AccountViewTracker.swift @@ -99,7 +99,7 @@ private func fetchWebpage(account: Account, messageId: MessageId) -> Signal Signal<(MessageHistoryView, ViewUpdateType), NoError> { + public func aroundUnreadMessageHistoryViewForPeerId(_ peerId: PeerId, count: Int, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> { if let account = self.account { let signal = account.postbox.aroundUnreadMessageHistoryViewForPeerId(peerId, count: count, tagMask: tagMask) return wrappedMessageHistorySignal(signal) @@ -204,7 +204,7 @@ final class AccountViewTracker { } } - func aroundIdMessageHistoryViewForPeerId(_ peerId: PeerId, count: Int, messageId: MessageId, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> { + public func aroundIdMessageHistoryViewForPeerId(_ peerId: PeerId, count: Int, messageId: MessageId, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> { if let account = self.account { let signal = account.postbox.aroundIdMessageHistoryViewForPeerId(peerId, count: count, messageId: messageId, tagMask: tagMask) return wrappedMessageHistorySignal(signal) @@ -213,7 +213,7 @@ final class AccountViewTracker { } } - func aroundMessageHistoryViewForPeerId(_ peerId: PeerId, index: MessageIndex, count: Int, anchorIndex: MessageIndex, fixedCombinedReadState: CombinedPeerReadState?, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> { + public func aroundMessageHistoryViewForPeerId(_ peerId: PeerId, index: MessageIndex, count: Int, anchorIndex: MessageIndex, fixedCombinedReadState: CombinedPeerReadState?, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> { if let account = self.account { let signal = account.postbox.aroundMessageHistoryViewForPeerId(peerId, index: index, count: count, anchorIndex: anchorIndex, fixedCombinedReadState: fixedCombinedReadState, tagMask: tagMask) return wrappedMessageHistorySignal(signal) diff --git a/TelegramCore/AuthorizationController.swift b/TelegramCore/AuthorizationController.swift new file mode 100644 index 0000000000..3bccb43e3f --- /dev/null +++ b/TelegramCore/AuthorizationController.swift @@ -0,0 +1,82 @@ +import Foundation +import Display +import SwiftSignalKit + +public class AuthorizationController: NavigationController { + private var account: UnauthorizedAccount! + + private let authorizedAccountValue = Promise() + public var authorizedAccount: Signal { + return authorizedAccountValue.get() + } + + public init(account: UnauthorizedAccount) { + self.account = account + let phoneController = AuthorizationPhoneController(account: account) + + super.init() + + self.pushViewController(phoneController, animated: false) + + let authorizationSequence = phoneController.result |> mapToSignal { (account, sentCode, phone) -> Signal in + return deferred { [weak self] in + if let strongSelf = self { + strongSelf.account = account + let codeController = AuthorizationCodeController(account: account, phone: phone, sentCode: sentCode) + strongSelf.pushViewController(codeController, animated: true) + + return codeController.result |> mapToSignal { result -> Signal in + switch result { + case let .Authorization(authorization): + return single(authorization, NoError.self) + case .Password: + return deferred { [weak self] () -> Signal in + if let strongSelf = self { + let passwordController = AuthorizationPasswordController(account: account) + strongSelf.pushViewController(passwordController, animated: true) + + return passwordController.result + } else { + return complete(Api.auth.Authorization.self, NoError.self) + } + } |> runOn(Queue.mainQueue()) + } + } + } else { + return complete(Api.auth.Authorization.self, NoError.self) + } + } |> runOn(Queue.mainQueue()) + } + + let accountSignal = authorizationSequence |> mapToSignal { [weak self] authorization -> Signal in + if let strongSelf = self { + switch authorization { + case let .authorization(user): + let user = TelegramUser(user: user) + return account.postbox.modify { modifier -> AccountState in + let state = AuthorizedAccountState(masterDatacenterId: strongSelf.account.masterDatacenterId, peerId: user.id, state: nil) + modifier.setState(state) + return state + } |> map { state in + return Account(id: account.id, postbox: account.postbox, network: account.network, peerId: user.id) + } + } + } else { + return .complete() + } + } + + self.authorizedAccountValue.set(accountSignal) + } + + override public init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + } + + required public init(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + deinit { + } +} diff --git a/TelegramCore/AuthorizationPhoneController.swift b/TelegramCore/AuthorizationPhoneController.swift index dd48b74229..7ccd4dacd6 100644 --- a/TelegramCore/AuthorizationPhoneController.swift +++ b/TelegramCore/AuthorizationPhoneController.swift @@ -47,20 +47,20 @@ class AuthorizationPhoneController: ViewController { @objc func nextPressed() { let phone = self.node.phoneNode.attributedText?.string ?? "" let account = self.account - let sendCode = Api.functions.auth.sendCode(flags: 0, phoneNumber: phone, currentNumber: nil, apiId: 1, apiHash: "b6b154c3707471f5339bd661645ed3d6", langCode: "en") + let sendCode = Api.functions.auth.sendCode(flags: 0, phoneNumber: phone, currentNumber: nil, apiId: 10840, apiHash: "33c45224029d59cb3ad0c16134215aeb", langCode: "en") let signal = account.network.request(sendCode) |> map { result in return (result, account) } |> `catch` { error -> Signal<(Api.auth.SentCode, UnauthorizedAccount), MTRpcError> in switch error.errorDescription { - case Regex("(PHONE_|USER_|NETWORK_)MIGRATE_(\\d+)"): - let range = error.errorDescription.range(of: "MIGRATE_")! - let updatedMasterDatacenterId = Int32(error.errorDescription.substring(from: range.upperBound))! - let updatedAccount = account.changedMasterDatacenterId(updatedMasterDatacenterId) - return updatedAccount.network.request(sendCode) |> map { sentCode in return (sentCode, updatedAccount) } - case _: - return .fail(error) + case Regex("(PHONE_|USER_|NETWORK_)MIGRATE_(\\d+)"): + let range = error.errorDescription.range(of: "MIGRATE_")! + let updatedMasterDatacenterId = Int32(error.errorDescription.substring(from: range.upperBound))! + let updatedAccount = account.changedMasterDatacenterId(updatedMasterDatacenterId) + return updatedAccount.network.request(sendCode) |> map { sentCode in return (sentCode, updatedAccount) } + case _: + return .fail(error) } } diff --git a/TelegramCore/ChatController.swift b/TelegramCore/ChatController.swift index 7cc64c3e91..faf2b577f3 100644 --- a/TelegramCore/ChatController.swift +++ b/TelegramCore/ChatController.swift @@ -176,7 +176,9 @@ private func historyEntriesForView(_ view: MessageHistoryView) -> [ChatHistoryEn private func preparedHistoryViewTransition(from fromView: ChatHistoryView?, to toView: ChatHistoryView, reason: ChatHistoryViewTransitionReason, account: Account, peerId: PeerId, controllerInteraction: ChatControllerInteraction, scrollPosition: ChatControllerScrollPosition?) -> Signal { return Signal { subscriber in - let (deleteIndices, indicesAndItems, updateIndices) = mergeListsStableWithUpdates(leftList: fromView?.filteredEntries ?? [], rightList: toView.filteredEntries) + let updateIndices: [(Int, ChatHistoryEntry)] = [] + //let (deleteIndices, indicesAndItems, updateIndices) = mergeListsStableWithUpdates(leftList: fromView?.filteredEntries ?? [], rightList: toView.filteredEntries) + let (deleteIndices, indicesAndItems) = mergeListsStable(leftList: fromView?.filteredEntries ?? [], rightList: toView.filteredEntries) var adjustedDeleteIndices: [ListViewDeleteItem] = [] let previousCount: Int @@ -360,7 +362,7 @@ private func maxIncomingMessageIdForEntries(_ entries: [ChatHistoryEntry], index private var useDarkMode = false -class ChatController: ViewController { +public class ChatController: ViewController { private var containerLayout = ContainerViewLayout() private let account: Account @@ -381,7 +383,7 @@ class ChatController: ViewController { private var layoutActionOnViewTransition: (() -> Void)? private let _ready = Promise() - override var ready: Promise { + override public var ready: Promise { return self._ready } private var didSetReady = false @@ -398,7 +400,7 @@ class ChatController: ViewController { private var controllerInteraction: ChatControllerInteraction? - init(account: Account, peerId: PeerId, messageId: MessageId? = nil) { + public init(account: Account, peerId: PeerId, messageId: MessageId? = nil) { self.account = account self.peerId = peerId self.messageId = messageId @@ -605,7 +607,7 @@ class ChatController: ViewController { } } - required init(coder aDecoder: NSCoder) { + required public init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -638,7 +640,7 @@ class ChatController: ViewController { } } - override func loadDisplayNode() { + override public func loadDisplayNode() { self.displayNode = ChatControllerNode(account: self.account, peerId: self.peerId) self.chatDisplayNode.listView.displayedItemRangeChanged = { [weak self] displayedRange in @@ -723,11 +725,11 @@ class ChatController: ViewController { self.dequeueHistoryViewTransition() } - override func viewWillAppear(_ animated: Bool) { + override public func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) } - override func viewDidAppear(_ animated: Bool) { + override public func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) self.chatDisplayNode.listView.preloadPages = true @@ -831,7 +833,7 @@ class ChatController: ViewController { } } - override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { + override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { super.containerLayoutUpdated(layout, transition: transition) self.containerLayout = layout diff --git a/TelegramCore/ChatControllerInteraction.swift b/TelegramCore/ChatControllerInteraction.swift index 8c8d7e81cd..c854968d3c 100644 --- a/TelegramCore/ChatControllerInteraction.swift +++ b/TelegramCore/ChatControllerInteraction.swift @@ -2,12 +2,12 @@ import Foundation import Postbox import AsyncDisplayKit -final class ChatControllerInteraction { +public final class ChatControllerInteraction { let openMessage: (MessageId) -> Void let testNavigateToMessage: (MessageId, MessageId) -> Void var hiddenMedia: [MessageId: [Media]] = [:] - init(openMessage: (MessageId) -> Void, testNavigateToMessage: (MessageId, MessageId) -> Void) { + public init(openMessage: (MessageId) -> Void, testNavigateToMessage: (MessageId, MessageId) -> Void) { self.openMessage = openMessage self.testNavigateToMessage = testNavigateToMessage } diff --git a/TelegramCore/ChatControllerNode.swift b/TelegramCore/ChatControllerNode.swift index 33ad76cc9c..e1f9021aa5 100644 --- a/TelegramCore/ChatControllerNode.swift +++ b/TelegramCore/ChatControllerNode.swift @@ -4,7 +4,7 @@ import Postbox import SwiftSignalKit import Display -private let backgroundImage = UIImage(named: "Chat/Wallpapers/Builtin0") +private let backgroundImage = UIImage(bundleImageName: "Chat/Wallpapers/Builtin0") enum ChatMessageViewPosition: Equatable { case AroundUnread(count: Int) diff --git a/TelegramCore/ChatInputView.swift b/TelegramCore/ChatInputView.swift index d6b4bd1423..03d4437223 100644 --- a/TelegramCore/ChatInputView.swift +++ b/TelegramCore/ChatInputView.swift @@ -22,7 +22,7 @@ private let textInputViewBackground: UIImage = { return image }() -private let attachmentIcon = UIImage(named: "Chat/Input/Text/IconAttachment")?.precomposed() +private let attachmentIcon = UIImage(bundleImageName: "Chat/Input/Text/IconAttachment")?.precomposed() class ChatInputNode: ASDisplayNode, ASEditableTextNodeDelegate { var textPlaceholderNode: TextNode diff --git a/TelegramCore/ChatListAvatarNode.swift b/TelegramCore/ChatListAvatarNode.swift index 8bfa0bf6de..f1901f892c 100644 --- a/TelegramCore/ChatListAvatarNode.swift +++ b/TelegramCore/ChatListAvatarNode.swift @@ -45,14 +45,14 @@ private func ==(lhs: ChatListAvatarNodeState, rhs: ChatListAvatarNodeState) -> B } } -class ChatListAvatarNode: ASDisplayNode { +public final class ChatListAvatarNode: ASDisplayNode { let font: UIFont private var parameters: ChatListAvatarNodeParameters? let imageNode: ImageNode private var state: ChatListAvatarNodeState = .Empty - init(font: UIFont) { + public init(font: UIFont) { self.font = font self.imageNode = ImageNode() @@ -65,7 +65,7 @@ class ChatListAvatarNode: ASDisplayNode { self.addSubnode(self.imageNode) } - override var frame: CGRect { + override public var frame: CGRect { get { return super.frame } set(value) { @@ -74,7 +74,7 @@ class ChatListAvatarNode: ASDisplayNode { } } - func setPeer(account: Account, peer: Peer) { + public func setPeer(account: Account, peer: Peer) { let updatedState = ChatListAvatarNodeState.PeerAvatar(peer) if updatedState != self.state { self.state = updatedState @@ -96,11 +96,11 @@ class ChatListAvatarNode: ASDisplayNode { } } - override func drawParameters(forAsyncLayer layer: _ASDisplayLayer) -> NSObjectProtocol { + override public func drawParameters(forAsyncLayer layer: _ASDisplayLayer) -> NSObjectProtocol { return parameters ?? NSObject() } - @objc override class func draw(_ bounds: CGRect, withParameters parameters: NSObjectProtocol!, isCancelled: asdisplaynode_iscancelled_block_t, isRasterizing: Bool) { + @objc override public class func draw(_ bounds: CGRect, withParameters parameters: NSObjectProtocol!, isCancelled: asdisplaynode_iscancelled_block_t, isRasterizing: Bool) { assertNotOnMainThread() let context = UIGraphicsGetCurrentContext()! diff --git a/TelegramCore/ChatListController.swift b/TelegramCore/ChatListController.swift index 8c96efc72f..f881a0f462 100644 --- a/TelegramCore/ChatListController.swift +++ b/TelegramCore/ChatListController.swift @@ -137,7 +137,7 @@ extension ChatListEntry: Identifiable { } } -class ChatListController: ViewController { +public class ChatListController: ViewController { let account: Account private var chatListViewAndEntries: (ChatListView, [ChatListControllerEntry])? @@ -157,15 +157,15 @@ class ChatListController: ViewController { } } - init(account: Account) { + public init(account: Account) { self.account = account super.init() self.title = "Chats" self.tabBarItem.title = "Chats" - self.tabBarItem.image = UIImage(named: "Chat List/Tabs/IconChats") - self.tabBarItem.selectedImage = UIImage(named: "Chat List/Tabs/IconChatsSelected") + self.tabBarItem.image = UIImage(bundleImageName: "Chat List/Tabs/IconChats") + self.tabBarItem.selectedImage = UIImage(bundleImageName: "Chat List/Tabs/IconChatsSelected") self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Edit", style: .plain, target: self, action: #selector(self.editPressed)) //self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Compose, target: self, action: Selector("composePressed")) @@ -183,7 +183,7 @@ class ChatListController: ViewController { self.setMessageViewPosition(.Tail(count: 50), hint: "initial", force: false) } - required init(coder aDecoder: NSCoder) { + required public init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -192,7 +192,7 @@ class ChatListController: ViewController { self.openMessageFromSearchDisposable.dispose() } - override func loadDisplayNode() { + override public func loadDisplayNode() { self.displayNode = ChatListControllerNode(account: self.account) self.chatListDisplayNode.listView.displayedItemRangeChanged = { [weak self] range in @@ -289,11 +289,11 @@ class ChatListController: ViewController { } } - override func viewWillAppear(_ animated: Bool) { + override public func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) } - override func viewDidDisappear(_ animated: Bool) { + override public func viewDidDisappear(_ animated: Bool) { super.viewDidDisappear(animated) } @@ -468,7 +468,7 @@ class ChatListController: ViewController { } } - override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { + override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { super.containerLayoutUpdated(layout, transition: transition) self.chatListDisplayNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationBar.frame.maxY, transition: transition) diff --git a/TelegramCore/ChatMessageBubbleItemNode.swift b/TelegramCore/ChatMessageBubbleItemNode.swift index ac44406510..415e7db38d 100644 --- a/TelegramCore/ChatMessageBubbleItemNode.swift +++ b/TelegramCore/ChatMessageBubbleItemNode.swift @@ -42,15 +42,15 @@ private func ==(lhs: ChatMessageBackgroundType, rhs: ChatMessageBackgroundType) } } -private let chatMessageBackgroundIncomingImage = UIImage(named: "Chat/Message/Background/BubbleIncoming")?.precomposed() -private let chatMessageBackgroundOutgoingImage = UIImage(named: "Chat/Message/Background/BubbleOutgoing")?.precomposed() -private let chatMessageBackgroundIncomingMergedTopImage = UIImage(named: "Chat/Message/Background/BubbleIncomingMergedTop")?.precomposed() -private let chatMessageBackgroundIncomingMergedBottomImage = UIImage(named: "Chat/Message/Background/BubbleIncomingMergedBottom")?.precomposed() -private let chatMessageBackgroundIncomingMergedBothImage = UIImage(named: "Chat/Message/Background/BubbleIncomingMergedBoth")?.precomposed() -private let chatMessageBackgroundOutgoingMergedImage = UIImage(named: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed() -private let chatMessageBackgroundOutgoingMergedTopImage = UIImage(named: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed() -private let chatMessageBackgroundOutgoingMergedBottomImage = UIImage(named: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed() -private let chatMessageBackgroundOutgoingMergedBothImage = UIImage(named: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed() +private let chatMessageBackgroundIncomingImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleIncoming")?.precomposed() +private let chatMessageBackgroundOutgoingImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoing")?.precomposed() +private let chatMessageBackgroundIncomingMergedTopImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleIncomingMergedTop")?.precomposed() +private let chatMessageBackgroundIncomingMergedBottomImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleIncomingMergedBottom")?.precomposed() +private let chatMessageBackgroundIncomingMergedBothImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleIncomingMergedBoth")?.precomposed() +private let chatMessageBackgroundOutgoingMergedImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed() +private let chatMessageBackgroundOutgoingMergedTopImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed() +private let chatMessageBackgroundOutgoingMergedBottomImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed() +private let chatMessageBackgroundOutgoingMergedBothImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed() class ChatMessageBackground: ASImageNode { private var type: ChatMessageBackgroundType? @@ -448,7 +448,9 @@ class ChatMessageBubbleItemNode: ChatMessageItemView { if let nameNode = nameNodeSizeApply.1() { strongSelf.nameNode = nameNode if nameNode.supernode == nil { - nameNode.isLayerBacked = true + if !nameNode.isNodeLoaded { + nameNode.isLayerBacked = true + } strongSelf.addSubnode(nameNode) } nameNode.frame = CGRect(origin: CGPoint(x: contentOrigin.x + layoutConstants.text.bubbleInsets.left, y: layoutConstants.bubble.contentInsets.top + nameNodeOriginY), size: nameNodeSizeApply.0) diff --git a/TelegramCore/ChatMessageInteractiveFileNode.swift b/TelegramCore/ChatMessageInteractiveFileNode.swift index a9a20eae47..fa4b7d8d96 100644 --- a/TelegramCore/ChatMessageInteractiveFileNode.swift +++ b/TelegramCore/ChatMessageInteractiveFileNode.swift @@ -17,8 +17,8 @@ private let outgoingTitleColor = UIColor(0x3faa3c) private let incomingDescriptionColor = UIColor(0x999999) private let outgoingDescriptionColor = UIColor(0x6fb26a) -private let fileIconIncomingImage = UIImage(named: "Chat/Message/RadialProgressIconDocumentIncoming")?.precomposed() -private let fileIconOutgoingImage = UIImage(named: "Chat/Message/RadialProgressIconDocumentOutgoing")?.precomposed() +private let fileIconIncomingImage = UIImage(bundleImageName: "Chat/Message/RadialProgressIconDocumentIncoming")?.precomposed() +private let fileIconOutgoingImage = UIImage(bundleImageName: "Chat/Message/RadialProgressIconDocumentOutgoing")?.precomposed() final class ChatMessageInteractiveFileNode: ASTransformNode { private let titleNode: TextNode diff --git a/TelegramCore/ChatMessageItem.swift b/TelegramCore/ChatMessageItem.swift index 113ecb2cb3..a2fe86c95b 100644 --- a/TelegramCore/ChatMessageItem.swift +++ b/TelegramCore/ChatMessageItem.swift @@ -35,15 +35,15 @@ private func messagesShouldBeMerged(_ lhs: Message, _ rhs: Message) -> Bool { return false } -class ChatMessageItem: ListViewItem, CustomStringConvertible { +public class ChatMessageItem: ListViewItem, CustomStringConvertible { let account: Account let peerId: PeerId let controllerInteraction: ChatControllerInteraction let message: Message - let accessoryItem: ListViewAccessoryItem? + public let accessoryItem: ListViewAccessoryItem? - init(account: Account, peerId: PeerId, controllerInteraction: ChatControllerInteraction, message: Message) { + public init(account: Account, peerId: PeerId, controllerInteraction: ChatControllerInteraction, message: Message) { self.account = account self.peerId = peerId self.controllerInteraction = controllerInteraction @@ -70,7 +70,7 @@ class ChatMessageItem: ListViewItem, CustomStringConvertible { self.accessoryItem = accessoryItem } - func nodeConfiguredForWidth(async: (() -> Void) -> Void, width: CGFloat, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: (ListViewItemNode, () -> Void) -> Void) { + public func nodeConfiguredForWidth(async: (() -> Void) -> Void, width: CGFloat, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: (ListViewItemNode, () -> Void) -> Void) { var viewClassName: AnyClass = ChatMessageBubbleItemNode.self for media in message.media { @@ -119,7 +119,7 @@ class ChatMessageItem: ListViewItem, CustomStringConvertible { return (mergedTop, mergedBottom) } - func updateNode(async: (() -> Void) -> Void, node: ListViewItemNode, width: CGFloat, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: (ListViewItemNodeLayout, () -> Void) -> Void) { + public func updateNode(async: (() -> Void) -> Void, node: ListViewItemNode, width: CGFloat, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: (ListViewItemNodeLayout, () -> Void) -> Void) { if let node = node as? ChatMessageItemView { Queue.mainQueue().async { node.setupItem(self) @@ -140,7 +140,7 @@ class ChatMessageItem: ListViewItem, CustomStringConvertible { } } - var description: String { + public var description: String { return "(ChatMessageItem id: \(self.message.id), text: \"\(self.message.text)\")" } } diff --git a/TelegramCore/ContactManagement.swift b/TelegramCore/ContactManagement.swift index 4b47a47ed3..42399abf67 100644 --- a/TelegramCore/ContactManagement.swift +++ b/TelegramCore/ContactManagement.swift @@ -1,7 +1,7 @@ import Foundation import SwiftSignalKit import Postbox -import TelegramCorePrivate +import TelegramCorePrivateModule private func md5(_ data : Data) -> Data { var res = Data() diff --git a/TelegramCore/ContactsController.swift b/TelegramCore/ContactsController.swift index 9125f6e8ad..1f9a1c4137 100644 --- a/TelegramCore/ContactsController.swift +++ b/TelegramCore/ContactsController.swift @@ -110,7 +110,7 @@ private func entriesForView(_ view: ContactPeersView) -> [ContactsEntry] { return entries } -class ContactsController: ViewController { +public class ContactsController: ViewController { private let queue = Queue() private let account: Account @@ -124,15 +124,15 @@ class ContactsController: ViewController { private let index: PeerNameIndex = .lastNameFirst - init(account: Account) { + public init(account: Account) { self.account = account super.init() self.title = "Contacts" self.tabBarItem.title = "Contacts" - self.tabBarItem.image = UIImage(named: "Chat List/Tabs/IconContacts") - self.tabBarItem.selectedImage = UIImage(named: "Chat List/Tabs/IconContactsSelected") + self.tabBarItem.image = UIImage(bundleImageName: "Chat List/Tabs/IconContacts") + self.tabBarItem.selectedImage = UIImage(bundleImageName: "Chat List/Tabs/IconContactsSelected") self.disposable.set((account.postbox.contactPeersView(index: self.index, accountPeerId: account.peerId) |> deliverOn(self.queue)).start(next: { [weak self] view in self?.updateView(view) @@ -145,7 +145,7 @@ class ContactsController: ViewController { } } - required init(coder aDecoder: NSCoder) { + required public init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -153,7 +153,7 @@ class ContactsController: ViewController { self.disposable.dispose() } - override func loadDisplayNode() { + override public func loadDisplayNode() { self.displayNode = ContactsControllerNode(account: self.account) self.contactsNode.navigationBar = self.navigationBar @@ -171,7 +171,7 @@ class ContactsController: ViewController { self.displayNodeDidLoad() } - override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { + override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { super.containerLayoutUpdated(layout, transition: transition) self.contactsNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationBar.frame.maxY, transition: transition) diff --git a/TelegramCore/FFMpegAudioFrameDecoder.swift b/TelegramCore/FFMpegAudioFrameDecoder.swift index b6e17e84f8..9db96ad0de 100644 --- a/TelegramCore/FFMpegAudioFrameDecoder.swift +++ b/TelegramCore/FFMpegAudioFrameDecoder.swift @@ -1,5 +1,6 @@ import Foundation -import TelegramCorePrivate +import TelegramCorePrivateModule +import CoreMedia final class FFMpegAudioFrameDecoder: MediaTrackFrameDecoder { private let codecContext: UnsafeMutablePointer @@ -12,7 +13,6 @@ final class FFMpegAudioFrameDecoder: MediaTrackFrameDecoder { self.codecContext = codecContext self.audioFrame = av_frame_alloc() - self.swrContext = FFMpegSwResample(sourceChannelCount: Int(codecContext.pointee.channels), sourceSampleRate: Int(codecContext.pointee.sample_rate), sourceSampleFormat: codecContext.pointee.sample_fmt, destinationChannelCount: 2, destinationSampleRate: 44100, destinationSampleFormat: AV_SAMPLE_FMT_S16) } diff --git a/TelegramCore/FFMpegMediaFrameSourceContext.swift b/TelegramCore/FFMpegMediaFrameSourceContext.swift index c0948da30f..8c3a1ba4c0 100644 --- a/TelegramCore/FFMpegMediaFrameSourceContext.swift +++ b/TelegramCore/FFMpegMediaFrameSourceContext.swift @@ -2,7 +2,7 @@ import Foundation import SwiftSignalKit import Postbox import CoreMedia -import TelegramCorePrivate +import TelegramCorePrivateModule private struct StreamContext { private let index: Int diff --git a/TelegramCore/FFMpegMediaFrameSourceContextHelpers.swift b/TelegramCore/FFMpegMediaFrameSourceContextHelpers.swift index 5e5ae0773f..fe50194436 100644 --- a/TelegramCore/FFMpegMediaFrameSourceContextHelpers.swift +++ b/TelegramCore/FFMpegMediaFrameSourceContextHelpers.swift @@ -1,6 +1,6 @@ import Foundation import CoreMedia -import TelegramCorePrivate +import TelegramCorePrivateModule final class FFMpegMediaFrameSourceContextHelpers { static let registerFFMpegGlobals: Void = { diff --git a/TelegramCore/FFMpegPacket.swift b/TelegramCore/FFMpegPacket.swift index 8ed2666cd0..c2c792ea92 100644 --- a/TelegramCore/FFMpegPacket.swift +++ b/TelegramCore/FFMpegPacket.swift @@ -1,5 +1,5 @@ import Foundation -import TelegramCorePrivate +import TelegramCorePrivateModule final class FFMpegPacket { var packet = AVPacket() diff --git a/TelegramCore/FFMpegSwResample.h b/TelegramCore/FFMpegSwResample.h index fcedb2a727..a1cb9fab98 100644 --- a/TelegramCore/FFMpegSwResample.h +++ b/TelegramCore/FFMpegSwResample.h @@ -1,8 +1,8 @@ #import -#import "libavutil/avutil.h" -#import "libavutil/channel_layout.h" -#import "libswresample/swresample.h" +#import "../third-party/FFMpeg-iOS/include/libavutil/avutil.h" +#import "../third-party/FFMpeg-iOS/include/libavutil/channel_layout.h" +#import "../third-party/FFMpeg-iOS/include/libswresample/swresample.h" @interface FFMpegSwResample : NSObject diff --git a/TelegramCore/FrameworkBundle.swift b/TelegramCore/FrameworkBundle.swift new file mode 100644 index 0000000000..b863239d79 --- /dev/null +++ b/TelegramCore/FrameworkBundle.swift @@ -0,0 +1,13 @@ +import Foundation + +private class FrameworkBundleClass: NSObject { +} + +private let frameworkBundle: Bundle = Bundle(for: FrameworkBundleClass.self) +private let screenScaleFactor = Int(UIScreen.main.scale) + +extension UIImage { + convenience init?(bundleImageName: String) { + self.init(named: bundleImageName, in: frameworkBundle, compatibleWith: nil) + } +} diff --git a/TelegramCore/Holes.swift b/TelegramCore/Holes.swift index 065d992ce6..2aeed15e11 100644 --- a/TelegramCore/Holes.swift +++ b/TelegramCore/Holes.swift @@ -11,8 +11,8 @@ private func messageFilterForTagMask(_ tagMask: MessageTags) -> Api.MessagesFilt } } -func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direction: HoleFillDirection, tagMask: MessageTags?) -> Signal { - return account.postbox.peerWithId(hole.maxIndex.id.peerId) +func fetchMessageHistoryHole(network: Network, postbox: Postbox, hole: MessageHistoryHole, direction: HoleFillDirection, tagMask: MessageTags?) -> Signal { + return postbox.peerWithId(hole.maxIndex.id.peerId) |> take(1) //|> delay(4.0, queue: Queue.concurrentDefaultQueue()) |> mapToSignal { peer in @@ -29,7 +29,7 @@ func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direc case .AroundIndex: assertionFailure(".AroundIndex not supported") } - request = account.network.request(Api.functions.messages.search(flags: 0, peer: inputPeer, q: "", filter: filter, minDate: 0, maxDate: hole.maxIndex.timestamp, offset: 0, maxId: hole.maxIndex.id.id + 1, limit: Int32(limit))) + request = network.request(Api.functions.messages.search(flags: 0, peer: inputPeer, q: "", filter: filter, minDate: 0, maxDate: hole.maxIndex.timestamp, offset: 0, maxId: hole.maxIndex.id.id + 1, limit: Int32(limit))) } else { let offsetId: Int32 let addOffset: Int32 @@ -46,7 +46,7 @@ func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direc addOffset = Int32(-limit / 2) } - request = account.network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: offsetId, offsetDate: hole.maxIndex.timestamp, addOffset: addOffset, limit: Int32(selectedLimit), maxId: hole.maxIndex.id.id == Int32.max ? hole.maxIndex.id.id : (hole.maxIndex.id.id + 1), minId: hole.min - 1)) + request = network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: offsetId, offsetDate: hole.maxIndex.timestamp, addOffset: addOffset, limit: Int32(selectedLimit), maxId: hole.maxIndex.id.id == Int32.max ? hole.maxIndex.id.id : (hole.maxIndex.id.id + 1), minId: hole.min - 1)) } return request @@ -69,7 +69,7 @@ func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direc chats = apiChats users = apiUsers } - return account.postbox.modify { modifier in + return postbox.modify { modifier in var storeMessages: [StoreMessage] = [] for message in messages { @@ -105,12 +105,12 @@ func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direc } } -func fetchChatListHole(_ account: Account, hole: ChatListHole) -> Signal { +func fetchChatListHole(network: Network, postbox: Postbox, hole: ChatListHole) -> Signal { let offset: Signal<(Int32, Int32, Api.InputPeer), NoError> if hole.index.id.peerId.namespace == Namespaces.Peer.Empty { offset = single((0, 0, Api.InputPeer.inputPeerEmpty), NoError.self) } else { - offset = account.postbox.peerWithId(hole.index.id.peerId) + offset = postbox.peerWithId(hole.index.id.peerId) |> take(1) |> map { peer in return (hole.index.timestamp, hole.index.id.id + 1, apiInputPeer(peer) ?? .inputPeerEmpty) @@ -118,9 +118,9 @@ func fetchChatListHole(_ account: Account, hole: ChatListHole) -> Signal mapToSignal { (timestamp, id, peer) in - return account.network.request(Api.functions.messages.getDialogs(offsetDate: timestamp, offsetId: id, offsetPeer: peer, limit: 100)) + return network.request(Api.functions.messages.getDialogs(offsetDate: timestamp, offsetId: id, offsetPeer: peer, limit: 100)) |> retryRequest - |> mapToSignal { result in + |> mapToSignal { result -> Signal in let dialogsChats: [Api.Chat] let dialogsUsers: [Api.User] @@ -244,7 +244,7 @@ func fetchChatListHole(_ account: Account, hole: ChatListHole) -> Signal Peer in return updated }) diff --git a/TelegramCore/Images.xcassets/Chat List/Contents.json b/TelegramCore/Images.xcassets/Chat List/Contents.json new file mode 100644 index 0000000000..38f0c81fc2 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat List/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "provides-namespace" : true + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/Contents.json b/TelegramCore/Images.xcassets/Chat List/Tabs/Contents.json new file mode 100644 index 0000000000..38f0c81fc2 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat List/Tabs/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "provides-namespace" : true + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconChats.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat List/Tabs/IconChats.imageset/Contents.json new file mode 100644 index 0000000000..9d36fc4473 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat List/Tabs/IconChats.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "TabIconMessages@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconChats.imageset/TabIconMessages@2x.png b/TelegramCore/Images.xcassets/Chat List/Tabs/IconChats.imageset/TabIconMessages@2x.png new file mode 100644 index 0000000000..30b8a0097e Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat List/Tabs/IconChats.imageset/TabIconMessages@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconChatsSelected.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat List/Tabs/IconChatsSelected.imageset/Contents.json new file mode 100644 index 0000000000..0cb58499a6 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat List/Tabs/IconChatsSelected.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "TabIconMessages_Highlighted@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconChatsSelected.imageset/TabIconMessages_Highlighted@2x.png b/TelegramCore/Images.xcassets/Chat List/Tabs/IconChatsSelected.imageset/TabIconMessages_Highlighted@2x.png new file mode 100644 index 0000000000..23612a4c9c Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat List/Tabs/IconChatsSelected.imageset/TabIconMessages_Highlighted@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconContacts.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat List/Tabs/IconContacts.imageset/Contents.json new file mode 100644 index 0000000000..2a12bb8512 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat List/Tabs/IconContacts.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "TabIconContacts@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconContacts.imageset/TabIconContacts@2x.png b/TelegramCore/Images.xcassets/Chat List/Tabs/IconContacts.imageset/TabIconContacts@2x.png new file mode 100644 index 0000000000..4a523ac902 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat List/Tabs/IconContacts.imageset/TabIconContacts@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconContactsSelected.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat List/Tabs/IconContactsSelected.imageset/Contents.json new file mode 100644 index 0000000000..e9b76ca372 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat List/Tabs/IconContactsSelected.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "TabIconContacts_Highlighted@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconContactsSelected.imageset/TabIconContacts_Highlighted@2x.png b/TelegramCore/Images.xcassets/Chat List/Tabs/IconContactsSelected.imageset/TabIconContacts_Highlighted@2x.png new file mode 100644 index 0000000000..20d555e6d3 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat List/Tabs/IconContactsSelected.imageset/TabIconContacts_Highlighted@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettings.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettings.imageset/Contents.json new file mode 100644 index 0000000000..d12dc44869 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettings.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "TabIconSettings@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettings.imageset/TabIconSettings@2x.png b/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettings.imageset/TabIconSettings@2x.png new file mode 100644 index 0000000000..c1a9926fc4 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettings.imageset/TabIconSettings@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettingsSelected.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettingsSelected.imageset/Contents.json new file mode 100644 index 0000000000..51e3998e8b --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettingsSelected.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "TabIconSettings_Highlighted@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettingsSelected.imageset/TabIconSettings_Highlighted@2x.png b/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettingsSelected.imageset/TabIconSettings_Highlighted@2x.png new file mode 100644 index 0000000000..33dd36bb4b Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat List/Tabs/IconSettingsSelected.imageset/TabIconSettings_Highlighted@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Contents.json b/TelegramCore/Images.xcassets/Chat/Contents.json new file mode 100644 index 0000000000..38f0c81fc2 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "provides-namespace" : true + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Input/Contents.json b/TelegramCore/Images.xcassets/Chat/Input/Contents.json new file mode 100644 index 0000000000..38f0c81fc2 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Input/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "provides-namespace" : true + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Input/Text/Contents.json b/TelegramCore/Images.xcassets/Chat/Input/Text/Contents.json new file mode 100644 index 0000000000..38f0c81fc2 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Input/Text/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "provides-namespace" : true + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Input/Text/IconAttachment.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Input/Text/IconAttachment.imageset/Contents.json new file mode 100644 index 0000000000..ae4dac8782 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Input/Text/IconAttachment.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "IconAttachment.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Input/Text/IconAttachment.imageset/IconAttachment.pdf b/TelegramCore/Images.xcassets/Chat/Input/Text/IconAttachment.imageset/IconAttachment.pdf new file mode 100644 index 0000000000..0a160807a6 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Input/Text/IconAttachment.imageset/IconAttachment.pdf differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncoming.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncoming.imageset/Contents.json new file mode 100644 index 0000000000..80cfcaecaa --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncoming.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "resizing" : { + "mode" : "9-part", + "center" : { + "mode" : "stretch", + "width" : 3, + "height" : 1 + }, + "cap-insets" : { + "bottom" : 32, + "top" : 32, + "right" : 33, + "left" : 41 + } + }, + "idiom" : "universal", + "filename" : "ModernBubbleIncomingFullPad@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncoming.imageset/ModernBubbleIncomingFullPad@2x.png b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncoming.imageset/ModernBubbleIncomingFullPad@2x.png new file mode 100644 index 0000000000..d9f6fd76ee Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncoming.imageset/ModernBubbleIncomingFullPad@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMerged.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMerged.imageset/Contents.json new file mode 100644 index 0000000000..08c8c83b11 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMerged.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "resizing" : { + "mode" : "9-part", + "center" : { + "mode" : "stretch", + "width" : 1, + "height" : 1 + }, + "cap-insets" : { + "bottom" : 33, + "top" : 32, + "right" : 34, + "left" : 44 + } + }, + "idiom" : "universal", + "filename" : "ModernBubbleIncomingPartialPad@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMerged.imageset/ModernBubbleIncomingPartialPad@2x.png b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMerged.imageset/ModernBubbleIncomingPartialPad@2x.png new file mode 100644 index 0000000000..11a5c80fa4 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMerged.imageset/ModernBubbleIncomingPartialPad@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBoth.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBoth.imageset/Contents.json new file mode 100644 index 0000000000..0e38a88e8b --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBoth.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "resizing" : { + "mode" : "9-part", + "center" : { + "mode" : "stretch", + "width" : 1, + "height" : 1 + }, + "cap-insets" : { + "bottom" : 32, + "top" : 33, + "right" : 49, + "left" : 30 + } + }, + "idiom" : "universal", + "filename" : "ModernBubbleIncomingMergedBoth@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBoth.imageset/ModernBubbleIncomingMergedBoth@2x.png b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBoth.imageset/ModernBubbleIncomingMergedBoth@2x.png new file mode 100644 index 0000000000..2bca41e962 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBoth.imageset/ModernBubbleIncomingMergedBoth@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBottom.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBottom.imageset/Contents.json new file mode 100644 index 0000000000..a79bb7b0f8 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBottom.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "resizing" : { + "mode" : "9-part", + "center" : { + "mode" : "stretch", + "width" : 1, + "height" : 1 + }, + "cap-insets" : { + "bottom" : 32, + "top" : 33, + "right" : 35, + "left" : 44 + } + }, + "idiom" : "universal", + "filename" : "ModernBubbleIncomingMergedBottom@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBottom.imageset/ModernBubbleIncomingMergedBottom@2x.png b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBottom.imageset/ModernBubbleIncomingMergedBottom@2x.png new file mode 100644 index 0000000000..1d511b792b Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedBottom.imageset/ModernBubbleIncomingMergedBottom@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedTop.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedTop.imageset/Contents.json new file mode 100644 index 0000000000..00b5220dbf --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedTop.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "resizing" : { + "mode" : "9-part", + "center" : { + "mode" : "stretch", + "width" : 1, + "height" : 1 + }, + "cap-insets" : { + "bottom" : 33, + "top" : 32, + "right" : 36, + "left" : 43 + } + }, + "idiom" : "universal", + "filename" : "ModernBubbleIncomingMergedTop@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedTop.imageset/ModernBubbleIncomingMergedTop@2x.png b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedTop.imageset/ModernBubbleIncomingMergedTop@2x.png new file mode 100644 index 0000000000..69cfa208f6 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMergedTop.imageset/ModernBubbleIncomingMergedTop@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoing.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoing.imageset/Contents.json new file mode 100644 index 0000000000..843f329871 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoing.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "resizing" : { + "mode" : "9-part", + "center" : { + "mode" : "stretch", + "width" : 1, + "height" : 1 + }, + "cap-insets" : { + "bottom" : 33, + "top" : 31, + "right" : 43, + "left" : 34 + } + }, + "idiom" : "universal", + "filename" : "ModernBubbleOutgoingFullPad@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoing.imageset/ModernBubbleOutgoingFullPad@2x.png b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoing.imageset/ModernBubbleOutgoingFullPad@2x.png new file mode 100644 index 0000000000..51946b74b0 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoing.imageset/ModernBubbleOutgoingFullPad@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoingMerged.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoingMerged.imageset/Contents.json new file mode 100644 index 0000000000..227b099c2d --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoingMerged.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "resizing" : { + "mode" : "9-part", + "center" : { + "mode" : "stretch", + "width" : 1, + "height" : 1 + }, + "cap-insets" : { + "bottom" : 33, + "top" : 32, + "right" : 44, + "left" : 34 + } + }, + "idiom" : "universal", + "filename" : "ModernBubbleOutgoingPartialPad@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoingMerged.imageset/ModernBubbleOutgoingPartialPad@2x.png b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoingMerged.imageset/ModernBubbleOutgoingPartialPad@2x.png new file mode 100644 index 0000000000..982d3b1a4e Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoingMerged.imageset/ModernBubbleOutgoingPartialPad@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/Background/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Background/Contents.json new file mode 100644 index 0000000000..38f0c81fc2 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Background/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "provides-namespace" : true + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/Contents.json new file mode 100644 index 0000000000..38f0c81fc2 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "provides-namespace" : true + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/Contents.json new file mode 100644 index 0000000000..9f3aeed1f7 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ModernMessageDocumentIconIncoming@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ModernMessageDocumentIconIncoming@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/ModernMessageDocumentIconIncoming@2x.png b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/ModernMessageDocumentIconIncoming@2x.png new file mode 100644 index 0000000000..1da98c4002 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/ModernMessageDocumentIconIncoming@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/ModernMessageDocumentIconIncoming@3x.png b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/ModernMessageDocumentIconIncoming@3x.png new file mode 100644 index 0000000000..b92416cd4c Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentIncoming.imageset/ModernMessageDocumentIconIncoming@3x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/Contents.json new file mode 100644 index 0000000000..fa47c058e0 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ModernMessageDocumentIconOutgoing@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ModernMessageDocumentIconOutgoing@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/ModernMessageDocumentIconOutgoing@2x.png b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/ModernMessageDocumentIconOutgoing@2x.png new file mode 100644 index 0000000000..d3d84a00ef Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/ModernMessageDocumentIconOutgoing@2x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/ModernMessageDocumentIconOutgoing@3x.png b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/ModernMessageDocumentIconOutgoing@3x.png new file mode 100644 index 0000000000..cc773196b2 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Message/RadialProgressIconDocumentOutgoing.imageset/ModernMessageDocumentIconOutgoing@3x.png differ diff --git a/TelegramCore/Images.xcassets/Chat/Wallpapers/Builtin0.imageset/Contents.json b/TelegramCore/Images.xcassets/Chat/Wallpapers/Builtin0.imageset/Contents.json new file mode 100644 index 0000000000..6d499c7d57 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Wallpapers/Builtin0.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "builtin-wallpaper-0.jpg", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Chat/Wallpapers/Builtin0.imageset/builtin-wallpaper-0.jpg b/TelegramCore/Images.xcassets/Chat/Wallpapers/Builtin0.imageset/builtin-wallpaper-0.jpg new file mode 100644 index 0000000000..ea45b36ee0 Binary files /dev/null and b/TelegramCore/Images.xcassets/Chat/Wallpapers/Builtin0.imageset/builtin-wallpaper-0.jpg differ diff --git a/TelegramCore/Images.xcassets/Chat/Wallpapers/Contents.json b/TelegramCore/Images.xcassets/Chat/Wallpapers/Contents.json new file mode 100644 index 0000000000..38f0c81fc2 --- /dev/null +++ b/TelegramCore/Images.xcassets/Chat/Wallpapers/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "provides-namespace" : true + } +} \ No newline at end of file diff --git a/TelegramCore/Images.xcassets/Contents.json b/TelegramCore/Images.xcassets/Contents.json new file mode 100644 index 0000000000..da4a164c91 --- /dev/null +++ b/TelegramCore/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TelegramCore/ListController.swift b/TelegramCore/ListController.swift index 93b673cded..395ba7d2dc 100644 --- a/TelegramCore/ListController.swift +++ b/TelegramCore/ListController.swift @@ -3,16 +3,16 @@ import UIKit import Display import AsyncDisplayKit -class ListController: ViewController { - var items: [ListControllerItem] = [] +public class ListController: ViewController { + public var items: [ListControllerItem] = [] - var listDisplayNode: ListControllerNode { + public var listDisplayNode: ListControllerNode { get { return super.displayNode as! ListControllerNode } } - override func loadDisplayNode() { + override public func loadDisplayNode() { self.displayNode = ListControllerNode() self.displayNode.backgroundColor = UIColor(0xefeff4) @@ -22,7 +22,7 @@ class ListController: ViewController { self.displayNodeDidLoad() } - override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { + override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { super.containerLayoutUpdated(layout, transition: transition) self.listDisplayNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationBar.frame.maxY, transition: transition) diff --git a/TelegramCore/ListControllerItem.swift b/TelegramCore/ListControllerItem.swift index 0e52514f56..db2871d041 100644 --- a/TelegramCore/ListControllerItem.swift +++ b/TelegramCore/ListControllerItem.swift @@ -1,4 +1,4 @@ import Display -protocol ListControllerItem: ListViewItem { +public protocol ListControllerItem: ListViewItem { } diff --git a/TelegramCore/ListControllerNode.swift b/TelegramCore/ListControllerNode.swift index d1a84c2f00..b4ae02b8ae 100644 --- a/TelegramCore/ListControllerNode.swift +++ b/TelegramCore/ListControllerNode.swift @@ -2,7 +2,7 @@ import Foundation import AsyncDisplayKit import Display -class ListControllerNode: ASDisplayNode { +public class ListControllerNode: ASDisplayNode { let listView: ListView override init() { diff --git a/TelegramCore/Log.swift b/TelegramCore/Log.swift index d10ee9c4a3..3091f2c5a8 100644 --- a/TelegramCore/Log.swift +++ b/TelegramCore/Log.swift @@ -1,5 +1,5 @@ import Foundation -import TelegramCorePrivate +import TelegramCorePrivateModule private let queue = DispatchQueue(label: "org.telegram.Telegram.trace", qos: .background) diff --git a/TelegramCore/ManagedChatListHoles.swift b/TelegramCore/ManagedChatListHoles.swift new file mode 100644 index 0000000000..827f4aa614 --- /dev/null +++ b/TelegramCore/ManagedChatListHoles.swift @@ -0,0 +1,64 @@ +import Foundation +import Postbox +import SwiftSignalKit + +private final class ManagedChatListHolesState { + private var holeDisposables: [ChatListHole: Disposable] = [:] + + func clearDisposables() -> [Disposable] { + let disposables = Array(self.holeDisposables.values) + self.holeDisposables.removeAll() + return disposables + } + + func update(entries: Set) -> (removed: [Disposable], added: [ChatListHole: MetaDisposable]) { + var removed: [Disposable] = [] + var added: [ChatListHole: MetaDisposable] = [:] + + for (entry, disposable) in self.holeDisposables { + if !entries.contains(entry) { + removed.append(disposable) + self.holeDisposables.removeValue(forKey: entry) + } + } + + for entry in entries { + if self.holeDisposables[entry] == nil { + let disposable = MetaDisposable() + self.holeDisposables[entry] = disposable + added[entry] = disposable + } + } + + return (removed, added) + } +} + +func managedChatListHoles(network: Network, postbox: Postbox) -> Signal { + return Signal { _ in + let state = Atomic(value: ManagedChatListHolesState()) + + let disposable = postbox.chatListHolesView().start(next: { view in + let (removed, added) = state.with { state -> (removed: [Disposable], added: [ChatListHole: MetaDisposable]) in + return state.update(entries: view.entries) + } + + for disposable in removed { + disposable.dispose() + } + + for (entry, disposable) in added { + disposable.set(fetchChatListHole(network: network, postbox: postbox, hole: entry).start()) + } + }) + + return ActionDisposable { + disposable.dispose() + for disposable in state.with({ state -> [Disposable] in + state.clearDisposables() + }) { + disposable.dispose() + } + } + } +} diff --git a/TelegramCore/ManagedMessageHistoryHoles.swift b/TelegramCore/ManagedMessageHistoryHoles.swift new file mode 100644 index 0000000000..9009b0d54b --- /dev/null +++ b/TelegramCore/ManagedMessageHistoryHoles.swift @@ -0,0 +1,70 @@ +import Foundation +import Postbox +import SwiftSignalKit + +private final class ManagedMessageHistoryHolesState { + private var holeDisposables: [MessageHistoryHolesViewEntry: Disposable] = [:] + + func clearDisposables() -> [Disposable] { + let disposables = Array(self.holeDisposables.values) + self.holeDisposables.removeAll() + return disposables + } + + func update(entries: Set) -> (removed: [Disposable], added: [MessageHistoryHolesViewEntry: MetaDisposable]) { + var removed: [Disposable] = [] + var added: [MessageHistoryHolesViewEntry: MetaDisposable] = [:] + + for (entry, disposable) in self.holeDisposables { + if !entries.contains(entry) { + removed.append(disposable) + self.holeDisposables.removeValue(forKey: entry) + } + } + + for entry in entries { + if self.holeDisposables[entry] == nil { + let disposable = MetaDisposable() + self.holeDisposables[entry] = disposable + added[entry] = disposable + } + } + + return (removed, added) + } +} + +func managedMessageHistoryHoles(network: Network, postbox: Postbox) -> Signal { + return Signal { _ in + let state = Atomic(value: ManagedMessageHistoryHolesState()) + + let disposable = postbox.messageHistoryHolesView().start(next: { view in + let (removed, added) = state.with { state -> (removed: [Disposable], added: [MessageHistoryHolesViewEntry: MetaDisposable]) in + var entries = Set() + for (_, entrySet) in view.entries { + for entry in entrySet { + entries.insert(entry) + } + } + return state.update(entries: entries) + } + + for disposable in removed { + disposable.dispose() + } + + for (entry, disposable) in added { + disposable.set(fetchMessageHistoryHole(network: network, postbox: postbox, hole: entry.hole, direction: entry.direction, tagMask: entry.tags).start()) + } + }) + + return ActionDisposable { + disposable.dispose() + for disposable in state.with({ state -> [Disposable] in + state.clearDisposables() + }) { + disposable.dispose() + } + } + } +} diff --git a/TelegramCore/ManagedServiceViews.swift b/TelegramCore/ManagedServiceViews.swift new file mode 100644 index 0000000000..4b292d4af3 --- /dev/null +++ b/TelegramCore/ManagedServiceViews.swift @@ -0,0 +1,14 @@ +import Foundation +import Postbox +import SwiftSignalKit + +func managedServiceViews(network: Network, postbox: Postbox, stateManager: StateManager) -> Signal { + return Signal { _ in + let disposable = DisposableSet() + disposable.add(managedMessageHistoryHoles(network: network, postbox: postbox).start()) + disposable.add(managedChatListHoles(network: network, postbox: postbox).start()) + disposable.add(managedUnsentMessageIndices(network: network, postbox: postbox, stateManager: stateManager).start()) + disposable.add(managedSynchronizePeerReadStates(network: network, postbox: postbox, stateManager: stateManager).start()) + return disposable + } +} diff --git a/TelegramCore/ManagedSynchronizePeerReadStates.swift b/TelegramCore/ManagedSynchronizePeerReadStates.swift new file mode 100644 index 0000000000..3224ffa4bd --- /dev/null +++ b/TelegramCore/ManagedSynchronizePeerReadStates.swift @@ -0,0 +1,71 @@ +import Foundation +import Postbox +import SwiftSignalKit + +private final class ManagedSynchronizePeerReadStatesState { + private var synchronizeDisposables: [PeerId: (PeerReadStateSynchronizationOperation, Disposable)] = [:] + + func clearDisposables() -> [Disposable] { + let disposables = Array(self.synchronizeDisposables.values.map({ $0.1 })) + self.synchronizeDisposables.removeAll() + return disposables + } + + func update(operations: [PeerId: PeerReadStateSynchronizationOperation]) -> (removed: [Disposable], added: [(PeerId, PeerReadStateSynchronizationOperation, MetaDisposable)]) { + var removed: [Disposable] = [] + var added: [(PeerId, PeerReadStateSynchronizationOperation, MetaDisposable)] = [] + + for (peerId, (operation, disposable)) in self.synchronizeDisposables { + if operations[peerId] != operation { + removed.append(disposable) + self.synchronizeDisposables.removeValue(forKey: peerId) + } + } + + for (peerId, operation) in operations { + if self.synchronizeDisposables[peerId] == nil { + let disposable = MetaDisposable() + self.synchronizeDisposables[peerId] = (operation, disposable) + added.append((peerId, operation, disposable)) + } + } + + return (removed, added) + } +} + +func managedSynchronizePeerReadStates(network: Network, postbox: Postbox, stateManager: StateManager) -> Signal { + return Signal { _ in + let state = Atomic(value: ManagedSynchronizePeerReadStatesState()) + + let disposable = postbox.synchronizePeerReadStatesView().start(next: { view in + let (removed, added) = state.with { state -> (removed: [Disposable], added: [(PeerId, PeerReadStateSynchronizationOperation, MetaDisposable)]) in + return state.update(operations: view.operations) + } + + for disposable in removed { + disposable.dispose() + } + + for (peerId, operation, disposable) in added { + let synchronizeOperation: Signal + switch operation { + case .Validate: + synchronizeOperation = synchronizePeerReadState(network: network, postbox: postbox, stateManager: stateManager, peerId: peerId, push: false, validate: true) + case let .Push(thenSync): + synchronizeOperation = synchronizePeerReadState(network: network, postbox: postbox, stateManager: stateManager, peerId: peerId, push: true, validate: thenSync) + } + disposable.set(synchronizeOperation.start()) + } + }) + + return ActionDisposable { + disposable.dispose() + for disposable in state.with({ state -> [Disposable] in + state.clearDisposables() + }) { + disposable.dispose() + } + } + } +} diff --git a/TelegramCore/ManagedUnsentMessageIndices.swift b/TelegramCore/ManagedUnsentMessageIndices.swift new file mode 100644 index 0000000000..46a5cb236f --- /dev/null +++ b/TelegramCore/ManagedUnsentMessageIndices.swift @@ -0,0 +1,70 @@ +import Foundation +import Postbox +import SwiftSignalKit + +private final class ManagedUnsentMessageIndicesState { + private var sendDisposables: [MessageIndex: Disposable] = [:] + + func clearDisposables() -> [Disposable] { + let disposables = Array(self.sendDisposables.values) + self.sendDisposables.removeAll() + return disposables + } + + func update(entries: Set) -> (removed: [Disposable], added: [MessageIndex: MetaDisposable]) { + var removed: [Disposable] = [] + var added: [MessageIndex: MetaDisposable] = [:] + + for (entry, disposable) in self.sendDisposables { + if !entries.contains(entry) { + removed.append(disposable) + self.sendDisposables.removeValue(forKey: entry) + } + } + + for entry in entries { + if self.sendDisposables[entry] == nil { + let disposable = MetaDisposable() + self.sendDisposables[entry] = disposable + added[entry] = disposable + } + } + + return (removed, added) + } +} + +func managedUnsentMessageIndices(network: Network, postbox: Postbox, stateManager: StateManager) -> Signal { + return Signal { _ in + let state = Atomic(value: ManagedUnsentMessageIndicesState()) + + let disposable = postbox.unsentMessageIndicesView().start(next: { view in + let (removed, added) = state.with { state -> (removed: [Disposable], added: [MessageIndex: MetaDisposable]) in + return state.update(entries: view.indices) + } + + for disposable in removed { + disposable.dispose() + } + + for (index, disposable) in added { + let sendMessage = postbox.messageAtId(index.id) + |> filter { $0 != nil } + |> take(1) + |> mapToSignal { message -> Signal in + return sendUnsentMessage(network: network, postbox: postbox, stateManager: stateManager, message: message!) + } + disposable.set(sendMessage.start()) + } + }) + + return ActionDisposable { + disposable.dispose() + for disposable in state.with({ state -> [Disposable] in + state.clearDisposables() + }) { + disposable.dispose() + } + } + } +} diff --git a/TelegramCore/MediaPlayer.swift b/TelegramCore/MediaPlayer.swift index 2d048a1a11..7af5ad1904 100644 --- a/TelegramCore/MediaPlayer.swift +++ b/TelegramCore/MediaPlayer.swift @@ -182,40 +182,62 @@ private final class MediaPlayerContext { queue.async { [weak self] in if let strongSelf = self { if let playerNode = strongSelf.playerNode { + let queue = strongSelf.queue + DispatchQueue.main.async { playerNode.reset() playerNode.controlTimebase = controlTimebase.timebase + + queue.async { [weak self] in + if let strongSelf = self { + switch action { + case .play: + strongSelf.state = .playing(loadedState) + strongSelf.audioRenderer?.start() + case .pause: + strongSelf.state = .paused(loadedState) + } + + strongSelf.tick() + } + } } + } else { + switch action { + case .play: + strongSelf.state = .playing(loadedState) + strongSelf.audioRenderer?.start() + case .pause: + strongSelf.state = .paused(loadedState) + } + + strongSelf.tick() } - - switch action { - case .play: - strongSelf.state = .playing(loadedState) - strongSelf.audioRenderer?.start() - case .pause: - strongSelf.state = .paused(loadedState) - } - - strongSelf.tick() } } }) } else { if let playerNode = self.playerNode { + let queue = self.queue + DispatchQueue.main.async { playerNode.reset() playerNode.controlTimebase = controlTimebase.timebase + + queue.async { [weak self] in + if let strongSelf = self { + switch action { + case .play: + strongSelf.state = .playing(loadedState) + case .pause: + strongSelf.state = .paused(loadedState) + } + + strongSelf.tick() + } + } } } - - switch action { - case .play: - self.state = .playing(loadedState) - case .pause: - self.state = .paused(loadedState) - } - - self.tick() } } diff --git a/TelegramCore/MediaPlayerAudioRenderer.swift b/TelegramCore/MediaPlayerAudioRenderer.swift index 377634342e..54da307a47 100644 --- a/TelegramCore/MediaPlayerAudioRenderer.swift +++ b/TelegramCore/MediaPlayerAudioRenderer.swift @@ -471,6 +471,7 @@ final class MediaPlayerAudioRenderer { didSet { let rate = self.rate if !oldValue.isEqual(to: rate) { + print("setting audio rate to \(rate)") assert(rate.isEqual(to: 1.0) || rate.isEqual(to: 0.0)) audioPlayerRendererQueue.async { diff --git a/TelegramCore/MediaTrackDecodableFrame.swift b/TelegramCore/MediaTrackDecodableFrame.swift index 226d42db59..275060004b 100644 --- a/TelegramCore/MediaTrackDecodableFrame.swift +++ b/TelegramCore/MediaTrackDecodableFrame.swift @@ -1,6 +1,6 @@ import Foundation import CoreMedia -import TelegramCorePrivate +import TelegramCorePrivateModule enum MediaTrackFrameType { case video diff --git a/TelegramCore/Namespaces.swift b/TelegramCore/Namespaces.swift index 0b02ef04f0..7d9ea467b8 100644 --- a/TelegramCore/Namespaces.swift +++ b/TelegramCore/Namespaces.swift @@ -25,7 +25,7 @@ public struct Namespaces { } } -extension MessageTags { +public extension MessageTags { static let PhotoOrVideo = MessageTags(rawValue: 1 << 0) static let File = MessageTags(rawValue: 2 << 0) static let Voice = MessageTags(rawValue: 3 << 0) diff --git a/TelegramCore/Network.swift b/TelegramCore/Network.swift index f766a977ae..c7fe150ddb 100644 --- a/TelegramCore/Network.swift +++ b/TelegramCore/Network.swift @@ -2,7 +2,7 @@ import Foundation import MtProtoKit import Postbox import SwiftSignalKit -import TelegramCorePrivate +import TelegramCorePrivateModule enum ConnectionStatus { case WaitingForNetwork @@ -76,7 +76,7 @@ private class MTProtoConnectionStatusDelegate: NSObject, MTProtoDelegate { } } -class Network { +public class Network { let datacenterId: Int let context: MTContext let mtProto: MTProto @@ -91,6 +91,7 @@ class Network { init(datacenterId: Int, keychain: Keychain) { NetworkRegisterLoggingFunction() + registerLoggingFunctions() self.datacenterId = datacenterId diff --git a/TelegramCore/NetworkLogging.m b/TelegramCore/NetworkLogging.m index 890fc59396..8e487de4a7 100644 --- a/TelegramCore/NetworkLogging.m +++ b/TelegramCore/NetworkLogging.m @@ -11,7 +11,7 @@ void setBridgingTraceFunction(void (*f)(NSString *, NSString *)) { #if TARGET_IPHONE_SIMULATOR static bool loggingEnabled = false; #else -static bool loggingEnabled = false; +static bool loggingEnabled = true; #endif static void TGTelegramLoggingFunction(NSString *format, va_list args) { diff --git a/TelegramCore/PhoneNumbers.swift b/TelegramCore/PhoneNumbers.swift index f9f67d80bd..6f971feb9a 100644 --- a/TelegramCore/PhoneNumbers.swift +++ b/TelegramCore/PhoneNumbers.swift @@ -1,5 +1,5 @@ import Foundation -import TelegramCorePrivate +import TelegramCorePrivateModule private let phoneNumberUtil = NBPhoneNumberUtil() diff --git a/TelegramCore/PhotoResources.swift b/TelegramCore/PhotoResources.swift index f861320e64..5aff6e527e 100644 --- a/TelegramCore/PhotoResources.swift +++ b/TelegramCore/PhotoResources.swift @@ -4,7 +4,7 @@ import SwiftSignalKit import Display import AVFoundation import ImageIO -import TelegramCorePrivate +import TelegramCorePrivateModule func largestRepresentationForPhoto(_ photo: TelegramMediaImage) -> TelegramMediaImageRepresentation? { return photo.representationForDisplayAtSize(CGSize(width: 1280.0, height: 1280.0)) diff --git a/TelegramCore/RingByteBuffer.swift b/TelegramCore/RingByteBuffer.swift index ca18f0b3a0..48009f4b49 100644 --- a/TelegramCore/RingByteBuffer.swift +++ b/TelegramCore/RingByteBuffer.swift @@ -1,6 +1,6 @@ import Foundation import Darwin -import TelegramCorePrivate +import TelegramCorePrivateModule public final class RingByteBuffer { public let size: Int diff --git a/TelegramCore/SearchBarNode.swift b/TelegramCore/SearchBarNode.swift index 651cb87659..a4d389ddb0 100644 --- a/TelegramCore/SearchBarNode.swift +++ b/TelegramCore/SearchBarNode.swift @@ -96,6 +96,7 @@ class SearchBarNode: ASDisplayNode, UITextFieldDelegate { self.cancelButton = ASButtonNode() self.cancelButton.hitTestSlop = UIEdgeInsets(top: -8.0, left: -8.0, bottom: -8.0, right: -8.0) self.cancelButton.setAttributedTitle(NSAttributedString(string: "Cancel", font: Font.regular(17.0), textColor: UIColor(0x1195f2)), for: []) + self.cancelButton.displaysAsynchronously = false super.init() diff --git a/TelegramCore/SendUnsentMessage.swift b/TelegramCore/SendUnsentMessage.swift index 567f398bd6..7aa38b052f 100644 --- a/TelegramCore/SendUnsentMessage.swift +++ b/TelegramCore/SendUnsentMessage.swift @@ -2,15 +2,15 @@ import Foundation import SwiftSignalKit import Postbox -func sendUnsentMessage(account: Account, message: Message) -> Signal { - return account.postbox.peerWithId(message.id.peerId) +func sendUnsentMessage(network: Network, postbox: Postbox, stateManager: StateManager, message: Message) -> Signal { + return postbox.peerWithId(message.id.peerId) |> take(1) //|> delay(2.0, queue: Queue.concurrentDefaultQueue()) |> mapToSignal { peer -> Signal in if let inputPeer = apiInputPeer(peer) { var randomId: Int64 = 0 arc4random_buf(&randomId, 8) - return account.network.request(Api.functions.messages.sendMessage(flags: 0, peer: inputPeer, replyToMsgId: 0, message: message.text, randomId: randomId, replyMarkup: nil, entities: nil)) + return network.request(Api.functions.messages.sendMessage(flags: 0, peer: inputPeer, replyToMsgId: 0, message: message.text, randomId: randomId, replyMarkup: nil, entities: nil)) |> mapError { _ -> NoError in return NoError() } @@ -18,7 +18,7 @@ func sendUnsentMessage(account: Account, message: Message) -> Signal Void in + let modify = postbox.modify { modifier -> Void in modifier.updateMessage(MessageIndex(message), update: { currentMessage in let updatedId: MessageId if let messageId = messageId { @@ -61,13 +61,13 @@ func sendUnsentMessage(account: Account, message: Message) -> Signal afterDisposed { - account.stateManager.addUpdates(result) + stateManager.addUpdates(result) } return modify } |> `catch` { _ -> Signal in - let modify = account.postbox.modify { modifier -> Void in + let modify = postbox.modify { modifier -> Void in modifier.updateMessage(MessageIndex(message), update: { currentMessage in var storeForwardInfo: StoreMessageForwardInfo? if let forwardInfo = currentMessage.forwardInfo { diff --git a/TelegramCore/SettingsController.swift b/TelegramCore/SettingsController.swift index 2298f6caff..2ab49d78a2 100644 --- a/TelegramCore/SettingsController.swift +++ b/TelegramCore/SettingsController.swift @@ -3,22 +3,22 @@ import Display import Postbox import SwiftSignalKit -class SettingsController: ListController { +public class SettingsController: ListController { private let account: Account private let peer = Promise() private let connectionStatus = Promise(.Online) private let peerAndConnectionStatusDisposable = MetaDisposable() - init(account: Account) { + public init(account: Account) { self.account = account super.init() self.title = "Settings" self.tabBarItem.title = "Settings" - self.tabBarItem.image = UIImage(named: "Chat List/Tabs/IconSettings")?.precomposed() - self.tabBarItem.selectedImage = UIImage(named: "Chat List/Tabs/IconSettingsSelected")?.precomposed() + self.tabBarItem.image = UIImage(bundleImageName: "Chat List/Tabs/IconSettings")?.precomposed() + self.tabBarItem.selectedImage = UIImage(bundleImageName: "Chat List/Tabs/IconSettingsSelected")?.precomposed() let deselectAction = { [weak self] () -> Void in self?.listDisplayNode.listView.clearHighlightAnimated(true) @@ -58,7 +58,7 @@ class SettingsController: ListController { connectionStatus.set(account.network.connectionStatus) } - required init(coder aDecoder: NSCoder) { + required public init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } diff --git a/TelegramCore/StateManagement.swift b/TelegramCore/StateManagement.swift index 8aa9d40e76..7150ed9d9a 100644 --- a/TelegramCore/StateManagement.swift +++ b/TelegramCore/StateManagement.swift @@ -1055,7 +1055,7 @@ private func pollDifference(_ account: Account) -> Signal { return signal } -class StateManager { +public class StateManager { private let stateQueue = Queue() private let account: Account @@ -1079,7 +1079,7 @@ class StateManager { timer?.invalidate() } - func reset() { + public func reset() { if self.updateService == nil { self.updateService = UpdateMessageService(peerId: self.account.peerId) updatesDisposable.set(self.updateService!.pipe.signal().start(next: { [weak self] groups in diff --git a/TelegramCore/StickerResources.swift b/TelegramCore/StickerResources.swift index dafd094c0e..e1e57cf7bc 100644 --- a/TelegramCore/StickerResources.swift +++ b/TelegramCore/StickerResources.swift @@ -2,7 +2,7 @@ import Foundation import Postbox import SwiftSignalKit import Display -import TelegramCorePrivate +import TelegramCorePrivateModule private func chatMessageStickerDatas(account: Account, file: TelegramMediaFile) -> Signal<(Data?, Data?, Int), NoError> { let fullSizeResource = fileResource(file) diff --git a/TelegramCore/SynchronizePeerReadState.swift b/TelegramCore/SynchronizePeerReadState.swift index 7e59f90a16..2bfb918ad9 100644 --- a/TelegramCore/SynchronizePeerReadState.swift +++ b/TelegramCore/SynchronizePeerReadState.swift @@ -12,8 +12,8 @@ private enum PeerReadStateMarker: Equatable { case Channel(Int32) } -private func inputPeer(account: Account, peerId: PeerId) -> Signal { - return account.postbox.peerWithId(peerId) +private func inputPeer(postbox: Postbox, peerId: PeerId) -> Signal { + return postbox.peerWithId(peerId) |> mapToSignalPromotingError { peer -> Signal in if let inputPeer = apiInputPeer(peer) { return .single(inputPeer) @@ -23,10 +23,10 @@ private func inputPeer(account: Account, peerId: PeerId) -> Signal take(1) } -private func dialogTopMessage(account: Account, peerId: PeerId) -> Signal<(Int32, Int32), VerifyReadStateError> { - return inputPeer(account: account, peerId: peerId) +private func dialogTopMessage(network: Network, postbox: Postbox, peerId: PeerId) -> Signal<(Int32, Int32), VerifyReadStateError> { + return inputPeer(postbox: postbox, peerId: peerId) |> mapToSignal { inputPeer -> Signal<(Int32, Int32), VerifyReadStateError> in - return account.network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: Int32.max, offsetDate: Int32.max, addOffset: 0, limit: 1, maxId: Int32.max, minId: 1)) + return network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: Int32.max, offsetDate: Int32.max, addOffset: 0, limit: 1, maxId: Int32.max, minId: 1)) |> retryRequest |> mapToSignalPromotingError { result -> Signal<(Int32, Int32), VerifyReadStateError> in let apiMessages: [Api.Message] @@ -47,12 +47,12 @@ private func dialogTopMessage(account: Account, peerId: PeerId) -> Signal<(Int32 } } -private func dialogReadState(account: Account, peerId: PeerId) -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> { - return dialogTopMessage(account: account, peerId: peerId) +private func dialogReadState(network: Network, postbox: Postbox, peerId: PeerId) -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> { + return dialogTopMessage(network: network, postbox: postbox, peerId: peerId) |> mapToSignal { topMessage -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> in - return inputPeer(account: account, peerId: peerId) + return inputPeer(postbox: postbox, peerId: peerId) |> mapToSignal { inputPeer -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> in - return account.network.request(Api.functions.messages.getPeerDialogs(peers: [inputPeer])) + return network.request(Api.functions.messages.getPeerDialogs(peers: [inputPeer])) |> retryRequest |> mapToSignalPromotingError { result -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> in switch result { @@ -132,8 +132,8 @@ private func localReadStateMarker(modifier: Modifier, peerId: PeerId) -> PeerRea } } -private func localReadStateMarker(account: Account, peerId: PeerId) -> Signal { - return account.postbox.modify { modifier -> PeerReadStateMarker? in +private func localReadStateMarker(network: Network, postbox: Postbox, peerId: PeerId) -> Signal { + return postbox.modify { modifier -> PeerReadStateMarker? in return localReadStateMarker(modifier: modifier, peerId: peerId) } |> mapToSignalPromotingError { marker -> Signal in if let marker = marker { @@ -144,15 +144,15 @@ private func localReadStateMarker(account: Account, peerId: PeerId) -> Signal Signal { - let readStateWithInitialState = localReadStateMarker(account: account, peerId: peerId) +private func validatePeerReadState(network: Network, postbox: Postbox, stateManager: StateManager, peerId: PeerId) -> Signal { + let readStateWithInitialState = localReadStateMarker(network: network, postbox: postbox, peerId: peerId) |> mapToSignal { marker -> Signal<(PeerReadState, PeerReadStateMarker, PeerReadStateMarker), VerifyReadStateError> in - return dialogReadState(account: account, peerId: peerId) + return dialogReadState(network: network, postbox: postbox, peerId: peerId) |> map { ($0.0, marker, $0.1) } } let maybeAppliedReadState = readStateWithInitialState |> mapToSignal { (readState, initialMarker, finalMarker) -> Signal in - return account.stateManager.injectedStateModification(account.postbox.modify { modifier -> VerifyReadStateError? in + return stateManager.injectedStateModification(postbox.modify { modifier -> VerifyReadStateError? in if initialMarker == finalMarker { modifier.resetIncomingReadStates([peerId: [Namespaces.Message.Cloud: readState]]) return nil @@ -181,18 +181,18 @@ private func validatePeerReadState(account: Account, peerId: PeerId) -> Signal retry(0.1, maxDelay: 5.0, onQueue: Queue.concurrentDefaultQueue()) } -private func pushPeerReadState(account: Account, peerId: PeerId, readState: PeerReadState) -> Signal { - return inputPeer(account: account, peerId: peerId) +private func pushPeerReadState(network: Network, postbox: Postbox, peerId: PeerId, readState: PeerReadState) -> Signal { + return inputPeer(postbox: postbox, peerId: peerId) |> mapToSignal { inputPeer -> Signal in switch inputPeer { case let .inputPeerChannel(channelId, accessHash): - return account.network.request(Api.functions.channels.readHistory(channel: Api.InputChannel.inputChannel(channelId: channelId, accessHash: accessHash), maxId: readState.maxIncomingReadId)) + return network.request(Api.functions.channels.readHistory(channel: Api.InputChannel.inputChannel(channelId: channelId, accessHash: accessHash), maxId: readState.maxIncomingReadId)) |> retryRequest |> mapToSignalPromotingError { _ -> Signal in return .single(readState) } default: - return account.network.request(Api.functions.messages.readHistory(peer: inputPeer, maxId: readState.maxIncomingReadId)) + return network.request(Api.functions.messages.readHistory(peer: inputPeer, maxId: readState.maxIncomingReadId)) |> retryRequest |> mapToSignalPromotingError { _ -> Signal in return .single(readState) @@ -201,8 +201,8 @@ private func pushPeerReadState(account: Account, peerId: PeerId, readState: Peer } } -private func pushPeerReadState(account: Account, peerId: PeerId) -> Signal { - let currentReadState = account.postbox.modify { modifier -> PeerReadState? in +private func pushPeerReadState(network: Network, postbox: Postbox, stateManager: StateManager, peerId: PeerId) -> Signal { + let currentReadState = postbox.modify { modifier -> PeerReadState? in if let readStates = modifier.getPeerReadStates(peerId) { for (namespace, readState) in readStates { if namespace == Namespaces.Message.Cloud { @@ -216,7 +216,7 @@ private func pushPeerReadState(account: Account, peerId: PeerId) -> Signal mapToSignalPromotingError { readState -> Signal in if let readState = readState { - return pushPeerReadState(account: account, peerId: peerId, readState: readState) + return pushPeerReadState(network: network, postbox: postbox, peerId: peerId, readState: readState) } else { return .complete() } @@ -224,7 +224,7 @@ private func pushPeerReadState(account: Account, peerId: PeerId) -> Signal mapToSignal { readState -> Signal in - return account.stateManager.injectedStateModification(account.postbox.modify { modifier -> VerifyReadStateError? in + return stateManager.injectedStateModification(postbox.modify { modifier -> VerifyReadStateError? in if let readStates = modifier.getPeerReadStates(peerId) { for (namespace, currentReadState) in readStates where namespace == Namespaces.Message.Cloud { if currentReadState == readState { @@ -259,13 +259,13 @@ private func pushPeerReadState(account: Account, peerId: PeerId) -> Signal retry(0.1, maxDelay: 5.0, onQueue: Queue.concurrentDefaultQueue()) } -func synchronizePeerReadState(account: Account, peerId: PeerId, push: Bool, validate: Bool) -> Signal { +func synchronizePeerReadState(network: Network, postbox: Postbox, stateManager: StateManager, peerId: PeerId, push: Bool, validate: Bool) -> Signal { var signal: Signal = .complete() if push { - signal = signal |> then(pushPeerReadState(account: account, peerId: peerId)) + signal = signal |> then(pushPeerReadState(network: network, postbox: postbox, stateManager: stateManager, peerId: peerId)) } if validate { - signal = signal |> then(validatePeerReadState(account: account, peerId: peerId)) + signal = signal |> then(validatePeerReadState(network: network, postbox: postbox, stateManager: stateManager, peerId: peerId)) } return signal } diff --git a/TelegramCore/TelegramCorePrivateModule/module.modulemap b/TelegramCore/TelegramCorePrivate/module.modulemap similarity index 94% rename from TelegramCore/TelegramCorePrivateModule/module.modulemap rename to TelegramCore/TelegramCorePrivate/module.modulemap index cb95a188b5..ff27998f0e 100644 --- a/TelegramCore/TelegramCorePrivateModule/module.modulemap +++ b/TelegramCore/TelegramCorePrivate/module.modulemap @@ -1,4 +1,4 @@ -module TelegramCorePrivate { +module TelegramCorePrivateModule { header "../../third-party/FFmpeg-iOS/include/libavcodec/avcodec.h" header "../../third-party/FFmpeg-iOS/include/libavformat/avformat.h" header "../../third-party/FFmpeg-iOS/include/libavformat/avio.h" @@ -14,5 +14,4 @@ module TelegramCorePrivate { header "../TryCatchCpp.h" header "../RingBuffer.h" header "../TelegramCoreIncludes.h" - export * } diff --git a/TelegramCore/module.private.modulemap b/TelegramCore/module.private.modulemap index 29704233ca..07b9c717a1 100644 --- a/TelegramCore/module.private.modulemap +++ b/TelegramCore/module.private.modulemap @@ -1,3 +1,3 @@ -module TelegramCorePrivateModule { +module TelegramCorePrivate { export * } diff --git a/third-party/FFmpeg-iOS/include/libavcodec/avcodec.h b/third-party/FFmpeg-iOS/include/libavcodec/avcodec.h index 39713ed76b..6385220252 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/avcodec.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/avcodec.h @@ -28,17 +28,17 @@ */ #include -#include "libavutil/samplefmt.h" -#include "libavutil/attributes.h" -#include "libavutil/avutil.h" -#include "libavutil/buffer.h" -#include "libavutil/cpu.h" -#include "libavutil/channel_layout.h" -#include "libavutil/dict.h" -#include "libavutil/frame.h" -#include "libavutil/log.h" -#include "libavutil/pixfmt.h" -#include "libavutil/rational.h" +#include "../libavutil/samplefmt.h" +#include "../libavutil/attributes.h" +#include "../libavutil/avutil.h" +#include "../libavutil/buffer.h" +#include "../libavutil/cpu.h" +#include "../libavutil/channel_layout.h" +#include "../libavutil/dict.h" +#include "../libavutil/frame.h" +#include "../libavutil/log.h" +#include "../libavutil/pixfmt.h" +#include "../libavutil/rational.h" #include "version.h" diff --git a/third-party/FFmpeg-iOS/include/libavcodec/avdct.h b/third-party/FFmpeg-iOS/include/libavcodec/avdct.h index 272422e44c..59408f8e71 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/avdct.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/avdct.h @@ -19,7 +19,7 @@ #ifndef AVCODEC_AVDCT_H #define AVCODEC_AVDCT_H -#include "libavutil/opt.h" +#include "../libavutilopt.h" /** * AVDCT context. diff --git a/third-party/FFmpeg-iOS/include/libavcodec/dv_profile.h b/third-party/FFmpeg-iOS/include/libavcodec/dv_profile.h index 9380a66f07..121cccfb03 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/dv_profile.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/dv_profile.h @@ -21,8 +21,8 @@ #include -#include "libavutil/pixfmt.h" -#include "libavutil/rational.h" +#include "../libavutilpixfmt.h" +#include "../libavutilrational.h" #include "avcodec.h" /* minimum number of bytes to read from a DV stream in order to diff --git a/third-party/FFmpeg-iOS/include/libavcodec/qsv.h b/third-party/FFmpeg-iOS/include/libavcodec/qsv.h index b77158ec26..1fe9a54bed 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/qsv.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/qsv.h @@ -23,7 +23,7 @@ #include -#include "libavutil/buffer.h" +#include "../libavutilbuffer.h" /** * This struct is used for communicating QSV parameters between libavcodec and diff --git a/third-party/FFmpeg-iOS/include/libavcodec/vaapi.h b/third-party/FFmpeg-iOS/include/libavcodec/vaapi.h index 7a29f6f881..1a64817b51 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/vaapi.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/vaapi.h @@ -31,7 +31,7 @@ */ #include -#include "libavutil/attributes.h" +#include "../libavutilattributes.h" #include "version.h" /** diff --git a/third-party/FFmpeg-iOS/include/libavcodec/vda.h b/third-party/FFmpeg-iOS/include/libavcodec/vda.h index bde14e31d7..cb840b0021 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/vda.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/vda.h @@ -29,7 +29,7 @@ * Public libavcodec VDA header. */ -#include "libavcodec/avcodec.h" +#include "../libavcodecavcodec.h" #include @@ -41,7 +41,7 @@ #include #undef Picture -#include "libavcodec/version.h" +#include "../libavcodecversion.h" // extra flags not defined in VDADecoder.h enum { diff --git a/third-party/FFmpeg-iOS/include/libavcodec/vdpau.h b/third-party/FFmpeg-iOS/include/libavcodec/vdpau.h index e85e4d9e9a..5f3dbdc328 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/vdpau.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/vdpau.h @@ -51,8 +51,8 @@ #include #include -#include "libavutil/avconfig.h" -#include "libavutil/attributes.h" +#include "../libavutilavconfig.h" +#include "../libavutilattributes.h" #include "avcodec.h" #include "version.h" diff --git a/third-party/FFmpeg-iOS/include/libavcodec/version.h b/third-party/FFmpeg-iOS/include/libavcodec/version.h index 4f6423b15e..d57d3cb6ed 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/version.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/version.h @@ -25,7 +25,7 @@ * Libavcodec version macros. */ -#include "libavutil/version.h" +#include "../libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 57 #define LIBAVCODEC_VERSION_MINOR 48 diff --git a/third-party/FFmpeg-iOS/include/libavcodec/videotoolbox.h b/third-party/FFmpeg-iOS/include/libavcodec/videotoolbox.h index a48638e2b2..f3ffa8754d 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/videotoolbox.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/videotoolbox.h @@ -35,7 +35,7 @@ #include #undef Picture -#include "libavcodec/avcodec.h" +#include "../libavcodecavcodec.h" /** * This struct holds all the information that needs to be passed diff --git a/third-party/FFmpeg-iOS/include/libavcodec/xvmc.h b/third-party/FFmpeg-iOS/include/libavcodec/xvmc.h index 465ee78d6e..5c0f7e5432 100644 --- a/third-party/FFmpeg-iOS/include/libavcodec/xvmc.h +++ b/third-party/FFmpeg-iOS/include/libavcodec/xvmc.h @@ -29,7 +29,7 @@ #include -#include "libavutil/attributes.h" +#include "../libavutilattributes.h" #include "version.h" #include "avcodec.h" diff --git a/third-party/FFmpeg-iOS/include/libavformat/avformat.h b/third-party/FFmpeg-iOS/include/libavformat/avformat.h index 818184e5a8..e21ba8858a 100644 --- a/third-party/FFmpeg-iOS/include/libavformat/avformat.h +++ b/third-party/FFmpeg-iOS/include/libavformat/avformat.h @@ -314,12 +314,12 @@ #include #include /* FILE */ -#include "libavcodec/avcodec.h" -#include "libavutil/dict.h" -#include "libavutil/log.h" +#include "../libavcodec/avcodec.h" +#include "../libavutil/dict.h" +#include "../libavutil/log.h" #include "avio.h" -#include "libavformat/version.h" +#include "../libavformat/version.h" struct AVFormatContext; diff --git a/third-party/FFmpeg-iOS/include/libavformat/avio.h b/third-party/FFmpeg-iOS/include/libavformat/avio.h index b1ce1d1c72..889e0a9abc 100644 --- a/third-party/FFmpeg-iOS/include/libavformat/avio.h +++ b/third-party/FFmpeg-iOS/include/libavformat/avio.h @@ -28,11 +28,11 @@ #include -#include "libavutil/common.h" -#include "libavutil/dict.h" -#include "libavutil/log.h" +#include "../libavutil/common.h" +#include "../libavutil/dict.h" +#include "../libavutil/log.h" -#include "libavformat/version.h" +#include "../libavformat/version.h" #define AVIO_SEEKABLE_NORMAL 0x0001 /**< Seeking works like for a local file */ diff --git a/third-party/FFmpeg-iOS/include/libavformat/version.h b/third-party/FFmpeg-iOS/include/libavformat/version.h index 47a8afbb26..645ce04720 100644 --- a/third-party/FFmpeg-iOS/include/libavformat/version.h +++ b/third-party/FFmpeg-iOS/include/libavformat/version.h @@ -27,7 +27,7 @@ * Libavformat version macros */ -#include "libavutil/version.h" +#include "../libavutil/version.h" // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you belive might be affected here diff --git a/third-party/FFmpeg-iOS/include/libavutil/bswap.h b/third-party/FFmpeg-iOS/include/libavutil/bswap.h index 91cb79538d..a21a03483f 100644 --- a/third-party/FFmpeg-iOS/include/libavutil/bswap.h +++ b/third-party/FFmpeg-iOS/include/libavutil/bswap.h @@ -27,7 +27,7 @@ #define AVUTIL_BSWAP_H #include -#include "libavutil/avconfig.h" +#include "../libavutilavconfig.h" #include "attributes.h" #ifdef HAVE_AV_CONFIG_H diff --git a/third-party/FFmpeg-iOS/include/libavutil/common.h b/third-party/FFmpeg-iOS/include/libavutil/common.h index 8142b31fdb..c9b3f21a44 100644 --- a/third-party/FFmpeg-iOS/include/libavutil/common.h +++ b/third-party/FFmpeg-iOS/include/libavutil/common.h @@ -42,7 +42,7 @@ #include "attributes.h" #include "macros.h" #include "version.h" -#include "libavutil/avconfig.h" +#include "../libavutil/avconfig.h" #if AV_HAVE_BIGENDIAN # define AV_NE(be, le) (be) diff --git a/third-party/FFmpeg-iOS/include/libavutil/intreadwrite.h b/third-party/FFmpeg-iOS/include/libavutil/intreadwrite.h index 51fbe30a23..07f717692a 100644 --- a/third-party/FFmpeg-iOS/include/libavutil/intreadwrite.h +++ b/third-party/FFmpeg-iOS/include/libavutil/intreadwrite.h @@ -20,7 +20,7 @@ #define AVUTIL_INTREADWRITE_H #include -#include "libavutil/avconfig.h" +#include "../libavutilavconfig.h" #include "attributes.h" #include "bswap.h" diff --git a/third-party/FFmpeg-iOS/include/libavutil/pixfmt.h b/third-party/FFmpeg-iOS/include/libavutil/pixfmt.h index 0ed01c4844..afe56c2e30 100644 --- a/third-party/FFmpeg-iOS/include/libavutil/pixfmt.h +++ b/third-party/FFmpeg-iOS/include/libavutil/pixfmt.h @@ -26,7 +26,7 @@ * pixel format definitions */ -#include "libavutil/avconfig.h" +#include "../libavutil/avconfig.h" #include "version.h" #define AVPALETTE_SIZE 1024 diff --git a/third-party/FFmpeg-iOS/include/libswresample/swresample.h b/third-party/FFmpeg-iOS/include/libswresample/swresample.h index 10eaebc439..f461edc544 100644 --- a/third-party/FFmpeg-iOS/include/libswresample/swresample.h +++ b/third-party/FFmpeg-iOS/include/libswresample/swresample.h @@ -121,10 +121,10 @@ */ #include -#include "libavutil/frame.h" -#include "libavutil/samplefmt.h" +#include "../libavutil/frame.h" +#include "../libavutil/samplefmt.h" -#include "libswresample/version.h" +#include "../libswresample/version.h" #if LIBSWRESAMPLE_VERSION_MAJOR < 1 #define SWR_CH_MAX 32 ///< Maximum number of channels diff --git a/third-party/FFmpeg-iOS/include/libswresample/version.h b/third-party/FFmpeg-iOS/include/libswresample/version.h index b8e32c0e41..703d76f19d 100644 --- a/third-party/FFmpeg-iOS/include/libswresample/version.h +++ b/third-party/FFmpeg-iOS/include/libswresample/version.h @@ -26,7 +26,7 @@ * Libswresample version macros */ -#include "libavutil/avutil.h" +#include "../libavutil/avutil.h" #define LIBSWRESAMPLE_VERSION_MAJOR 2 #define LIBSWRESAMPLE_VERSION_MINOR 1