diff --git a/.gitignore b/.gitignore index fd59219a..80ff8b87 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,4 @@ iOSInjectionProject/ IceCubesApp.xcconfig *.resolved buildServer.json +.vscode/settings.json diff --git a/IceCubesApp.xcodeproj/project.pbxproj b/IceCubesApp.xcodeproj/project.pbxproj index f189777d..128b028e 100644 --- a/IceCubesApp.xcodeproj/project.pbxproj +++ b/IceCubesApp.xcodeproj/project.pbxproj @@ -47,8 +47,6 @@ 9FC2A38F2B49D1AA00DFD1C1 /* StatusKit in Frameworks */ = {isa = PBXBuildFile; productRef = 9FC2A38E2B49D1AA00DFD1C1 /* StatusKit */; }; 9FD542E72962D2FF0045321A /* Lists in Frameworks */ = {isa = PBXBuildFile; productRef = 9FD542E62962D2FF0045321A /* Lists */; }; 9FE3DB57296FEFCA00628CB0 /* AppAccount in Frameworks */ = {isa = PBXBuildFile; productRef = 9FE3DB56296FEFCA00628CB0 /* AppAccount */; }; - 9FE4CCAB2B4C848A00DA5F13 /* GiphyUISDK in Frameworks */ = {isa = PBXBuildFile; platformFilters = (ios, maccatalyst, ); productRef = 9FE4CCAA2B4C848A00DA5F13 /* GiphyUISDK */; }; - 9FE4CCAD2B4C849F00DA5F13 /* GiphyUISDK in Frameworks */ = {isa = PBXBuildFile; productRef = 9FE4CCAC2B4C849F00DA5F13 /* GiphyUISDK */; }; 9FE6A42E2BD043A90055D388 /* RevenueCat in Frameworks */ = {isa = PBXBuildFile; productRef = 9FE6A42D2BD043A90055D388 /* RevenueCat */; }; 9FFF677C299B7B2C00FE700A /* Notifications in Frameworks */ = {isa = PBXBuildFile; productRef = 9FFF677B299B7B2C00FE700A /* Notifications */; }; 9FFF6780299B7D2B00FE700A /* DesignSystem in Frameworks */ = {isa = PBXBuildFile; productRef = 9FFF677F299B7D2B00FE700A /* DesignSystem */; }; @@ -256,7 +254,6 @@ 9FAD85A2297456A400496AB1 /* Env in Frameworks */, 9FAD85A0297456A100496AB1 /* Models in Frameworks */, 9FAD85A4297456A800496AB1 /* DesignSystem in Frameworks */, - 9FE4CCAD2B4C849F00DA5F13 /* GiphyUISDK in Frameworks */, 9FAD859E2974569B00496AB1 /* Account in Frameworks */, 9FAD859C2974422700496AB1 /* AppAccount in Frameworks */, 9FC2A38F2B49D1AA00DFD1C1 /* StatusKit in Frameworks */, @@ -269,7 +266,6 @@ buildActionMask = 2147483647; files = ( 9F7335EF29674F7100AFF0BA /* QuickLook.framework in Frameworks */, - 9FE4CCAB2B4C848A00DA5F13 /* GiphyUISDK in Frameworks */, 9F7335ED2967463400AFF0BA /* AVKit.framework in Frameworks */, 9F2A540E2969A0B0009B2D7C /* StoreKit.framework in Frameworks */, 9F55C6902955993C00F94077 /* Explore in Frameworks */, @@ -437,7 +433,6 @@ 9FAD85A1297456A400496AB1 /* Env */, 9FAD85A3297456A800496AB1 /* DesignSystem */, 9FC2A38E2B49D1AA00DFD1C1 /* StatusKit */, - 9FE4CCAC2B4C849F00DA5F13 /* GiphyUISDK */, ); productName = IceCubesShareExtension; productReference = 9FAD858829743F7400496AB1 /* IceCubesShareExtension.appex */; @@ -479,7 +474,6 @@ 9FE3DB56296FEFCA00628CB0 /* AppAccount */, DA0B24FA2A6876D50045BDD7 /* SFSafeSymbols */, 9FC2A38A2B49D19A00DFD1C1 /* StatusKit */, - 9FE4CCAA2B4C848A00DA5F13 /* GiphyUISDK */, 9FE6A42D2BD043A90055D388 /* RevenueCat */, 9F9191582C6DDF20001C89E7 /* WishKit */, ); @@ -568,7 +562,6 @@ packageReferences = ( 9FAE4ACC29379A5A00772766 /* XCRemoteSwiftPackageReference "keychain-swift" */, DA0B24F92A6876D40045BDD7 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */, - 9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */, 9FE6A42C2BD043A80055D388 /* XCRemoteSwiftPackageReference "purchases-ios" */, 9F9191572C6DDF20001C89E7 /* XCRemoteSwiftPackageReference "wishkit-ios" */, ); @@ -1316,14 +1309,6 @@ kind = branch; }; }; - 9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/Giphy/giphy-ios-sdk"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.2.8; - }; - }; 9FE6A42C2BD043A80055D388 /* XCRemoteSwiftPackageReference "purchases-ios" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/RevenueCat/purchases-ios"; @@ -1471,16 +1456,6 @@ isa = XCSwiftPackageProductDependency; productName = AppAccount; }; - 9FE4CCAA2B4C848A00DA5F13 /* GiphyUISDK */ = { - isa = XCSwiftPackageProductDependency; - package = 9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */; - productName = GiphyUISDK; - }; - 9FE4CCAC2B4C849F00DA5F13 /* GiphyUISDK */ = { - isa = XCSwiftPackageProductDependency; - package = 9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */; - productName = GiphyUISDK; - }; 9FE6A42D2BD043A90055D388 /* RevenueCat */ = { isa = XCSwiftPackageProductDependency; package = 9FE6A42C2BD043A80055D388 /* XCRemoteSwiftPackageReference "purchases-ios" */; diff --git a/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0aadea84..1482a2f8 100644 --- a/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "b7af8c2ab18771d4cebfbeb66d91559df500516a12027cd67834b2a576eb3df0", + "originHash" : "800f54ad2dcf12c6d2dda1b14c463b8c702e2a6461b5cb072611d4016256adb3", "pins" : [ { "identity" : "bodega", @@ -28,15 +28,6 @@ "version" : "4.0.0" } }, - { - "identity" : "giphy-ios-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Giphy/giphy-ios-sdk", - "state" : { - "revision" : "fb61ec12738133eb3b9bf62ed11d1bf93d9b4b20", - "version" : "2.2.10" - } - }, { "identity" : "keychain-swift", "kind" : "remoteSourceControl", @@ -46,15 +37,6 @@ "revision" : "5e1b02b6a9dac2a759a1d5dbc175c86bd192a608" } }, - { - "identity" : "libwebp-xcode", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SDWebImage/libwebp-Xcode", - "state" : { - "revision" : "b2b1d20a90b14d11f6ef4241da6b81c1d3f171e4", - "version" : "1.3.2" - } - }, { "identity" : "lrucache", "kind" : "remoteSourceControl", diff --git a/Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift b/Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift index 58d49fcc..593d1ff7 100644 --- a/Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift @@ -1,8 +1,5 @@ import DesignSystem import Env -#if !os(visionOS) && !DEBUG - import GiphyUISDK -#endif import Models import NukeUI import PhotosUI @@ -24,7 +21,6 @@ extension StatusEditor { @State private var isPhotosPickerPresented: Bool = false @State private var isFileImporterPresented: Bool = false @State private var isCameraPickerPresented: Bool = false - @State private var isGIFPickerPresented: Bool = false var body: some View { @Bindable var viewModel = focusedSEVM @@ -94,14 +90,6 @@ extension StatusEditor { } label: { Label("status.editor.browse-file", systemImage: "folder") } - - #if !os(visionOS) - Button { - isGIFPickerPresented = true - } label: { - Label("GIPHY", systemImage: "party.popper") - } - #endif } label: { if viewModel.isMediasLoading { ProgressView() @@ -132,30 +120,6 @@ extension StatusEditor { })) .background(.black) }) - .sheet(isPresented: $isGIFPickerPresented, content: { - #if !os(visionOS) && !DEBUG - #if targetEnvironment(macCatalyst) - NavigationStack { - giphyView - .toolbar { - ToolbarItem(placement: .topBarLeading) { - Button { - isGIFPickerPresented = false - } label: { - Image(systemName: "xmark.circle") - } - } - } - } - .presentationDetents([.medium, .large]) - #else - giphyView - .presentationDetents([.medium, .large]) - #endif - #else - EmptyView() - #endif - }) .accessibilityLabel("accessibility.editor.button.attach-photo") .disabled(viewModel.showPoll) @@ -216,22 +180,6 @@ extension StatusEditor { return false } - #if !os(visionOS) && !DEBUG - @ViewBuilder - private var giphyView: some View { - @Bindable var viewModel = focusedSEVM - GifPickerView { url in - GPHCache.shared.downloadAssetData(url) { data, _ in - guard let data else { return } - viewModel.processGIFData(data: data) - } - isGIFPickerPresented = false - } onShouldDismissGifPicker: { - isGIFPickerPresented = false - } - } - #endif - private var AIMenu: some View { Menu { ForEach(AIPrompt.allCases, id: \.self) { prompt in diff --git a/Packages/StatusKit/Sources/StatusKit/Editor/Components/GIF/GIFPickerView.swift b/Packages/StatusKit/Sources/StatusKit/Editor/Components/GIF/GIFPickerView.swift deleted file mode 100644 index 7c8467ed..00000000 --- a/Packages/StatusKit/Sources/StatusKit/Editor/Components/GIF/GIFPickerView.swift +++ /dev/null @@ -1,59 +0,0 @@ -#if !os(visionOS) && !DEBUG - import DesignSystem - @preconcurrency import GiphyUISDK - import SwiftUI - import UIKit - - @MainActor - struct GifPickerView: UIViewControllerRepresentable { - @Environment(Theme.self) private var theme - - var completion: (String) -> Void - var onShouldDismissGifPicker: () -> Void - - func makeUIViewController(context: Context) -> GiphyViewController { - Giphy.configure(apiKey: "MIylJkNX57vcUNZxmSODKU9dQKBgXCkV") - - let controller = GiphyViewController() - controller.swiftUIEnabled = true - controller.mediaTypeConfig = [.gifs, .stickers, .recents] - controller.delegate = context.coordinator - controller.navigationController?.isNavigationBarHidden = true - controller.navigationController?.setNavigationBarHidden(true, animated: false) - - GiphyViewController.trayHeightMultiplier = 1.0 - - controller.theme = GPHTheme(type: theme.selectedScheme == .dark ? .darkBlur : .lightBlur) - - return controller - } - - func updateUIViewController(_: UIViewControllerType, context _: Context) {} - - func makeCoordinator() -> Coordinator { - GifPickerView.Coordinator(parent: self) - } - - @MainActor - class Coordinator: NSObject, GiphyDelegate { - var parent: GifPickerView - - init(parent: GifPickerView) { - self.parent = parent - } - - nonisolated func didDismiss(controller _: GiphyViewController?) { - Task { @MainActor in - parent.onShouldDismissGifPicker() - } - } - - nonisolated func didSelectMedia(giphyViewController _: GiphyViewController, media: GPHMedia) { - Task { @MainActor in - let url = media.url(rendition: .fixedWidth, fileType: .gif) - parent.completion(url ?? "") - } - } - } - } -#endif