feat: tip IAP, commercial GitHub Pages, and App Store screenshots

Add optional StoreKit support tip (features stay free), redesign the
landing page with zh/en + light/dark and product shots, and ship
iPhone/iPad/Mac App Store screenshot sets.
This commit is contained in:
Rocky
2026-07-12 11:00:57 +08:00
parent 951e9514d7
commit 166019b384
51 changed files with 1938 additions and 518 deletions
+39
View File
@@ -0,0 +1,39 @@
// TipProductTests.swift
// OSGKeyboardTests
//
// Locks tip product identifiers and optional support-count persistence.
import XCTest
@testable import OSGKeyboardShared
final class TipProductTests: XCTestCase {
private var suiteName: String!
private var defaults: UserDefaults!
override func setUp() {
super.setUp()
suiteName = "tip.tests.\(UUID().uuidString)"
defaults = UserDefaults(suiteName: suiteName)!
defaults.removePersistentDomain(forName: suiteName)
}
override func tearDown() {
defaults.removePersistentDomain(forName: suiteName)
defaults = nil
super.tearDown()
}
func testSupportProductIDIsStable() {
XCTAssertEqual(TipProduct.supportID, "ByRockyACoffee")
XCTAssertEqual(TipProduct.allProductIDs, [TipProduct.supportID])
}
func testSupportCountDefaultsKeyIsStable() {
XCTAssertEqual(TipProduct.supportCountDefaultsKey, "tipSupportPurchaseCount")
}
func testSupportCountPersistsInUserDefaults() {
defaults.set(2, forKey: TipProduct.supportCountDefaultsKey)
XCTAssertEqual(defaults.integer(forKey: TipProduct.supportCountDefaultsKey), 2)
}
}