diff --git a/NotificationContent/Base.lproj/MainInterface.storyboard b/NotificationContent/Base.lproj/MainInterface.storyboard deleted file mode 100644 index 97c475ba24..0000000000 --- a/NotificationContent/Base.lproj/MainInterface.storyboard +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NotificationContent/Info.plist b/NotificationContent/Info.plist index e283275a05..a05d4cd9db 100644 --- a/NotificationContent/Info.plist +++ b/NotificationContent/Info.plist @@ -32,10 +32,10 @@ UNNotificationExtensionInitialContentSizeRatio 0.0001 - NSExtensionMainStoryboard - MainInterface NSExtensionPointIdentifier com.apple.usernotifications.content-extension + NSExtensionPrincipalClass + NotificationViewController diff --git a/NotificationContent/NotificationViewController.swift b/NotificationContent/NotificationViewController.swift index 96174f8b6b..f064ce3f0a 100644 --- a/NotificationContent/NotificationViewController.swift +++ b/NotificationContent/NotificationViewController.swift @@ -42,6 +42,7 @@ private func parseFileLocationResource(_ dict: [AnyHashable: Any]) -> TelegramMe return CloudFileMediaResource(datacenterId: Int(datacenterId), volumeId: volumeId, localId: localId, secret: secret, size: nil, fileReference: fileReference) } +@objc(NotificationViewController) class NotificationViewController: UIViewController, UNNotificationContentExtension { private let imageNode = TransformImageNode() private var imageInfo: (isSticker: Bool, dimensions: CGSize)? diff --git a/Telegram-iOS.xcodeproj/project.pbxproj b/Telegram-iOS.xcodeproj/project.pbxproj index 339fc81105..4711a26e59 100644 --- a/Telegram-iOS.xcodeproj/project.pbxproj +++ b/Telegram-iOS.xcodeproj/project.pbxproj @@ -230,7 +230,6 @@ D02CF5FD215D9ABF00E0F56A /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AA1A671D568BA400152314 /* UserNotifications.framework */; }; D02CF5FE215D9ABF00E0F56A /* UserNotificationsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AA1A691D568BA400152314 /* UserNotificationsUI.framework */; }; D02CF601215D9ABF00E0F56A /* NotificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D02CF600215D9ABF00E0F56A /* NotificationViewController.swift */; }; - D02CF604215D9ABF00E0F56A /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D02CF602215D9ABF00E0F56A /* MainInterface.storyboard */; }; D02CF608215D9ABF00E0F56A /* NotificationContent.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D02CF5FC215D9ABE00E0F56A /* NotificationContent.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; D02CF615215DA24900E0F56A /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D02CF614215DA24900E0F56A /* Display.framework */; }; D02CF617215DA24900E0F56A /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D02CF616215DA24900E0F56A /* Postbox.framework */; }; @@ -342,7 +341,6 @@ D08DB0BE213F4D1D00F2ADBF /* start_arrow_ipad@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D050F2331E49DEDE00988324 /* start_arrow_ipad@2x.png */; }; D08DB0BF213F4D1D00F2ADBF /* telegram_plane1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D050F2341E49DEDE00988324 /* telegram_plane1@2x.png */; }; D08DB0C0213F4D1D00F2ADBF /* telegram_sphere@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D050F2351E49DEDE00988324 /* telegram_sphere@2x.png */; }; - D08F7858213F3E5600225975 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D0E41A3D1D65A69C00FBFC00 /* MainInterface.storyboard */; }; D09250021FE52D2A003F693F /* BuildConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = D09250011FE52D2A003F693F /* BuildConfig.m */; }; D096C2BE1CC3C021006D814E /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D096C2BD1CC3C021006D814E /* Display.framework */; }; D096C2BF1CC3C021006D814E /* Display.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D096C2BD1CC3C021006D814E /* Display.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -934,7 +932,6 @@ D021D4DD219CB1280064BEBA /* Widget-Fork.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = "Widget-Fork.entitlements"; sourceTree = ""; }; D02CF5FC215D9ABE00E0F56A /* NotificationContent.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationContent.appex; sourceTree = BUILT_PRODUCTS_DIR; }; D02CF600215D9ABF00E0F56A /* NotificationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationViewController.swift; sourceTree = ""; }; - D02CF603215D9ABF00E0F56A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; D02CF605215D9ABF00E0F56A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D02CF611215DA1C900E0F56A /* NotificationContent-HockeyApp.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = "NotificationContent-HockeyApp.entitlements"; sourceTree = ""; }; D02CF612215DA1C900E0F56A /* NotificationContent-AppStore.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = "NotificationContent-AppStore.entitlements"; sourceTree = ""; }; @@ -1165,7 +1162,6 @@ D0E3A7071B285B5000A402D9 /* Telegram-iOS-Hockeyapp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Telegram-iOS-Hockeyapp.entitlements"; sourceTree = ""; }; D0E41A381D65A69C00FBFC00 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; D0E41A3B1D65A69C00FBFC00 /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = ""; }; - D0E41A3E1D65A69C00FBFC00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; D0E41A401D65A69C00FBFC00 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D0E8B8A82044496B00605593 /* voip_connecting.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = voip_connecting.mp3; path = "Telegram-iOS/Resources/voip_connecting.mp3"; sourceTree = ""; }; D0E8B8A92044496C00605593 /* voip_end.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = voip_end.caf; path = "Telegram-iOS/Resources/voip_end.caf"; sourceTree = ""; }; @@ -2120,7 +2116,6 @@ D02CF611215DA1C900E0F56A /* NotificationContent-HockeyApp.entitlements */, D021D4DC219CB1160064BEBA /* NotificationContent-Fork.entitlements */, D02CF600215D9ABF00E0F56A /* NotificationViewController.swift */, - D02CF602215D9ABF00E0F56A /* MainInterface.storyboard */, D02CF61D215E522400E0F56A /* NotificationContent-Bridging-Header.h */, D02CF605215D9ABF00E0F56A /* Info.plist */, ); @@ -2499,7 +2494,6 @@ D0B2F75B204F51E500D3BFB9 /* Widget-HockeyApp.entitlements */, D021D4DD219CB1280064BEBA /* Widget-Fork.entitlements */, D0E41A3B1D65A69C00FBFC00 /* TodayViewController.swift */, - D0E41A3D1D65A69C00FBFC00 /* MainInterface.storyboard */, D0E41A401D65A69C00FBFC00 /* Info.plist */, D0B2F759204F4EF400D3BFB9 /* Widget-Bridging-Header.h */, D0B2F75F2050102600D3BFB9 /* PeerNode.swift */, @@ -2967,7 +2961,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D02CF604215D9ABF00E0F56A /* MainInterface.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2983,7 +2976,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D08F7858213F3E5600225975 /* MainInterface.storyboard in Resources */, D04FA1CE2145E3810006EF45 /* InfoPlist.strings in Resources */, D04FA1CD2145E3810006EF45 /* InfoPlist.strings in Resources */, D04FA1CC2145E3810006EF45 /* InfoPlist.strings in Resources */, @@ -3422,14 +3414,6 @@ name = InfoPlist.strings; sourceTree = ""; }; - D02CF602215D9ABF00E0F56A /* MainInterface.storyboard */ = { - isa = PBXVariantGroup; - children = ( - D02CF603215D9ABF00E0F56A /* Base */, - ); - name = MainInterface.storyboard; - sourceTree = ""; - }; D04FA1AF2145E37F0006EF45 /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( @@ -3710,14 +3694,6 @@ name = MainInterface.storyboard; sourceTree = ""; }; - D0E41A3D1D65A69C00FBFC00 /* MainInterface.storyboard */ = { - isa = PBXVariantGroup; - children = ( - D0E41A3E1D65A69C00FBFC00 /* Base */, - ); - name = MainInterface.storyboard; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ diff --git a/Widget/Base.lproj/MainInterface.storyboard b/Widget/Base.lproj/MainInterface.storyboard deleted file mode 100644 index adfc32d812..0000000000 --- a/Widget/Base.lproj/MainInterface.storyboard +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Widget/Info.plist b/Widget/Info.plist index eaabe0b540..6cfad5b471 100644 --- a/Widget/Info.plist +++ b/Widget/Info.plist @@ -22,10 +22,10 @@ ${BUILD_NUMBER} NSExtension - NSExtensionMainStoryboard - MainInterface NSExtensionPointIdentifier com.apple.widget-extension + NSExtensionPrincipalClass + TodayViewController diff --git a/Widget/TodayViewController.swift b/Widget/TodayViewController.swift index f80bf97b5c..f8c91c295f 100644 --- a/Widget/TodayViewController.swift +++ b/Widget/TodayViewController.swift @@ -23,6 +23,7 @@ private let auxiliaryMethods = AccountAuxiliaryMethods(updatePeerChatInputState: return nil }) +@objc(TodayViewController) class TodayViewController: UIViewController, NCWidgetProviding { private var initializedInterface = false diff --git a/submodules/TelegramCore b/submodules/TelegramCore index 0a3914aeff..2df4d568b0 160000 --- a/submodules/TelegramCore +++ b/submodules/TelegramCore @@ -1 +1 @@ -Subproject commit 0a3914aeff527eb5ee3c009091f0081274b84419 +Subproject commit 2df4d568b0bcc6f7abb64b994204207fb8d9528d diff --git a/submodules/TelegramUI b/submodules/TelegramUI index 42d6ad46d4..bcbbe88854 160000 --- a/submodules/TelegramUI +++ b/submodules/TelegramUI @@ -1 +1 @@ -Subproject commit 42d6ad46d455105fd6c123ab18d1adb4f04a343e +Subproject commit bcbbe888540a0099d4e69d040eed0f9fae62f844