Skip to content

Commit

Permalink
fix: Remove subscriptions (#238)
Browse files Browse the repository at this point in the history
This change removes all the infrastructure for accepting and requiring
subscriptions. They might come back again in the future as an
alternative to GitHub Sponsorship but the focus is on open source for
the time being.
  • Loading branch information
jbmorley authored Sep 27, 2024
1 parent 7957307 commit 0ae68aa
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 406 deletions.
49 changes: 14 additions & 35 deletions Symbolic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objectVersion = 60;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -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 */; };
Expand Down Expand Up @@ -134,7 +129,6 @@
D84B5D70296C52BE005E6C59 /* EditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorView.swift; sourceTree = "<group>"; };
D84B5D73296C5540005E6C59 /* Template.symbolic */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Template.symbolic; sourceTree = "<group>"; };
D857297B296C176C0037E58F /* SymbolPickerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolPickerCell.swift; sourceTree = "<group>"; };
D864A2382965999C008A4261 /* dependencies/interact */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = dependencies/interact; sourceTree = "<group>"; };
D864A23B2965E239008A4261 /* MacIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacIconView.swift; sourceTree = "<group>"; };
D8685CFE298D17A200A7DA60 /* NSApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSApplication.swift; sourceTree = "<group>"; };
D86B0ECE291BEF7400352367 /* IconDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconDocument.swift; sourceTree = "<group>"; };
Expand All @@ -144,12 +138,6 @@
D88661A2297AC893001E41DD /* InfoLabeledContentStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoLabeledContentStyle.swift; sourceTree = "<group>"; };
D88661A4297AD82A001E41DD /* ConditionalLink.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConditionalLink.swift; sourceTree = "<group>"; };
D89A7404297C9BDE00F632ED /* SavePanel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SavePanel.swift; sourceTree = "<group>"; };
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 = "<group>"; };
D89C5E272B883DE70022061B /* SubscriptionCommands.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionCommands.swift; sourceTree = "<group>"; };
D89C5E292B883E7D0022061B /* SubscriptionBanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionBanner.swift; sourceTree = "<group>"; };
D89C5E2B2B883F510022061B /* RequiresSubscription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequiresSubscription.swift; sourceTree = "<group>"; };
D89C5E2D2B8840100022061B /* ValidationResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValidationResult.swift; sourceTree = "<group>"; };
D8B0B1F0296CD4AB00F907BE /* OffsetGuide.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffsetGuide.swift; sourceTree = "<group>"; };
D8B61307293BB81100F29E0C /* AboutCommands.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutCommands.swift; sourceTree = "<group>"; };
D8B61309293BB98100F29E0C /* ApplicationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -188,7 +176,6 @@
D8E4C3C02979809D00A25DF9 /* LibraryInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryInfoView.swift; sourceTree = "<group>"; };
D8F6317328AC7D7A00DFEED0 /* SFSymbols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SFSymbols.swift; sourceTree = "<group>"; };
D8F6317528AC85C600DFEED0 /* SymbolPickerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolPickerModel.swift; sourceTree = "<group>"; };
D8F99EC028B138FE007C3868 /* dependencies/diligence */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = dependencies/diligence; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -199,7 +186,6 @@
D831DD1C297319FC00C20B11 /* SwiftDraw in Frameworks */,
D864A23A2965A2D1008A4261 /* Interact in Frameworks */,
D8F99EC628B13998007C3868 /* Diligence in Frameworks */,
D89C5E252B87F2D40022061B /* StoreKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -230,7 +216,6 @@
D821B9E928ACDBF700504AA4 /* String.swift */,
D86B0ED0291BEFC100352367 /* UTType.swift */,
D821B9DF28ACDB6000504AA4 /* View.swift */,
D89C5E2D2B8840100022061B /* ValidationResult.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -279,7 +264,6 @@
D83970E628B132C700282EE8 /* UnityScaleWindow.swift */,
D826B5C3296B054000693D27 /* WatchGridView.swift */,
D8B7677A298A6E4F00E99C6A /* PositionOffsetSlider.swift */,
D89C5E292B883E7D0022061B /* SubscriptionBanner.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -325,7 +309,6 @@
children = (
D8B61307293BB81100F29E0C /* AboutCommands.swift */,
D826B5C8296B13CB00693D27 /* ExportCommands.swift */,
D89C5E272B883DE70022061B /* SubscriptionCommands.swift */,
D826B5CA296B243800693D27 /* ViewCommands.swift */,
);
path = Commands;
Expand All @@ -338,7 +321,6 @@
D88661A4297AD82A001E41DD /* ConditionalLink.swift */,
D857297B296C176C0037E58F /* SymbolPickerCell.swift */,
D870818F297C6121007CAE83 /* SavePanel.swift */,
D89C5E2B2B883F510022061B /* RequiresSubscription.swift */,
);
path = Modifiers;
sourceTree = "<group>";
Expand All @@ -364,7 +346,6 @@
D8CD4A7128AC35C300D57F34 = {
isa = PBXGroup;
children = (
D8F99EBF28B138FE007C3868 /* Packages */,
D8CD4A7C28AC35C300D57F34 /* Symbolic */,
D8CD4A8E28AC35C600D57F34 /* SymbolicTests */,
D8CD4A9828AC35C600D57F34 /* SymbolicUITests */,
Expand All @@ -388,7 +369,6 @@
children = (
D8CD4A8628AC35C600D57F34 /* Symbolic.entitlements */,
D83970E328B0B61700282EE8 /* Info.plist */,
D89C5E262B87F6550022061B /* Symbolic.storekit */,
D8CD4A7D28AC35C300D57F34 /* SymbolicApp.swift */,
D8CD4A8128AC35C600D57F34 /* Assets.xcassets */,
D8B61306293BB7FF00F29E0C /* Commands */,
Expand Down Expand Up @@ -444,15 +424,6 @@
path = Toolbars;
sourceTree = "<group>";
};
D8F99EBF28B138FE007C3868 /* Packages */ = {
isa = PBXGroup;
children = (
D8F99EC028B138FE007C3868 /* dependencies/diligence */,
D864A2382965999C008A4261 /* dependencies/interact */,
);
name = Packages;
sourceTree = "<group>";
};
D8F99EC128B13946007C3868 /* Licenses */ = {
isa = PBXGroup;
children = (
Expand All @@ -465,7 +436,6 @@
D8F99EC428B13998007C3868 /* Frameworks */ = {
isa = PBXGroup;
children = (
D89C5E242B87F2D40022061B /* StoreKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -565,6 +535,8 @@
mainGroup = D8CD4A7128AC35C300D57F34;
packageReferences = (
D831DD1A297319FC00C20B11 /* XCRemoteSwiftPackageReference "SwiftDraw" */,
D8F6ADD02CA74B0E0078416B /* XCLocalSwiftPackageReference "dependencies/diligence" */,
D8F6ADD12CA74B230078416B /* XCLocalSwiftPackageReference "dependencies/interact" */,
);
productRefGroup = D8CD4A7B28AC35C300D57F34 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -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 */,
Expand All @@ -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 */,
Expand All @@ -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 */,
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Symbolic/Commands/ExportCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ struct ExportCommands: Commands {
sceneModel?.export()
}
.disabled(sceneModel == nil)
.requiresSubscription(groupID: ApplicationModel.subscriptionGroupID)
.keyboardShortcut("e")
}
}
Expand Down
49 changes: 0 additions & 49 deletions Symbolic/Commands/SubscriptionCommands.swift

This file was deleted.

43 changes: 0 additions & 43 deletions Symbolic/Extensions/ValidationResult.swift

This file was deleted.

11 changes: 0 additions & 11 deletions Symbolic/Extensions/View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

}
2 changes: 0 additions & 2 deletions Symbolic/Models/ApplicationModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [
Expand Down
22 changes: 0 additions & 22 deletions Symbolic/Models/SceneModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// SOFTWARE.

import Combine
import StoreKit
import SwiftUI

import Interact
Expand All @@ -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<AnyCancellable> = []
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 0ae68aa

Please sign in to comment.