diff --git a/StickerSlack.xcodeproj/project.pbxproj b/StickerSlack.xcodeproj/project.pbxproj index bd08957..305e773 100644 --- a/StickerSlack.xcodeproj/project.pbxproj +++ b/StickerSlack.xcodeproj/project.pbxproj @@ -23,6 +23,10 @@ A91649953080BA3D008D1B9D /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9164991307F8B3F008D1B9D /* SceneDelegate.swift */; }; A91649983080BA69008D1B9D /* StickerSlackApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A949B1F12EA04E8200215164 /* StickerSlackApp.swift */; }; A91649CB308113C5008D1B9D /* MessagesToolbarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A91649CA308113BF008D1B9D /* MessagesToolbarView.swift */; }; + A9164A1A3088DE73008D1B9D /* StickerBrowserViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9EF1842301A89B500804A07 /* StickerBrowserViewController.swift */; }; + A9164A1B3088DE73008D1B9D /* MessagesRootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96D599B301945240086948E /* MessagesRootViewController.swift */; }; + A9164A1C3088DE73008D1B9D /* MessagesToolbarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A91649CA308113BF008D1B9D /* MessagesToolbarView.swift */; }; + A9164A1D3088DE73008D1B9D /* MessagesAppViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A986A6CA2EB659E000B6E0FA /* MessagesAppViewController.swift */; }; A917BACE2F9B787B008DB31E /* EmojiCollectionViewRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A917BACD2F9B787B008DB31E /* EmojiCollectionViewRepresentable.swift */; }; A917BACF2F9B787B008DB31E /* EmojiCollectionViewRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A917BACD2F9B787B008DB31E /* EmojiCollectionViewRepresentable.swift */; }; A917BAD12F9B7B68008DB31E /* PlainEmojiCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A917BAD02F9B7B68008DB31E /* PlainEmojiCollectionViewCell.swift */; }; @@ -65,6 +69,9 @@ A97BFFC02F9E745C000441E5 /* EmojiCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A97BFFBE2F9E745C000441E5 /* EmojiCollectionViewCell.swift */; }; A97D3E7E2FA5235300BF3273 /* Haptics in Frameworks */ = {isa = PBXBuildFile; productRef = A97D3E7D2FA5235300BF3273 /* Haptics */; }; A97D3E802FA5235E00BF3273 /* Haptics in Frameworks */ = {isa = PBXBuildFile; productRef = A97D3E7F2FA5235E00BF3273 /* Haptics */; }; + A9803AFF30B87CB2002687A4 /* StorageCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9803AFE30B87CB2002687A4 /* StorageCellView.swift */; }; + A9803B0030B87CB2002687A4 /* StorageCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9803AFE30B87CB2002687A4 /* StorageCellView.swift */; }; + A9803B0130B87CB2002687A4 /* StorageCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9803AFE30B87CB2002687A4 /* StorageCellView.swift */; }; A982A14E2FFD2F8000053E26 /* BrowseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982A14D2FFD2F8000053E26 /* BrowseViewController.swift */; }; A982A14F2FFD2F8000053E26 /* BrowseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982A14D2FFD2F8000053E26 /* BrowseViewController.swift */; }; A986A6AE2EB658DF00B6E0FA /* Messages.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A969D6932EA3E86500399C05 /* Messages.framework */; }; @@ -248,6 +255,7 @@ A975F91F2FA52B3600A5C62E /* AddToPackMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddToPackMenuView.swift; sourceTree = ""; }; A9773C2E2EA54AF000F3B753 /* StickerPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StickerPreview.swift; sourceTree = ""; }; A97BFFBE2F9E745C000441E5 /* EmojiCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiCollectionViewCell.swift; sourceTree = ""; }; + A9803AFE30B87CB2002687A4 /* StorageCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageCellView.swift; sourceTree = ""; }; A982A14D2FFD2F8000053E26 /* BrowseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseViewController.swift; sourceTree = ""; }; A986A6AD2EB658DF00B6E0FA /* StickerSlackiMessageApp.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = StickerSlackiMessageApp.appex; sourceTree = BUILT_PRODUCTS_DIR; }; A986A6C62EB659E000B6E0FA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -591,6 +599,7 @@ children = ( A9BDEADD2F82BC93002798DF /* NoStickersView.swift */, A9C52F6A2F8988CD00078588 /* EmptyCollectionView.swift */, + A9803AFE30B87CB2002687A4 /* StorageCellView.swift */, ); path = Misc; sourceTree = ""; @@ -755,6 +764,7 @@ A9104C802EB4022500D160EA /* MSSticker.swift in Sources */, A98FA65C2FF3B29700D50212 /* EmojiTableView.swift in Sources */, A9E8C79A2FF7256B009A38B5 /* EmojiHoarder.Packs.swift in Sources */, + A9803B0130B87CB2002687A4 /* StorageCellView.swift in Sources */, A9E8C7A32FF7B815009A38B5 /* EmojiPackDetailViewController.swift in Sources */, A97322A62FA8CA2B004B657D /* JumboMojiTestView.swift in Sources */, A98C51C1301D2925006CB5A9 /* GifManager.swift in Sources */, @@ -771,6 +781,10 @@ A9BDEADE2F82BC93002798DF /* NoStickersView.swift in Sources */, A9D53AEB2FFB0272001C1BB9 /* EmojiPackManagerController.swift in Sources */, A955B3F52EC22EE900E1732D /* SearchView.swift in Sources */, + A9164A1A3088DE73008D1B9D /* StickerBrowserViewController.swift in Sources */, + A9164A1B3088DE73008D1B9D /* MessagesRootViewController.swift in Sources */, + A9164A1C3088DE73008D1B9D /* MessagesToolbarView.swift in Sources */, + A9164A1D3088DE73008D1B9D /* MessagesAppViewController.swift in Sources */, A98C51BD301D290D006CB5A9 /* GifView.swift in Sources */, A935437B2EB2A3C800BB80A4 /* FilterCategory.swift in Sources */, A917BAD12F9B7B68008DB31E /* PlainEmojiCollectionViewCell.swift in Sources */, @@ -822,6 +836,7 @@ A98C51BC301D290D006CB5A9 /* GifView.swift in Sources */, A97322A12FA7B9C8004B657D /* JumboMoji.swift in Sources */, A986A6C32EB6598100B6E0FA /* FilterCategory.swift in Sources */, + A9803B0030B87CB2002687A4 /* StorageCellView.swift in Sources */, A9CD6C3A2EDDE6B500B7F421 /* EmojiPack.swift in Sources */, A9EB724B2EB94A5700658CEB /* Trie.swift in Sources */, A9BDEAE02F82BCB4002798DF /* NoStickersView.swift in Sources */, @@ -854,6 +869,7 @@ buildActionMask = 2147483647; files = ( A91649983080BA69008D1B9D /* StickerSlackApp.swift in Sources */, + A9803AFF30B87CB2002687A4 /* StorageCellView.swift in Sources */, A9DB1DCB303DBAF30007C177 /* CGFloat.swift in Sources */, A99C4B8E2FF2E8D30070CBA5 /* TabbedContentView.swift in Sources */, A9034536301FC41600EFFFDF /* EmojiPackImporterViewController.swift in Sources */, @@ -1072,7 +1088,7 @@ CODE_SIGN_ENTITLEMENTS = StickerSlack/StickerSlack.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(BUILD)"; - DEVELOPMENT_TEAM = 8JGND254B7; + DEVELOPMENT_TEAM = 4UMKR5C7LL; ENABLE_APP_SANDBOX = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_ON_DEMAND_RESOURCES = YES; @@ -1098,7 +1114,7 @@ MARKETING_VERSION = "$(VERSION)"; ON_DEMAND_RESOURCES_INITIAL_INSTALL_TAGS = ""; ON_DEMAND_RESOURCES_PREFETCH_ORDER = ""; - PRODUCT_BUNDLE_IDENTIFIER = com.neon443.StickerSlack; + PRODUCT_BUNDLE_IDENTIFIER = com.aarti.StickerSlack; PRODUCT_NAME = "$(TARGET_NAME)"; REGISTER_APP_GROUPS = YES; SDKROOT = auto; @@ -1124,7 +1140,7 @@ CODE_SIGN_ENTITLEMENTS = StickerSlack/StickerSlack.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(BUILD)"; - DEVELOPMENT_TEAM = 8JGND254B7; + DEVELOPMENT_TEAM = 4UMKR5C7LL; ENABLE_APP_SANDBOX = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_ON_DEMAND_RESOURCES = YES; @@ -1150,7 +1166,7 @@ MARKETING_VERSION = "$(VERSION)"; ON_DEMAND_RESOURCES_INITIAL_INSTALL_TAGS = ""; ON_DEMAND_RESOURCES_PREFETCH_ORDER = ""; - PRODUCT_BUNDLE_IDENTIFIER = com.neon443.StickerSlack; + PRODUCT_BUNDLE_IDENTIFIER = com.aarti.StickerSlack; PRODUCT_NAME = "$(TARGET_NAME)"; REGISTER_APP_GROUPS = YES; SDKROOT = auto; @@ -1175,7 +1191,7 @@ CODE_SIGN_ENTITLEMENTS = StickerSlackiMessageApp/StickerSlackiMessageApp.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(BUILD)"; - DEVELOPMENT_TEAM = 8JGND254B7; + DEVELOPMENT_TEAM = 4UMKR5C7LL; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = StickerSlackiMessageApp/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = StickerSlack; @@ -1187,7 +1203,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = "$(VERSION)"; - PRODUCT_BUNDLE_IDENTIFIER = com.neon443.StickerSlack.StickerSlackiMessageApp; + PRODUCT_BUNDLE_IDENTIFIER = com.aarti.StickerSlack.iMessage; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -1207,7 +1223,7 @@ CODE_SIGN_ENTITLEMENTS = StickerSlackiMessageApp/StickerSlackiMessageApp.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(BUILD)"; - DEVELOPMENT_TEAM = 8JGND254B7; + DEVELOPMENT_TEAM = 4UMKR5C7LL; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = StickerSlackiMessageApp/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = StickerSlack; @@ -1219,7 +1235,7 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = "$(VERSION)"; - PRODUCT_BUNDLE_IDENTIFIER = com.neon443.StickerSlack.StickerSlackiMessageApp; + PRODUCT_BUNDLE_IDENTIFIER = com.aarti.StickerSlack.iMessage; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; diff --git a/StickerSlack/Hoarder.swift b/StickerSlack/Hoarder.swift index 20a813e..688c2b6 100644 --- a/StickerSlack/Hoarder.swift +++ b/StickerSlack/Hoarder.swift @@ -22,7 +22,7 @@ protocol Hoarder: ObservableObject { } class BaseHoarder: Hoarder { - static let library: URL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.neon443.StickerSlack")!.appendingPathComponent("Library", conformingTo: .directory) + static let library: URL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.aarti.StickerSlack")!.appendingPathComponent("Library", conformingTo: .directory) @Published var downloadedStickers: Set = [] diff --git a/StickerSlack/Info.plist b/StickerSlack/Info.plist index 5f257d6..c0a5a14 100644 --- a/StickerSlack/Info.plist +++ b/StickerSlack/Info.plist @@ -7,10 +7,8 @@ CFBundleTypeRole Viewer - CFBundleURLName com.neon443.stickerslack - CFBundleURLSchemes stickerslack diff --git a/StickerSlack/SceneDelegate.swift b/StickerSlack/SceneDelegate.swift index 0436bd5..91bb33a 100644 --- a/StickerSlack/SceneDelegate.swift +++ b/StickerSlack/SceneDelegate.swift @@ -8,6 +8,7 @@ import Foundation import UIKit import SwiftUI +import Messages class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? diff --git a/StickerSlack/StickerSlack.entitlements b/StickerSlack/StickerSlack.entitlements index 28e32ea..74d5cc5 100644 --- a/StickerSlack/StickerSlack.entitlements +++ b/StickerSlack/StickerSlack.entitlements @@ -9,7 +9,7 @@ com.apple.security.application-groups - group.com.neon443.StickerSlack + group.com.aarti.StickerSlack diff --git a/StickerSlack/SwiftUI/Misc/StorageCellView.swift b/StickerSlack/SwiftUI/Misc/StorageCellView.swift new file mode 100644 index 0000000..54ea63f --- /dev/null +++ b/StickerSlack/SwiftUI/Misc/StorageCellView.swift @@ -0,0 +1,37 @@ +// +// StorageCellView.swift +// StickerSlack +// +// Created by neon443 on 26/11/2026. +// + +import Foundation +import SwiftUI + +struct StorageCellView: View { + @State var totalStorage: Int = 0 + @State var usedStorage: CGFloat = 0 + @State var stickerSlackStorage: CGFloat = 0 + + var body: some View { + VStack { + HStack { + Text("") + Spacer() + Text("\(totalStorage)") + .onAppear { + var totalStorage: AnyObject? + try? (EmojiHoarder.localTrieDict as NSURL).getResourceValue(&totalStorage, forKey: URLResourceKey.volumeTotalCapacityKey) + } + } + HStack(spacing: 0) { + Rectangle() + } + .clipShape(RoundedRectangle(cornerRadius: 5)) + } + } +} + +#Preview { + StorageCellView() +} diff --git a/StickerSlack/SwiftUI/SettingsView.swift b/StickerSlack/SwiftUI/SettingsView.swift index ae5c4fd..b78956d 100644 --- a/StickerSlack/SwiftUI/SettingsView.swift +++ b/StickerSlack/SwiftUI/SettingsView.swift @@ -53,6 +53,9 @@ struct SettingsView: View { Haptic.rigid.trigger() } } + + + // NavigationLink { // List { // Picker(selection: $hoarder.letterStatsSorting.by) { diff --git a/StickerSlack/UIKit/TabbedContentView.swift b/StickerSlack/UIKit/TabbedContentView.swift index 8a71c30..3c9a031 100644 --- a/StickerSlack/UIKit/TabbedContentView.swift +++ b/StickerSlack/UIKit/TabbedContentView.swift @@ -16,17 +16,12 @@ final class TabbedContentView: UITabBarController, UITabBarControllerDelegate { let browse = BrowseViewController(emojiHoarder: emojiHoarder) browse.tabBarItem = UITabBarItem(title: "Browse", image: UIImage(systemName: "square.grid.2x2.fill"), tag: 0) -// let packsView = EmojiPackManager(hoarder: emojiHoarder) -// let packs = UIHostingController(rootView: packsView) let packs = EmojiPackManagerController(emojiHoarder: emojiHoarder) -// let packs = EmojiPackDetailViewController(with: emojiHoarder, andPack: .test) packs.tabBarItem = UITabBarItem(title: "Packs", image: UIImage(systemName: "square.stack.3d.up.fill"), tag: 1) let downloaded = DownloadedViewController(emojiHoarder: emojiHoarder) downloaded.tabBarItem = UITabBarItem(title: "Downloaded", image: UIImage(systemName: "arrow.down.circle.fill"), tag: 2) -// let searchView = SearchView(hoarder: emojiHoarder) -// let search = UIHostingController(rootView: searchView) let search = SearchViewController(emojiHoarder: emojiHoarder) search.tabBarItem = UITabBarItem(tabBarSystemItem: .search, tag: 3) @@ -47,15 +42,4 @@ final class TabbedContentView: UITabBarController, UITabBarControllerDelegate { } return true } - -// override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) { -// item -// }/ - - -// func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) { -// let navController = viewController as! UINavigationController -// navController.popViewController(animated: true) -// } - } diff --git a/StickerSlackiMessageApp/MessagesToolbarView.swift b/StickerSlackiMessageApp/MessagesToolbarView.swift index 8d50b42..28cbf45 100644 --- a/StickerSlackiMessageApp/MessagesToolbarView.swift +++ b/StickerSlackiMessageApp/MessagesToolbarView.swift @@ -75,21 +75,29 @@ class MessagesToolbarView: UIStackView { labelSubTitle.textAlignment = .center labelSubTitle.font = .preferredFont(forTextStyle: .caption1) - - goButton.layer.masksToBounds = true + goView.layer.masksToBounds = true goButton.setImage(UIImage(named: "arrow.up.right.square"), for: .normal) - goView.addSubview(goButton) + goView.contentView.addSubview(goButton) goButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ - goButton.widthAnchor.constraint(equalTo: goView.widthAnchor), - goButton.heightAnchor.constraint(equalTo: goView.heightAnchor) + goButton.widthAnchor.constraint(equalTo: goView.contentView.widthAnchor), + goButton.heightAnchor.constraint(equalTo: goView.contentView.heightAnchor), + +// goView.contentView.heightAnchor.constraint(equalTo: labelView.heightAnchor), + goView.contentView.widthAnchor.constraint(equalTo: goView.contentView.heightAnchor) ]) - self.addArrangedSubview(labelView) self.addArrangedSubview(goView) + self.addArrangedSubview(labelView) } func refreshUI() { } + + override func layoutSubviews() { + super.layoutSubviews() + goView.layer.cornerRadius = goView.frame.height/4 + labelView.layer.cornerRadius = labelView.frame.height/4 + } } diff --git a/StickerSlackiMessageApp/StickerBrowserViewController.swift b/StickerSlackiMessageApp/StickerBrowserViewController.swift index 76105f9..cd0ef1e 100644 --- a/StickerSlackiMessageApp/StickerBrowserViewController.swift +++ b/StickerSlackiMessageApp/StickerBrowserViewController.swift @@ -43,32 +43,13 @@ class StickerBrowserViewController: MSStickerBrowserViewController { override func viewDidLoad() { super.viewDidLoad() -// let stack = UIStackView(arrangedSubviews: [labelTitle, labelSubTitle]) -// labelStack.contentView.addSubview(stack) self.view.addSubview(toolbar) -// stack.translatesAutoresizingMaskIntoConstraints = false toolbar.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ -// stack.heightAnchor.constraint(equalTo: toolbar.heightAnchor), -// stack.widthAnchor.constraint(equalTo: toolbar.widthAnchor), - - toolbar.centerXAnchor.constraint(equalTo: self.view.centerXAnchor), + toolbar.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: -4), toolbar.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -4) ]) -// stack.axis = .vertical -// stack.insetsLayoutMarginsFromSafeArea = false -// stack.layoutMargins = UIEdgeInsets(top: 5, left: 10, bottom: 5, right: 10) -// stack.isLayoutMarginsRelativeArrangement = true - - toolbar.layer.masksToBounds = true - -// labelTitle.textColor = .white -// labelTitle.font = UIFont.preferredFont(forTextStyle: .subheadline) -// labelTitle.textAlignment = .center -// -// labelSubTitle.textColor = .white -// labelSubTitle.font = UIFont.preferredFont(forTextStyle: .caption1) -// labelSubTitle.textAlignment = .center + toolbar.labelView.layer.masksToBounds = true } override func viewDidLayoutSubviews() { diff --git a/StickerSlackiMessageApp/StickerSlackiMessageApp.entitlements b/StickerSlackiMessageApp/StickerSlackiMessageApp.entitlements index f5e052f..d8692aa 100644 --- a/StickerSlackiMessageApp/StickerSlackiMessageApp.entitlements +++ b/StickerSlackiMessageApp/StickerSlackiMessageApp.entitlements @@ -4,7 +4,7 @@ com.apple.security.application-groups - group.com.neon443.StickerSlack + group.com.aarti.StickerSlack