Skip to content

Commit

Permalink
Request review after purchase
Browse files Browse the repository at this point in the history
  • Loading branch information
tobihagemann committed Nov 30, 2024
1 parent c9d32d6 commit 68bc598
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Cryptomator/MainCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import CryptomatorCommonCore
import Promises
import StoreKit
import UIKit

class MainCoordinator: NSObject, Coordinator, UINavigationControllerDelegate {
Expand Down Expand Up @@ -137,7 +138,11 @@ extension MainCoordinator: StoreObserverDelegate {
guard let navigationController = self?.navigationController else {
return
}
_ = PurchaseAlert.showForFullVersion(title: LocalizedString.getValue("purchase.unlockedFullVersion.title"), on: navigationController)
PurchaseAlert.showForFullVersion(title: LocalizedString.getValue("purchase.unlockedFullVersion.title"), on: navigationController).then {
if let windowScene = navigationController.view.window?.windowScene {
SKStoreReviewController.requestReview(in: windowScene)
}
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions Cryptomator/Purchase/PurchaseCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class PurchaseCoordinator: Coordinator {

func fullVersionPurchased() {
PurchaseAlert.showForFullVersion(title: LocalizedString.getValue("purchase.unlockedFullVersion.title"), on: navigationController).then {
if let windowScene = self.navigationController.view.window?.windowScene {
SKStoreReviewController.requestReview(in: windowScene)
}
self.unlockedPro()
}
// Temporarily added for December 2024 Sale
Expand Down

0 comments on commit 68bc598

Please sign in to comment.