diff --git a/Symbolic.xcodeproj/project.pbxproj b/Symbolic.xcodeproj/project.pbxproj index 4f816cf54c..35fcbd72f6 100644 --- a/Symbolic.xcodeproj/project.pbxproj +++ b/Symbolic.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 56; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ @@ -45,11 +45,6 @@ D8708190297C6121007CAE83 /* SavePanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D870818F297C6121007CAE83 /* SavePanel.swift */; }; D88661A3297AC893001E41DD /* InfoLabeledContentStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88661A2297AC893001E41DD /* InfoLabeledContentStyle.swift */; }; D88661A5297AD82A001E41DD /* ConditionalLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88661A4297AD82A001E41DD /* ConditionalLink.swift */; }; - D89C5E252B87F2D40022061B /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D89C5E242B87F2D40022061B /* StoreKit.framework */; }; - D89C5E282B883DE70022061B /* SubscriptionCommands.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C5E272B883DE70022061B /* SubscriptionCommands.swift */; }; - D89C5E2A2B883E7D0022061B /* SubscriptionBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C5E292B883E7D0022061B /* SubscriptionBanner.swift */; }; - D89C5E2C2B883F510022061B /* RequiresSubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C5E2B2B883F510022061B /* RequiresSubscription.swift */; }; - D89C5E2E2B8840100022061B /* ValidationResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C5E2D2B8840100022061B /* ValidationResult.swift */; }; D8B0B1F1296CD4AB00F907BE /* OffsetGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B0B1F0296CD4AB00F907BE /* OffsetGuide.swift */; }; D8B61308293BB81100F29E0C /* AboutCommands.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B61307293BB81100F29E0C /* AboutCommands.swift */; }; D8B6130A293BB98100F29E0C /* ApplicationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8B61309293BB98100F29E0C /* ApplicationModel.swift */; }; @@ -134,7 +129,6 @@ D84B5D70296C52BE005E6C59 /* EditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorView.swift; sourceTree = ""; }; D84B5D73296C5540005E6C59 /* Template.symbolic */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Template.symbolic; sourceTree = ""; }; D857297B296C176C0037E58F /* SymbolPickerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolPickerCell.swift; sourceTree = ""; }; - D864A2382965999C008A4261 /* dependencies/interact */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = dependencies/interact; sourceTree = ""; }; D864A23B2965E239008A4261 /* MacIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacIconView.swift; sourceTree = ""; }; D8685CFE298D17A200A7DA60 /* NSApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSApplication.swift; sourceTree = ""; }; D86B0ECE291BEF7400352367 /* IconDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconDocument.swift; sourceTree = ""; }; @@ -144,12 +138,6 @@ D88661A2297AC893001E41DD /* InfoLabeledContentStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoLabeledContentStyle.swift; sourceTree = ""; }; D88661A4297AD82A001E41DD /* ConditionalLink.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConditionalLink.swift; sourceTree = ""; }; D89A7404297C9BDE00F632ED /* SavePanel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SavePanel.swift; sourceTree = ""; }; - D89C5E242B87F2D40022061B /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; - D89C5E262B87F6550022061B /* Symbolic.storekit */ = {isa = PBXFileReference; lastKnownFileType = text; path = Symbolic.storekit; sourceTree = ""; }; - D89C5E272B883DE70022061B /* SubscriptionCommands.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionCommands.swift; sourceTree = ""; }; - D89C5E292B883E7D0022061B /* SubscriptionBanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionBanner.swift; sourceTree = ""; }; - D89C5E2B2B883F510022061B /* RequiresSubscription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequiresSubscription.swift; sourceTree = ""; }; - D89C5E2D2B8840100022061B /* ValidationResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValidationResult.swift; sourceTree = ""; }; D8B0B1F0296CD4AB00F907BE /* OffsetGuide.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffsetGuide.swift; sourceTree = ""; }; D8B61307293BB81100F29E0C /* AboutCommands.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutCommands.swift; sourceTree = ""; }; D8B61309293BB98100F29E0C /* ApplicationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationModel.swift; sourceTree = ""; }; @@ -188,7 +176,6 @@ D8E4C3C02979809D00A25DF9 /* LibraryInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryInfoView.swift; sourceTree = ""; }; D8F6317328AC7D7A00DFEED0 /* SFSymbols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SFSymbols.swift; sourceTree = ""; }; D8F6317528AC85C600DFEED0 /* SymbolPickerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolPickerModel.swift; sourceTree = ""; }; - D8F99EC028B138FE007C3868 /* dependencies/diligence */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = dependencies/diligence; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -199,7 +186,6 @@ D831DD1C297319FC00C20B11 /* SwiftDraw in Frameworks */, D864A23A2965A2D1008A4261 /* Interact in Frameworks */, D8F99EC628B13998007C3868 /* Diligence in Frameworks */, - D89C5E252B87F2D40022061B /* StoreKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -230,7 +216,6 @@ D821B9E928ACDBF700504AA4 /* String.swift */, D86B0ED0291BEFC100352367 /* UTType.swift */, D821B9DF28ACDB6000504AA4 /* View.swift */, - D89C5E2D2B8840100022061B /* ValidationResult.swift */, ); path = Extensions; sourceTree = ""; @@ -279,7 +264,6 @@ D83970E628B132C700282EE8 /* UnityScaleWindow.swift */, D826B5C3296B054000693D27 /* WatchGridView.swift */, D8B7677A298A6E4F00E99C6A /* PositionOffsetSlider.swift */, - D89C5E292B883E7D0022061B /* SubscriptionBanner.swift */, ); path = Views; sourceTree = ""; @@ -325,7 +309,6 @@ children = ( D8B61307293BB81100F29E0C /* AboutCommands.swift */, D826B5C8296B13CB00693D27 /* ExportCommands.swift */, - D89C5E272B883DE70022061B /* SubscriptionCommands.swift */, D826B5CA296B243800693D27 /* ViewCommands.swift */, ); path = Commands; @@ -338,7 +321,6 @@ D88661A4297AD82A001E41DD /* ConditionalLink.swift */, D857297B296C176C0037E58F /* SymbolPickerCell.swift */, D870818F297C6121007CAE83 /* SavePanel.swift */, - D89C5E2B2B883F510022061B /* RequiresSubscription.swift */, ); path = Modifiers; sourceTree = ""; @@ -364,7 +346,6 @@ D8CD4A7128AC35C300D57F34 = { isa = PBXGroup; children = ( - D8F99EBF28B138FE007C3868 /* Packages */, D8CD4A7C28AC35C300D57F34 /* Symbolic */, D8CD4A8E28AC35C600D57F34 /* SymbolicTests */, D8CD4A9828AC35C600D57F34 /* SymbolicUITests */, @@ -388,7 +369,6 @@ children = ( D8CD4A8628AC35C600D57F34 /* Symbolic.entitlements */, D83970E328B0B61700282EE8 /* Info.plist */, - D89C5E262B87F6550022061B /* Symbolic.storekit */, D8CD4A7D28AC35C300D57F34 /* SymbolicApp.swift */, D8CD4A8128AC35C600D57F34 /* Assets.xcassets */, D8B61306293BB7FF00F29E0C /* Commands */, @@ -444,15 +424,6 @@ path = Toolbars; sourceTree = ""; }; - D8F99EBF28B138FE007C3868 /* Packages */ = { - isa = PBXGroup; - children = ( - D8F99EC028B138FE007C3868 /* dependencies/diligence */, - D864A2382965999C008A4261 /* dependencies/interact */, - ); - name = Packages; - sourceTree = ""; - }; D8F99EC128B13946007C3868 /* Licenses */ = { isa = PBXGroup; children = ( @@ -465,7 +436,6 @@ D8F99EC428B13998007C3868 /* Frameworks */ = { isa = PBXGroup; children = ( - D89C5E242B87F2D40022061B /* StoreKit.framework */, ); name = Frameworks; sourceTree = ""; @@ -565,6 +535,8 @@ mainGroup = D8CD4A7128AC35C300D57F34; packageReferences = ( D831DD1A297319FC00C20B11 /* XCRemoteSwiftPackageReference "SwiftDraw" */, + D8F6ADD02CA74B0E0078416B /* XCLocalSwiftPackageReference "dependencies/diligence" */, + D8F6ADD12CA74B230078416B /* XCLocalSwiftPackageReference "dependencies/interact" */, ); productRefGroup = D8CD4A7B28AC35C300D57F34 /* Products */; projectDirPath = ""; @@ -637,7 +609,6 @@ D8B7677D298A728D00E99C6A /* LeadingToTrailingLabeledContentStyle.swift in Sources */, D83970E528B11F5200282EE8 /* SymbolicError.swift in Sources */, D808A2152979918300763881 /* Variant.swift in Sources */, - D89C5E2E2B8840100022061B /* ValidationResult.swift in Sources */, D88661A5297AD82A001E41DD /* ConditionalLink.swift in Sources */, D86B0ED1291BEFC100352367 /* UTType.swift in Sources */, D8CD4A8028AC35C300D57F34 /* ContentView.swift in Sources */, @@ -648,7 +619,6 @@ D88661A3297AC893001E41DD /* InfoLabeledContentStyle.swift in Sources */, D8CB5A442971925A002007C4 /* Symbol.swift in Sources */, D821B9E428ACDBA800504AA4 /* IconView.swift in Sources */, - D89C5E282B883DE70022061B /* SubscriptionCommands.swift in Sources */, D8D9731128ACF8D2006CBF15 /* ExportToolbar.swift in Sources */, D83970E728B132C700282EE8 /* UnityScaleWindow.swift in Sources */, D8CB5A3C2970E92A002007C4 /* Library.swift in Sources */, @@ -659,8 +629,6 @@ D84868E8296ACC58009FDF32 /* Header.swift in Sources */, D8CD4A7E28AC35C300D57F34 /* SymbolicApp.swift in Sources */, D826B5C6296B09FC00693D27 /* Path.swift in Sources */, - D89C5E2A2B883E7D0022061B /* SubscriptionBanner.swift in Sources */, - D89C5E2C2B883F510022061B /* RequiresSubscription.swift in Sources */, D8E4C3C12979809D00A25DF9 /* LibraryInfoView.swift in Sources */, D8B6130A293BB98100F29E0C /* ApplicationModel.swift in Sources */, D808A2172979928900763881 /* LibraryInfoButton.swift in Sources */, @@ -1012,6 +980,17 @@ }; /* End XCConfigurationList section */ +/* Begin XCLocalSwiftPackageReference section */ + D8F6ADD02CA74B0E0078416B /* XCLocalSwiftPackageReference "dependencies/diligence" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = dependencies/diligence; + }; + D8F6ADD12CA74B230078416B /* XCLocalSwiftPackageReference "dependencies/interact" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = dependencies/interact; + }; +/* End XCLocalSwiftPackageReference section */ + /* Begin XCRemoteSwiftPackageReference section */ D831DD1A297319FC00C20B11 /* XCRemoteSwiftPackageReference "SwiftDraw" */ = { isa = XCRemoteSwiftPackageReference; diff --git a/Symbolic/Commands/ExportCommands.swift b/Symbolic/Commands/ExportCommands.swift index 146fad671d..9b96e0b46e 100644 --- a/Symbolic/Commands/ExportCommands.swift +++ b/Symbolic/Commands/ExportCommands.swift @@ -35,7 +35,6 @@ struct ExportCommands: Commands { sceneModel?.export() } .disabled(sceneModel == nil) - .requiresSubscription(groupID: ApplicationModel.subscriptionGroupID) .keyboardShortcut("e") } } diff --git a/Symbolic/Commands/SubscriptionCommands.swift b/Symbolic/Commands/SubscriptionCommands.swift deleted file mode 100644 index 3f2cce01a7..0000000000 --- a/Symbolic/Commands/SubscriptionCommands.swift +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2022-2024 Jason Morley -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -import SwiftUI - -struct SubscriptionCommands: Commands { - - @FocusedObject private var sceneModel: SceneModel? - - var body: some Commands { - - CommandGroup(after: .appSettings) { - - Button { - sceneModel?.showSubscriptions() - } label: { - Text("Subscriptions...") - } - .disabled(sceneModel == nil) - - Button { - sceneModel?.restorePurchases() - } label: { - Text("Restore Purchases...") - } - .disabled(sceneModel == nil) - - } - - } - -} diff --git a/Symbolic/Extensions/ValidationResult.swift b/Symbolic/Extensions/ValidationResult.swift deleted file mode 100644 index 98d32e0479..0000000000 --- a/Symbolic/Extensions/ValidationResult.swift +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2022-2024 Jason Morley -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -import StoreKit - -extension VerificationResult where SignedType == Transaction { - - var isValid: Bool { - guard case .verified(let transaction) = self else { - // Ignore unverified transactions. - return false - } - if transaction.revocationDate != nil { - // Revoked. - return false - } else if let expirationDate = transaction.expirationDate, expirationDate < Date() { - // Expired. - return false - } else if transaction.isUpgraded { - // Supersceded by another subscription but still valid. - return true - } else { - return true - } - } -} diff --git a/Symbolic/Extensions/View.swift b/Symbolic/Extensions/View.swift index 535f95c0cf..1b56772c26 100644 --- a/Symbolic/Extensions/View.swift +++ b/Symbolic/Extensions/View.swift @@ -36,15 +36,4 @@ extension View { return pngData } - func subscriptionStatus(for groupID: String, action: @escaping (Bool) -> Void) -> some View { - return subscriptionStatusTask(for: groupID) { taskState in - guard let statuses = taskState.value else { - return - } - let hasSubscription = statuses.map { $0.transaction.isValid } - .reduce(false) { $0 || $1 } - action(hasSubscription) - } - } - } diff --git a/Symbolic/Models/ApplicationModel.swift b/Symbolic/Models/ApplicationModel.swift index 5a31c9769b..46392a2fcd 100644 --- a/Symbolic/Models/ApplicationModel.swift +++ b/Symbolic/Models/ApplicationModel.swift @@ -25,8 +25,6 @@ import Interact class ApplicationModel: ObservableObject { - static let subscriptionGroupID = "21450230" - // https://developer.apple.com/design/human-interface-guidelines/foundations/app-icons/ static let icons: [IconSection] = [ diff --git a/Symbolic/Models/SceneModel.swift b/Symbolic/Models/SceneModel.swift index a4e12f7e2b..91ea64b664 100644 --- a/Symbolic/Models/SceneModel.swift +++ b/Symbolic/Models/SceneModel.swift @@ -19,7 +19,6 @@ // SOFTWARE. import Combine -import StoreKit import SwiftUI import Interact @@ -35,7 +34,6 @@ class SceneModel: ObservableObject, Runnable { @MainActor @Published var showOffsetY = false @MainActor @Published var showExportWarning = false @MainActor @Published var showExportPanel = false - @MainActor @Published var showSubscriptionsView: Bool = false @MainActor @Published var lastError: Error? @MainActor private var cancellables: Set = [] @@ -79,26 +77,6 @@ class SceneModel: ObservableObject, Runnable { } } - @MainActor func showSubscriptions() { - showSubscriptionsView = true - } - - @MainActor func dismissSubscriptions() { - showSubscriptionsView = false - } - - func restorePurchases() { - Task { - do { - try await AppStore.sync() - } catch { - await MainActor.run { - self.lastError = error - } - } - } - } - @MainActor func cancelExport() { showExportWarning = false showExportPanel = false diff --git a/Symbolic/Modifiers/RequiresSubscription.swift b/Symbolic/Modifiers/RequiresSubscription.swift deleted file mode 100644 index 8b096d6af7..0000000000 --- a/Symbolic/Modifiers/RequiresSubscription.swift +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2022-2024 Jason Morley -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -import SwiftUI - -struct RequiresSubscription: ViewModifier { - - let groupID: String - - @State var isSubscribed: Bool = false - - init(groupID: String) { - self.groupID = groupID - } - - func body(content: Content) -> some View { - content - .subscriptionStatus(for: groupID) { isSubscribed in - self.isSubscribed = isSubscribed - } - .disabled(!isSubscribed) - } - -} - -extension View { - - func requiresSubscription(groupID: String) -> some View { - return modifier(RequiresSubscription(groupID: groupID)) - } - -} diff --git a/Symbolic/Resources/material-icons/manifest.json b/Symbolic/Resources/material-icons/manifest.json index ccb7d49566..7cc473191e 100644 --- a/Symbolic/Resources/material-icons/manifest.json +++ b/Symbolic/Resources/material-icons/manifest.json @@ -45534,4 +45534,4 @@ } } ] -} \ No newline at end of file +} diff --git a/Symbolic/Symbolic.storekit b/Symbolic/Symbolic.storekit deleted file mode 100644 index 69d334965b..0000000000 --- a/Symbolic/Symbolic.storekit +++ /dev/null @@ -1,129 +0,0 @@ -{ - "identifier" : "8BD1C742", - "nonRenewingSubscriptions" : [ - - ], - "products" : [ - - ], - "settings" : { - "_applicationInternalID" : "6477066265", - "_developerTeamID" : "QS82QFHKWB", - "_failTransactionsEnabled" : false, - "_lastSynchronizedDate" : 730342275.329144, - "_locale" : "en_US", - "_storefront" : "USA", - "_storeKitErrors" : [ - { - "current" : null, - "enabled" : false, - "name" : "Load Products" - }, - { - "current" : null, - "enabled" : false, - "name" : "Purchase" - }, - { - "current" : null, - "enabled" : false, - "name" : "Verification" - }, - { - "current" : null, - "enabled" : false, - "name" : "App Store Sync" - }, - { - "current" : null, - "enabled" : false, - "name" : "Subscription Status" - }, - { - "current" : null, - "enabled" : false, - "name" : "App Transaction" - }, - { - "current" : null, - "enabled" : false, - "name" : "Manage Subscriptions Sheet" - }, - { - "current" : null, - "enabled" : false, - "name" : "Refund Request Sheet" - }, - { - "current" : null, - "enabled" : false, - "name" : "Offer Code Redeem Sheet" - } - ] - }, - "subscriptionGroups" : [ - { - "id" : "21450230", - "localizations" : [ - - ], - "name" : "Default", - "subscriptions" : [ - { - "adHocOffers" : [ - - ], - "codeOffers" : [ - - ], - "displayPrice" : "0.99", - "familyShareable" : false, - "groupNumber" : 2, - "internalID" : "6478353008", - "introductoryOffer" : null, - "localizations" : [ - { - "description" : "Auto-renewing monthly subscription.", - "displayName" : "Monthly", - "locale" : "en_US" - } - ], - "productID" : "app.symbolic.subscriptions.default.monthly", - "recurringSubscriptionPeriod" : "P1M", - "referenceName" : "Monthly", - "subscriptionGroupID" : "21450230", - "type" : "RecurringSubscription" - }, - { - "adHocOffers" : [ - - ], - "codeOffers" : [ - - ], - "displayPrice" : "9.99", - "familyShareable" : false, - "groupNumber" : 1, - "internalID" : "6478338567", - "introductoryOffer" : null, - "localizations" : [ - { - "description" : "Auto-renewing yearly subscription.", - "displayName" : "Yearly", - "locale" : "en_US" - } - ], - "productID" : "complete", - "recurringSubscriptionPeriod" : "P1Y", - "referenceName" : "Yearly", - "subscriptionGroupID" : "21450230", - "type" : "RecurringSubscription" - } - ] - } - ], - "version" : { - "major" : 3, - "minor" : 0 - } -} diff --git a/Symbolic/SymbolicApp.swift b/Symbolic/SymbolicApp.swift index 73dba6b171..2f87b3f65f 100644 --- a/Symbolic/SymbolicApp.swift +++ b/Symbolic/SymbolicApp.swift @@ -40,7 +40,6 @@ struct SymbolicApp: App { ExportCommands(applicationModel: applicationModel) ViewCommands(settings: applicationModel.settings) ToolbarCommands() - SubscriptionCommands() } } diff --git a/Symbolic/Toolbars/ExportToolbar.swift b/Symbolic/Toolbars/ExportToolbar.swift index aceb8271c3..17045fd133 100644 --- a/Symbolic/Toolbars/ExportToolbar.swift +++ b/Symbolic/Toolbars/ExportToolbar.swift @@ -37,7 +37,6 @@ struct ExportToolbar: CustomizableToolbarContent { Label("Export", systemImage: "square.and.arrow.up") } .help("Export icons") - .requiresSubscription(groupID: ApplicationModel.subscriptionGroupID) } } diff --git a/Symbolic/Views/ContentView.swift b/Symbolic/Views/ContentView.swift index 8e57349ebc..e91a35e0f8 100644 --- a/Symbolic/Views/ContentView.swift +++ b/Symbolic/Views/ContentView.swift @@ -19,7 +19,6 @@ // SOFTWARE. import Combine -import StoreKit import SwiftUI import Interact @@ -58,11 +57,6 @@ struct ContentView: View { } .padding() } - .safeAreaInset(edge: .top) { - if !isSubscribed { - SubscriptionBanner(sceneModel: sceneModel) - } - } .background(Color(nsColor: .textBackgroundColor)) .frame(maxWidth: .infinity, minHeight: 400) .cacheVectorGraphics(true) @@ -79,13 +73,6 @@ struct ContentView: View { url in sceneModel.export(destination: url) } - .sheet(isPresented: $sceneModel.showSubscriptionsView) { - SubscriptionStoreView(groupID: ApplicationModel.subscriptionGroupID) - .frame(width: 500, height: 600) - .onInAppPurchaseCompletion { product, result in - sceneModel.dismissSubscriptions() - } - } .alert("Export Icon?", isPresented: $sceneModel.showExportWarning, presenting: "Export") { text in Button("Export") { sceneModel.continueExport() @@ -108,9 +95,6 @@ struct ContentView: View { } .environmentObject(sceneModel) .runs(sceneModel) - .subscriptionStatus(for: ApplicationModel.subscriptionGroupID) { isSubscribed in - self.isSubscribed = isSubscribed - } } } diff --git a/Symbolic/Views/SubscriptionBanner.swift b/Symbolic/Views/SubscriptionBanner.swift deleted file mode 100644 index 3485ec2198..0000000000 --- a/Symbolic/Views/SubscriptionBanner.swift +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2022-2024 Jason Morley -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -import SwiftUI - -struct SubscriptionBanner: View { - - @ObservedObject var sceneModel: SceneModel - - var body: some View { - VStack(spacing: 0) { - HStack { - Text("Subscribe to Symbolic for tvOS, visionOS, and exports...") - Spacer() - Button { - sceneModel.showSubscriptions() - } label: { - Text("Subscribe") - } - } - .padding() - .background(.yellow) - Divider() - } - .foregroundColor(.black) - - } - -}