Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

higher audio bitrate when sending videos / stories #61

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
1cfbc5b
Version 10.13
Kylmakalle Jul 2, 2024
e10d05b
Fixes
Kylmakalle Jul 2, 2024
840b946
fix localeWithStrings globally (#30)
levochkaa Jul 3, 2024
1043161
Fix badge on zoomed devices. closes #9
Kylmakalle Jul 3, 2024
5ba651b
Hide channel bottom panel closes #27
Kylmakalle Jul 3, 2024
d4e7e09
Another attempt to fix badge on some Zoomed devices
Kylmakalle Jul 3, 2024
bf0dcee
Force System Share sheet tg://sg/debug
Kylmakalle Jul 3, 2024
c51d7db
fixes for device badge
Kylmakalle Jul 4, 2024
615a144
New Crowdin updates (#34)
Kylmakalle Jul 5, 2024
e6320ec
Fix input panel hidden on selection (#31)
levochkaa Jul 7, 2024
41bc095
Revert "Fix input panel hidden on selection (#31)"
Kylmakalle Jul 7, 2024
5d653d0
Fix input panel for channels Closes #37
Kylmakalle Jul 21, 2024
a6c31d3
Quickly share links with system's share menu
Kylmakalle Jul 21, 2024
fad048c
force tabbar when editing
levochkaa Jul 4, 2024
1384a0d
increase height for correct animation
levochkaa Jul 4, 2024
74eadfc
New translations sglocalizable.strings (Ukrainian) (#38)
Kylmakalle Jul 21, 2024
1123f6a
Hide Post Story button
Kylmakalle Jul 21, 2024
5f5fbe7
Fix 10.15.1
Kylmakalle Aug 6, 2024
f5c570d
Fix archive option for long-tap
Kylmakalle Aug 12, 2024
0f826d5
Enable in-app Safari
Kylmakalle Aug 12, 2024
5670e4c
Disable some unsupported purchases
Kylmakalle Aug 12, 2024
a8309df
disableDeleteChatSwipeOption + refactor restart alert
Kylmakalle Aug 12, 2024
c5c10af
Hide bot in suggestions list
Kylmakalle Aug 12, 2024
e2f5f84
Fix merge v11.0
Kylmakalle Aug 14, 2024
b26dbcb
Fix exceptions for safari webview controller
Kylmakalle Aug 14, 2024
27e46a7
New Crowdin updates (#47)
Kylmakalle Aug 24, 2024
7645ad0
New Crowdin updates (#49)
Kylmakalle Sep 2, 2024
5c50208
New translations sglocalizable.strings (Russian) (#51)
Kylmakalle Sep 18, 2024
6a02498
Call confirmation
Kylmakalle Sep 23, 2024
75bac29
WIP Settings search
Kylmakalle Sep 23, 2024
7fe6978
Settings Search
Kylmakalle Sep 23, 2024
23740cb
Localize placeholder
Kylmakalle Sep 23, 2024
5a1928d
Update AccountUtils.swift
Kylmakalle Sep 24, 2024
aad02d4
mark mutual contact
Kylmakalle Sep 24, 2024
79c1dbb
Align back context action to left
Kylmakalle Sep 24, 2024
c56c75c
New Crowdin updates (#54)
Kylmakalle Sep 25, 2024
0e952b1
Independent Playground app for simulator
Kylmakalle Sep 25, 2024
c723034
New translations sglocalizable.strings (Ukrainian) (#55)
Kylmakalle Sep 26, 2024
f15a59a
Playground UIKit base and controllers
Kylmakalle Sep 26, 2024
6a8575b
Inject SwiftUI view with overflow to AsyncDisplayKit
Kylmakalle Sep 26, 2024
7baf5f0
Launch Playgound project on simulator
Kylmakalle Sep 27, 2024
7e367d9
Create .swiftformat
Kylmakalle Sep 27, 2024
c30b234
Move Playground to example
Kylmakalle Sep 27, 2024
819dede
Update .swiftformat
Kylmakalle Sep 27, 2024
9ab7221
Init SwiftUIViewController
Kylmakalle Sep 27, 2024
eb95bba
wip
Kylmakalle Sep 27, 2024
36e3a5d
New translations sglocalizable.strings (Chinese Traditional) (#57)
Kylmakalle Sep 28, 2024
ea02af3
WIP: revert version
Kylmakalle Oct 4, 2024
01144ee
Updated submodules to match upstream
Kylmakalle Oct 4, 2024
aaba2a0
Xcode 16 fixes
Kylmakalle Oct 4, 2024
616d1f6
Fix
Kylmakalle Oct 4, 2024
fc3e3ee
Revert "WIP: revert version"
Kylmakalle Oct 6, 2024
e789558
Bump version
Kylmakalle Oct 7, 2024
1b48718
New translations sglocalizable.strings (Italian) (#59)
Kylmakalle Oct 8, 2024
4af2aaa
higher audio bitrate when sending videos
kukuruzka165 Oct 23, 2024
72b151c
change audio quality in presets
kukuruzka165 Nov 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: CI

on:
push:
branches: [ master ]
# push:
# branches: [ master ]

workflow_dispatch:

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ xcodeproj.bazelrc
build-input/*
**/*.pyc
*.pyc
submodules/**/.build/*
swiftgram-scripts
Swiftgram/Playground/custom_bazel_path.bzl
5 changes: 2 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

[submodule "submodules/rlottie/rlottie"]
path = submodules/rlottie/rlottie
url=../rlottie.git
url=https://github.com/TelegramMessenger/rlottie.git
[submodule "build-system/bazel-rules/rules_apple"]
path = build-system/bazel-rules/rules_apple
url=https://github.com/ali-fareed/rules_apple.git
Expand All @@ -16,7 +15,7 @@ url=https://github.com/bazelbuild/rules_swift.git
url = https://github.com/telegramdesktop/libtgvoip.git
[submodule "submodules/TgVoipWebrtc/tgcalls"]
path = submodules/TgVoipWebrtc/tgcalls
url=../tgcalls.git
url=https://github.com/TelegramMessenger/tgcalls.git
[submodule "third-party/libvpx/libvpx"]
path = third-party/libvpx/libvpx
url = https://github.com/webmproject/libvpx.git
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Swiftgram

Supercharged Telegram fork for iOS

[<img src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" height="50">](https://apps.apple.com/app/apple-store/id6471879502?pt=126511626&ct=gh&mt=8)

- Download: [App Store](https://apps.apple.com/app/apple-store/id6471879502?pt=126511626&ct=gh&mt=8)
- Telegram channel: https://t.me/swiftgram
- Telegram chat: https://t.me/swiftgramchat
- TestFlight beta, local chats, translations and other [@SwiftgramLinks](https://t.me/s/SwiftgramLinks)

Swiftgram's compilation steps are the same as for the official app. Below you'll find a complete compilation guide based on the official app.

# Telegram iOS Source Code Compilation Guide

We welcome all developers to use our API and source code to create applications on our platform.
Expand All @@ -16,7 +29,7 @@ There are several things we require from **all developers** for the moment.
## Get the Code

```
git clone --recursive -j8 https://github.com/TelegramMessenger/Telegram-iOS.git
git clone --recursive -j8 https://github.com/Swiftgram/Telegram-iOS.git
```

## Setup Xcode
Expand All @@ -29,7 +42,7 @@ Install Xcode (directly from https://developer.apple.com/download/applications o
```
openssl rand -hex 8
```
2. Create a new Xcode project. Use `Telegram` as the Product Name. Use `org.{identifier from step 1}` as the Organization Identifier.
2. Create a new Xcode project. Use `Swiftgram` as the Product Name. Use `org.{identifier from step 1}` as the Organization Identifier.
3. Open `Keychain Access` and navigate to `Certificates`. Locate `Apple Development: [email protected] (XXXXXXXXXX)` and double tap the certificate. Under `Details`, locate `Organizational Unit`. This is the Team ID.
4. Edit `build-system/template_minimal_development_configuration.json`. Use data from the previous steps.

Expand Down
9 changes: 9 additions & 0 deletions Swiftgram/AppleStyleFolders/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
filegroup(
name = "AppleStyleFolders",
srcs = glob([
"Sources/**/*.swift",
]),
visibility = [
"//visibility:public",
],
)
1,034 changes: 1,034 additions & 0 deletions Swiftgram/AppleStyleFolders/Sources/File.swift

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Swiftgram/ChatControllerImplExtension/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
filegroup(
name = "ChatControllerImplExtension",
srcs = glob([
"Sources/**/*.swift",
]),
visibility = [
"//visibility:public",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
import SGSimpleSettings
import Foundation
import UIKit
import Postbox
import SwiftSignalKit
import Display
import AsyncDisplayKit
import TelegramCore
import SafariServices
import MobileCoreServices
import Intents
import LegacyComponents
import TelegramPresentationData
import TelegramUIPreferences
import DeviceAccess
import TextFormat
import TelegramBaseController
import AccountContext
import TelegramStringFormatting
import OverlayStatusController
import DeviceLocationManager
import ShareController
import UrlEscaping
import ContextUI
import ComposePollUI
import AlertUI
import PresentationDataUtils
import UndoUI
import TelegramCallsUI
import TelegramNotices
import GameUI
import ScreenCaptureDetection
import GalleryUI
import OpenInExternalAppUI
import LegacyUI
import InstantPageUI
import LocationUI
import BotPaymentsUI
import DeleteChatPeerActionSheetItem
import HashtagSearchUI
import LegacyMediaPickerUI
import Emoji
import PeerAvatarGalleryUI
import PeerInfoUI
import RaiseToListen
import UrlHandling
import AvatarNode
import AppBundle
import LocalizedPeerData
import PhoneNumberFormat
import SettingsUI
import UrlWhitelist
import TelegramIntents
import TooltipUI
import StatisticsUI
import MediaResources
import GalleryData
import ChatInterfaceState
import InviteLinksUI
import Markdown
import TelegramPermissionsUI
import Speak
import TranslateUI
import UniversalMediaPlayer
import WallpaperBackgroundNode
import ChatListUI
import CalendarMessageScreen
import ReactionSelectionNode
import ReactionListContextMenuContent
import AttachmentUI
import AttachmentTextInputPanelNode
import MediaPickerUI
import ChatPresentationInterfaceState
import Pasteboard
import ChatSendMessageActionUI
import ChatTextLinkEditUI
import WebUI
import PremiumUI
import ImageTransparency
import StickerPackPreviewUI
import TextNodeWithEntities
import EntityKeyboard
import ChatTitleView
import EmojiStatusComponent
import ChatTimerScreen
import MediaPasteboardUI
import ChatListHeaderComponent
import ChatControllerInteraction
import FeaturedStickersScreen
import ChatEntityKeyboardInputNode
import StorageUsageScreen
import AvatarEditorScreen
import ChatScheduleTimeController
import ICloudResources
import StoryContainerScreen
import MoreHeaderButton
import VolumeButtons
import ChatAvatarNavigationNode
import ChatContextQuery
import PeerReportScreen
import PeerSelectionController
import SaveToCameraRoll
import ChatMessageDateAndStatusNode
import ReplyAccessoryPanelNode
import TextSelectionNode
import ChatMessagePollBubbleContentNode
import ChatMessageItem
import ChatMessageItemImpl
import ChatMessageItemView
import ChatMessageItemCommon
import ChatMessageAnimatedStickerItemNode
import ChatMessageBubbleItemNode
import ChatNavigationButton
import WebsiteType
import ChatQrCodeScreen
import PeerInfoScreen
import MediaEditorScreen
import WallpaperGalleryScreen
import WallpaperGridScreen
import VideoMessageCameraScreen
import TopMessageReactions
import AudioWaveform
import PeerNameColorScreen
import ChatEmptyNode
import ChatMediaInputStickerGridItem
import AdsInfoScreen

extension ChatControllerImpl {

func forwardMessagesToCloud(messageIds: [MessageId], removeNames: Bool, openCloud: Bool, resetCurrent: Bool = false) {
let _ = (self.context.engine.data.get(EngineDataMap(
messageIds.map(TelegramEngine.EngineData.Item.Messages.Message.init)
))
|> deliverOnMainQueue).startStandalone(next: { [weak self] messages in
guard let strongSelf = self else {
return
}

if resetCurrent {
strongSelf.updateChatPresentationInterfaceState(animated: true, interactive: true, { $0.updatedInterfaceState({ $0.withUpdatedForwardMessageIds(nil).withUpdatedForwardOptionsState(nil).withoutSelectionState() }) })
}

let sortedMessages = messages.values.compactMap { $0?._asMessage() }.sorted { lhs, rhs in
return lhs.id < rhs.id
}

var attributes: [MessageAttribute] = []
if removeNames {
attributes.append(ForwardOptionsMessageAttribute(hideNames: true, hideCaptions: false))
}

if !openCloud {
Queue.mainQueue().after(0.88) {
strongSelf.chatDisplayNode.hapticFeedback.success()
}

let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: true, action: { [weak self] value in
if case .info = value, let strongSelf = self {
let _ = (strongSelf.context.engine.data.get(TelegramEngine.EngineData.Item.Peer.Peer(id: strongSelf.context.account.peerId))
|> deliverOnMainQueue).startStandalone(next: { peer in
guard let strongSelf = self, let peer = peer, let navigationController = strongSelf.effectiveNavigationController else {
return
}

strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(peer), keepStack: .always, purposefulAction: {}, peekData: nil))
})
return true
}
return false
}), in: .current)
}

let _ = (enqueueMessages(account: strongSelf.context.account, peerId: strongSelf.context.account.peerId, messages: sortedMessages.map { message -> EnqueueMessage in
return .forward(source: message.id, threadId: nil, grouping: .auto, attributes: attributes, correlationId: nil)
})
|> deliverOnMainQueue).startStandalone(next: { messageIds in
guard openCloud else {
return
}
if let strongSelf = self {
let signals: [Signal<Bool, NoError>] = messageIds.compactMap({ id -> Signal<Bool, NoError>? in
guard let id = id else {
return nil
}
return strongSelf.context.account.pendingMessageManager.pendingMessageStatus(id)
|> mapToSignal { status, _ -> Signal<Bool, NoError> in
if status != nil {
return .never()
} else {
return .single(true)
}
}
|> take(1)
})
if strongSelf.shareStatusDisposable == nil {
strongSelf.shareStatusDisposable = MetaDisposable()
}
strongSelf.shareStatusDisposable?.set((combineLatest(signals)
|> deliverOnMainQueue).startStrict(next: { [weak strongSelf] _ in
guard let strongSelf = strongSelf else {
return
}
strongSelf.chatDisplayNode.hapticFeedback.success()
let _ = (strongSelf.context.engine.data.get(TelegramEngine.EngineData.Item.Peer.Peer(id: strongSelf.context.account.peerId))
|> deliverOnMainQueue).startStandalone(next: { [weak strongSelf] peer in
guard let strongSelf = strongSelf, let peer = peer, let navigationController = strongSelf.effectiveNavigationController else {
return
}

var navigationSubject: ChatControllerSubject? = nil
for messageId in messageIds {
if let messageId = messageId {
navigationSubject = .message(id: .id(messageId), highlight: ChatControllerSubject.MessageHighlight(quote: nil), timecode: nil, setupReply: false)
break
}
}
strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(peer), subject: navigationSubject, keepStack: .always, purposefulAction: {}, peekData: nil))
})
} ))
}
})
})
}
}
Empty file added Swiftgram/FLEX/BUILD
Empty file.
68 changes: 68 additions & 0 deletions Swiftgram/FLEX/FLEX.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
objc_library(
name = "FLEX",
module_name = "FLEX",
srcs = glob(
["Classes/**/*"],
exclude = [
"Classes/Info.plist",
"Classes/Utility/APPLE_LICENSE",
"Classes/Network/OSCache/LICENSE.md",
"Classes/Network/PonyDebugger/LICENSE",
"Classes/GlobalStateExplorers/DatabaseBrowser/LICENSE",
"Classes/GlobalStateExplorers/Keychain/SSKeychain_LICENSE",
"Classes/GlobalStateExplorers/SystemLog/LLVM_LICENSE.TXT",
]
),
hdrs = glob([
"Classes/**/*.h"
]),
includes = [
"Classes",
"Classes/Core",
"Classes/Core/Controllers",
"Classes/Core/Views",
"Classes/Core/Views/Cells",
"Classes/Core/Views/Carousel",
"Classes/ObjectExplorers",
"Classes/ObjectExplorers/Sections",
"Classes/ObjectExplorers/Sections/Shortcuts",
"Classes/Network",
"Classes/Network/PonyDebugger",
"Classes/Network/OSCache",
"Classes/Toolbar",
"Classes/Manager",
"Classes/Manager/Private",
"Classes/Editing",
"Classes/Editing/ArgumentInputViews",
"Classes/Headers",
"Classes/ExplorerInterface",
"Classes/ExplorerInterface/Tabs",
"Classes/ExplorerInterface/Bookmarks",
"Classes/GlobalStateExplorers",
"Classes/GlobalStateExplorers/Globals",
"Classes/GlobalStateExplorers/Keychain",
"Classes/GlobalStateExplorers/FileBrowser",
"Classes/GlobalStateExplorers/SystemLog",
"Classes/GlobalStateExplorers/DatabaseBrowser",
"Classes/GlobalStateExplorers/RuntimeBrowser",
"Classes/GlobalStateExplorers/RuntimeBrowser/DataSources",
"Classes/ViewHierarchy",
"Classes/ViewHierarchy/SnapshotExplorer",
"Classes/ViewHierarchy/SnapshotExplorer/Scene",
"Classes/ViewHierarchy/TreeExplorer",
"Classes/Utility",
"Classes/Utility/Runtime",
"Classes/Utility/Runtime/Objc",
"Classes/Utility/Runtime/Objc/Reflection",
"Classes/Utility/Categories",
"Classes/Utility/Categories/Private",
"Classes/Utility/Keyboard"
],
copts = [
"-Wno-deprecated-declarations",
"-Wno-strict-prototypes",
"-Wno-unsupported-availability-guard",
],
deps = [],
visibility = ["//visibility:public"],
)
3 changes: 3 additions & 0 deletions Swiftgram/Playground/.swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--maxwidth 100
--indent 4
--disable redundantSelf
Loading