forked from organicmaps/organicmaps
[iOS] Removed in-app purchase.
Signed-off-by: Viktar Havaka viktor.govako@gmail.com
This commit is contained in:
parent
39c1c0955c
commit
77a32f2717
8 changed files with 21 additions and 319 deletions
|
@ -224,7 +224,7 @@ final class CatalogWebViewController: WebViewController {
|
|||
}
|
||||
|
||||
private func buildHeaders(completion: @escaping ([String: String]?) -> Void) {
|
||||
billing.requestProducts(Set(MWMPurchaseManager.bookmarkInappIds()), completion: { products, error in
|
||||
billing?.requestProducts(Set(MWMPurchaseManager.bookmarkInappIds()), completion: { products, error in
|
||||
var productsInfo: [String: [String: String]] = [:]
|
||||
if let products = products {
|
||||
let formatter = NumberFormatter()
|
||||
|
@ -250,7 +250,7 @@ final class CatalogWebViewController: WebViewController {
|
|||
}
|
||||
|
||||
private func handlePendingTransactions(completion: @escaping (Bool) -> Void) {
|
||||
pendingTransactionsHandler.handlePendingTransactions { [weak self] status in
|
||||
pendingTransactionsHandler?.handlePendingTransactions { [weak self] status in
|
||||
switch status {
|
||||
case .none:
|
||||
fallthrough
|
||||
|
@ -368,29 +368,6 @@ final class CatalogWebViewController: WebViewController {
|
|||
}
|
||||
|
||||
private func showPaymentScreen(_ productInfo: CatalogCategoryInfo) {
|
||||
guard let productId = productInfo.productId else {
|
||||
MWMAlertViewController.activeAlert().presentInfoAlert(L("title_error_downloading_bookmarks"),
|
||||
text: L("subtitle_error_downloading_guide"))
|
||||
return
|
||||
}
|
||||
|
||||
let purchase = InAppPurchase.paidRoutePurchase(serverId: productInfo.id,
|
||||
productId: productId)
|
||||
let testGroup = ABTestManager.manager().paidRoutesSubscriptionCampaign.testGroupStatName
|
||||
let stats = InAppPurchase.paidRouteStatistics(serverId: productInfo.id,
|
||||
productId: productId,
|
||||
testGroup: testGroup,
|
||||
source: kStatWebView)
|
||||
let paymentVC = PaidRouteViewController(name: productInfo.name,
|
||||
author: productInfo.author,
|
||||
imageUrl: URL(string: productInfo.imageUrl ?? ""),
|
||||
subscriptionType: productInfo.subscriptionType,
|
||||
purchase: purchase,
|
||||
statistics: stats)
|
||||
paymentVC.delegate = self
|
||||
paymentVC.modalTransitionStyle = .coverVertical
|
||||
paymentVC.modalPresentationStyle = .fullScreen
|
||||
navigationController?.present(paymentVC, animated: true)
|
||||
}
|
||||
|
||||
private func showSubscriptionScreen(_ productInfo: CatalogCategoryInfo) {
|
||||
|
|
|
@ -28,7 +28,7 @@ class PaidRouteViewController: MWMViewController {
|
|||
|
||||
private var product: IStoreProduct?
|
||||
private var subscription: ISubscription?
|
||||
private let subscriptionManager: ISubscriptionManager
|
||||
private let subscriptionManager: ISubscriptionManager? = nil
|
||||
private let subscriptionType: SubscriptionGroupType
|
||||
private let paidRoutesSubscriptionCampaign = ABTestManager.manager().paidRoutesSubscriptionCampaign
|
||||
|
||||
|
@ -46,15 +46,9 @@ class PaidRouteViewController: MWMViewController {
|
|||
self.purchase = purchase
|
||||
self.statistics = statistics
|
||||
self.subscriptionType = subscriptionType
|
||||
switch subscriptionType {
|
||||
case .city:
|
||||
subscriptionManager = InAppPurchase.bookmarksSubscriptionManager
|
||||
case .allPass:
|
||||
subscriptionManager = InAppPurchase.allPassSubscriptionManager
|
||||
}
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
if paidRoutesSubscriptionCampaign.actionType == .instant {
|
||||
subscriptionManager.addListener(self)
|
||||
subscriptionManager?.addListener(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +58,7 @@ class PaidRouteViewController: MWMViewController {
|
|||
|
||||
deinit {
|
||||
if paidRoutesSubscriptionCampaign.actionType == .instant {
|
||||
subscriptionManager.removeListener(self)
|
||||
subscriptionManager?.removeListener(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +82,7 @@ class PaidRouteViewController: MWMViewController {
|
|||
}
|
||||
|
||||
dispatchGroup.enter()
|
||||
subscriptionManager.getAvailableSubscriptions { s, error in
|
||||
subscriptionManager?.getAvailableSubscriptions { s, error in
|
||||
subscriptions = s
|
||||
dispatchGroup.leave()
|
||||
}
|
||||
|
@ -127,12 +121,6 @@ class PaidRouteViewController: MWMViewController {
|
|||
self?.subscribeButton.setTitle(title, for: .normal)
|
||||
self?.subscribeButton.isEnabled = true
|
||||
self?.subscription = subscriptionItem.subscription
|
||||
Statistics.logEvent(kStatInappShow, withParameters: [kStatVendor: self?.subscriptionManager.vendorId ?? "",
|
||||
kStatProduct: subscriptionItem.productId,
|
||||
kStatPurchase: self?.subscriptionManager.serverId ?? "",
|
||||
kStatTestGroup: self?.paidRoutesSubscriptionCampaign.testGroupStatName ?? "",
|
||||
kStatInappTrial: false],
|
||||
with: .realtime)
|
||||
}
|
||||
|
||||
statistics.logPreviewShow()
|
||||
|
@ -238,13 +226,7 @@ class PaidRouteViewController: MWMViewController {
|
|||
return
|
||||
}
|
||||
|
||||
Statistics.logEvent(kStatInappSelect, withParameters: [kStatProduct: subscription.productId,
|
||||
kStatPurchase: self?.subscriptionManager.serverId ?? "",
|
||||
kStatInappTrial: false])
|
||||
Statistics.logEvent(kStatInappPay, withParameters: [kStatPurchase: self?.subscriptionManager.serverId ?? "",
|
||||
kStatInappTrial: false],
|
||||
with: .realtime)
|
||||
self?.subscriptionManager.subscribe(to: subscription)
|
||||
self?.subscriptionManager?.subscribe(to: subscription)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,7 +244,6 @@ class PaidRouteViewController: MWMViewController {
|
|||
|
||||
@IBAction func onCancel(_ sender: UIButton) {
|
||||
statistics.logCancel()
|
||||
Statistics.logEvent(kStatInappCancel, withParameters: [kStatPurchase: subscriptionManager.serverId])
|
||||
delegate?.didCancelPurchase(self)
|
||||
}
|
||||
|
||||
|
@ -307,7 +288,7 @@ extension PaidRouteViewController: SubscriptionManagerListener {
|
|||
}
|
||||
|
||||
func didSubscribe(_ subscription: ISubscription) {
|
||||
subscriptionManager.setSubscriptionActive(true, isTrial: false)
|
||||
subscriptionManager?.setSubscriptionActive(true, isTrial: false)
|
||||
BookmarksManager.shared().resetExpiredCategories()
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
@objc
|
||||
final class InAppPurchase: NSObject {
|
||||
static func paidRoutePurchase(serverId: String,
|
||||
productId: String) -> IPaidRoutePurchase {
|
||||
let validation = MWMPurchaseValidation(vendorId: BOOKMARKS_VENDOR)
|
||||
let billing = InAppBilling()
|
||||
return PaidRoutePurchase(serverId: serverId,
|
||||
vendorId: BOOKMARKS_VENDOR,
|
||||
productId: productId,
|
||||
purchaseValidation: validation,
|
||||
billing: billing)
|
||||
productId: String) -> IPaidRoutePurchase? {
|
||||
return nil
|
||||
}
|
||||
|
||||
static func paidRouteStatistics(serverId: String,
|
||||
|
@ -23,31 +17,17 @@ final class InAppPurchase: NSObject {
|
|||
}
|
||||
|
||||
@objc
|
||||
static func pendingTransactionsHandler() -> IPendingTransactionsHandler {
|
||||
let validation = MWMPurchaseValidation(vendorId: BOOKMARKS_VENDOR)
|
||||
let pendingTransaction = BillingPendingTransaction()
|
||||
return PendingTransactionsHandler(validation: validation, pendingTransaction: pendingTransaction)
|
||||
static func pendingTransactionsHandler() -> IPendingTransactionsHandler? {
|
||||
return nil
|
||||
}
|
||||
|
||||
static func inAppBilling() -> IInAppBilling {
|
||||
return InAppBilling()
|
||||
static func inAppBilling() -> IInAppBilling? {
|
||||
return nil
|
||||
}
|
||||
|
||||
@objc static var adsRemovalSubscriptionManager: ISubscriptionManager = {
|
||||
SubscriptionManager(productIds: MWMPurchaseManager.productIds(),
|
||||
serverId: MWMPurchaseManager.adsRemovalServerId(),
|
||||
vendorId: MWMPurchaseManager.adsRemovalVendorId())
|
||||
}()
|
||||
@objc static var adsRemovalSubscriptionManager: ISubscriptionManager? = nil
|
||||
|
||||
@objc static var bookmarksSubscriptionManager: ISubscriptionManager = {
|
||||
SubscriptionManager(productIds: MWMPurchaseManager.bookmakrsProductIds(),
|
||||
serverId: MWMPurchaseManager.bookmarksSubscriptionServerId(),
|
||||
vendorId: MWMPurchaseManager.bookmarksSubscriptionVendorId())
|
||||
}()
|
||||
@objc static var bookmarksSubscriptionManager: ISubscriptionManager? = nil
|
||||
|
||||
@objc static var allPassSubscriptionManager: ISubscriptionManager = {
|
||||
SubscriptionManager(productIds: MWMPurchaseManager.allPassProductIds(),
|
||||
serverId: MWMPurchaseManager.allPassSubscriptionServerId(),
|
||||
vendorId: MWMPurchaseManager.allPassSubscriptionVendorId())
|
||||
}()
|
||||
@objc static var allPassSubscriptionManager: ISubscriptionManager? = nil
|
||||
}
|
||||
|
|
|
@ -11,26 +11,3 @@
|
|||
var priceLocale: Locale? { get }
|
||||
var period: SubscriptionPeriod { get }
|
||||
}
|
||||
|
||||
class Subscription: ISubscription {
|
||||
public static let productIds = MWMPurchaseManager.productIds() + MWMPurchaseManager.bookmakrsProductIds() + MWMPurchaseManager.allPassProductIds()
|
||||
public static let legacyProductIds = MWMPurchaseManager.legacyProductIds()
|
||||
private static let periodMap: [String: SubscriptionPeriod] = [productIds[0]: .year,
|
||||
productIds[1]: .month,
|
||||
productIds[2]: .week,
|
||||
productIds[3]: .year,
|
||||
productIds[4]: .month,
|
||||
productIds[5]: .year,
|
||||
productIds[6]: .month]
|
||||
var productId: String
|
||||
var period: SubscriptionPeriod
|
||||
var price: NSDecimalNumber
|
||||
var priceLocale: Locale?
|
||||
|
||||
init(_ product: SKProduct) {
|
||||
productId = product.productIdentifier
|
||||
period = Subscription.periodMap[productId] ?? .unknown
|
||||
price = product.price
|
||||
priceLocale = product.priceLocale
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,208 +26,3 @@
|
|||
func didFailToValidate()
|
||||
func didValidate(_ isValid: Bool)
|
||||
}
|
||||
|
||||
class SubscriptionManager: NSObject, ISubscriptionManager {
|
||||
private let paymentQueue = SKPaymentQueue.default()
|
||||
private var productsRequest: SKProductsRequest?
|
||||
private var subscriptionsComplection: SuscriptionsCompletion?
|
||||
private var products: [String: SKProduct]?
|
||||
private var pendingSubscription: ISubscription?
|
||||
private var listeners = NSHashTable<SubscriptionManagerListener>.weakObjects()
|
||||
private var restorationCallback: ValidationCompletion?
|
||||
|
||||
let productIds: [String]
|
||||
let serverId: String
|
||||
let vendorId: String
|
||||
let hasTrial: Bool
|
||||
private var purchaseManager: MWMPurchaseManager?
|
||||
|
||||
init(productIds: [String], serverId: String, vendorId: String) {
|
||||
self.productIds = productIds
|
||||
self.serverId = serverId
|
||||
self.vendorId = vendorId
|
||||
hasTrial = serverId == MWMPurchaseManager.allPassSubscriptionServerId()
|
||||
super.init()
|
||||
paymentQueue.add(self)
|
||||
purchaseManager = MWMPurchaseManager(vendorId: vendorId)
|
||||
}
|
||||
|
||||
deinit {
|
||||
paymentQueue.remove(self)
|
||||
}
|
||||
|
||||
@objc static func canMakePayments() -> Bool {
|
||||
return SKPaymentQueue.canMakePayments()
|
||||
}
|
||||
|
||||
@objc func getAvailableSubscriptions(_ completion: @escaping SuscriptionsCompletion) {
|
||||
subscriptionsComplection = completion
|
||||
productsRequest = SKProductsRequest(productIdentifiers: Set(productIds))
|
||||
productsRequest!.delegate = self
|
||||
productsRequest!.start()
|
||||
}
|
||||
|
||||
@objc func subscribe(to subscription: ISubscription) {
|
||||
pendingSubscription = subscription
|
||||
guard let product = products?[subscription.productId] else { return }
|
||||
paymentQueue.add(SKPayment(product: product))
|
||||
}
|
||||
|
||||
@objc func addListener(_ listener: SubscriptionManagerListener) {
|
||||
listeners.add(listener)
|
||||
}
|
||||
|
||||
@objc func removeListener(_ listener: SubscriptionManagerListener) {
|
||||
listeners.remove(listener)
|
||||
}
|
||||
|
||||
@objc func validate(completion: ValidationCompletion? = nil) {
|
||||
validate(false, completion: completion)
|
||||
}
|
||||
|
||||
@objc func restore(_ callback: @escaping ValidationCompletion) {
|
||||
validate(true) {
|
||||
callback($0, $1)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func setSubscriptionActive(_ value: Bool, isTrial: Bool) {
|
||||
switch serverId {
|
||||
case MWMPurchaseManager.allPassSubscriptionServerId():
|
||||
MWMPurchaseManager.setAllPassSubscriptionActive(value, isTrial: isTrial)
|
||||
case MWMPurchaseManager.bookmarksSubscriptionServerId():
|
||||
MWMPurchaseManager.setBookmarksSubscriptionActive(value)
|
||||
case MWMPurchaseManager.adsRemovalServerId():
|
||||
MWMPurchaseManager.setAdsDisabled(value)
|
||||
default:
|
||||
fatalError()
|
||||
}
|
||||
}
|
||||
|
||||
private func validate(_ refreshReceipt: Bool, completion: ValidationCompletion? = nil) {
|
||||
purchaseManager?.validateReceipt(serverId, refreshReceipt: refreshReceipt) { [weak self] _, validationResult, isTrial in
|
||||
self?.logEvents(validationResult)
|
||||
if validationResult == .valid || validationResult == .notValid {
|
||||
self?.listeners.allObjects.forEach { $0.didValidate(validationResult == .valid) }
|
||||
self?.paymentQueue.transactions
|
||||
.filter { self?.productIds.contains($0.payment.productIdentifier) ?? false &&
|
||||
($0.transactionState == .purchased || $0.transactionState == .restored)
|
||||
}
|
||||
.forEach { self?.paymentQueue.finishTransaction($0) }
|
||||
} else {
|
||||
self?.listeners.allObjects.forEach { $0.didFailToValidate() }
|
||||
}
|
||||
completion?(validationResult, isTrial)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func checkTrialEligibility(completion: TrialEligibilityCompletion?) {
|
||||
purchaseManager?.checkTrialEligibility(serverId, refreshReceipt: true, callback: { _, result in
|
||||
completion?(result)
|
||||
})
|
||||
}
|
||||
|
||||
private func logEvents(_ validationResult: MWMValidationResult) {
|
||||
switch validationResult {
|
||||
case .valid:
|
||||
Statistics.logEvent(kStatInappValidationSuccess, withParameters: [kStatPurchase: serverId])
|
||||
Statistics.logEvent(kStatInappProductDelivered,
|
||||
withParameters: [kStatVendor: vendorId, kStatPurchase: serverId], with: .realtime)
|
||||
case .notValid:
|
||||
Statistics.logEvent(kStatInappValidationError, withParameters: [kStatErrorCode: 0, kStatPurchase: serverId])
|
||||
case .serverError:
|
||||
Statistics.logEvent(kStatInappValidationError, withParameters: [kStatErrorCode: 2, kStatPurchase: serverId])
|
||||
case .authError:
|
||||
Statistics.logEvent(kStatInappValidationError, withParameters: [kStatErrorCode: 1, kStatPurchase: serverId])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension SubscriptionManager: SKProductsRequestDelegate {
|
||||
func request(_ request: SKRequest, didFailWithError error: Error) {
|
||||
Statistics.logEvent(kStatInappPaymentError,
|
||||
withParameters: [kStatError: error.localizedDescription, kStatPurchase: serverId])
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.subscriptionsComplection?(nil, error)
|
||||
self?.subscriptionsComplection = nil
|
||||
self?.productsRequest = nil
|
||||
}
|
||||
}
|
||||
|
||||
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
|
||||
guard response.products.count == productIds.count else {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.subscriptionsComplection?(nil, NSError(domain: "mapsme.subscriptions", code: -1, userInfo: nil))
|
||||
self?.subscriptionsComplection = nil
|
||||
self?.productsRequest = nil
|
||||
}
|
||||
return
|
||||
}
|
||||
let subscriptions = response.products.map { Subscription($0) }
|
||||
.sorted { $0.period.rawValue < $1.period.rawValue }
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.products = Dictionary(uniqueKeysWithValues: response.products.map { ($0.productIdentifier, $0) })
|
||||
self?.subscriptionsComplection?(subscriptions, nil)
|
||||
self?.subscriptionsComplection = nil
|
||||
self?.productsRequest = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension SubscriptionManager: SKPaymentTransactionObserver {
|
||||
func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
|
||||
let subscriptionTransactions = transactions.filter {
|
||||
productIds.contains($0.payment.productIdentifier)
|
||||
}
|
||||
subscriptionTransactions
|
||||
.filter { $0.transactionState == .failed }
|
||||
.forEach { processFailed($0, error: $0.error) }
|
||||
|
||||
if subscriptionTransactions.contains(where: {
|
||||
$0.transactionState == .purchased || $0.transactionState == .restored
|
||||
}) {
|
||||
subscriptionTransactions
|
||||
.filter { $0.transactionState == .purchased }
|
||||
.forEach { processPurchased($0) }
|
||||
subscriptionTransactions
|
||||
.filter { $0.transactionState == .restored }
|
||||
.forEach { processRestored($0) }
|
||||
validate(false)
|
||||
}
|
||||
|
||||
subscriptionTransactions
|
||||
.filter { $0.transactionState == .deferred }
|
||||
.forEach { processDeferred($0) }
|
||||
}
|
||||
|
||||
private func processDeferred(_ transaction: SKPaymentTransaction) {
|
||||
if let ps = pendingSubscription, transaction.payment.productIdentifier == ps.productId {
|
||||
listeners.allObjects.forEach { $0.didDefer(ps) }
|
||||
}
|
||||
}
|
||||
|
||||
private func processPurchased(_ transaction: SKPaymentTransaction) {
|
||||
paymentQueue.finishTransaction(transaction)
|
||||
if let ps = pendingSubscription, transaction.payment.productIdentifier == ps.productId {
|
||||
Statistics.logEvent(kStatInappPaymentSuccess, withParameters: [kStatPurchase: serverId])
|
||||
listeners.allObjects.forEach { $0.didSubscribe(ps) }
|
||||
}
|
||||
}
|
||||
|
||||
private func processRestored(_ transaction: SKPaymentTransaction) {
|
||||
paymentQueue.finishTransaction(transaction)
|
||||
if let ps = pendingSubscription, transaction.payment.productIdentifier == ps.productId {
|
||||
listeners.allObjects.forEach { $0.didSubscribe(ps) }
|
||||
}
|
||||
}
|
||||
|
||||
private func processFailed(_ transaction: SKPaymentTransaction, error: Error?) {
|
||||
paymentQueue.finishTransaction(transaction)
|
||||
if let ps = pendingSubscription, transaction.payment.productIdentifier == ps.productId {
|
||||
let errorText = error?.localizedDescription ?? ""
|
||||
Statistics.logEvent(kStatInappPaymentError,
|
||||
withParameters: [kStatPurchase: serverId, kStatError: errorText])
|
||||
listeners.allObjects.forEach { $0.didFailToSubscribe(ps, error: error) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -311,7 +311,6 @@
|
|||
4715273524907F8200E91BBA /* BookmarkColorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4715273424907F8200E91BBA /* BookmarkColorViewController.swift */; };
|
||||
471527372491C20500E91BBA /* SelectBookmarkGroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 471527362491C20500E91BBA /* SelectBookmarkGroupViewController.swift */; };
|
||||
4716EABA21A325310029B886 /* IPaidRouteStatistics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4716EAB921A325310029B886 /* IPaidRouteStatistics.swift */; };
|
||||
4719A643219CB61D009F9AA7 /* BillingPendingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4719A642219CB61D009F9AA7 /* BillingPendingTransaction.swift */; };
|
||||
4719A645219CBD65009F9AA7 /* IPendingTransactionsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4719A644219CBD65009F9AA7 /* IPendingTransactionsHandler.swift */; };
|
||||
4719A647219CBD7F009F9AA7 /* IBillingPendingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4719A646219CBD7F009F9AA7 /* IBillingPendingTransaction.swift */; };
|
||||
4719A64E21A30C3B009F9AA7 /* PaidRouteStatistics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4719A64D21A30C3B009F9AA7 /* PaidRouteStatistics.swift */; };
|
||||
|
@ -384,7 +383,6 @@
|
|||
47B9065321C7FA400079C85E /* MWMImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 47B9064A21C7FA3C0079C85E /* MWMImageCache.m */; };
|
||||
47B9065421C7FA400079C85E /* UIImageView+WebImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 47B9064F21C7FA3E0079C85E /* UIImageView+WebImage.m */; };
|
||||
47B9065521C7FA400079C85E /* NSString+MD5.m in Sources */ = {isa = PBXBuildFile; fileRef = 47B9065021C7FA3F0079C85E /* NSString+MD5.m */; };
|
||||
47C7F9732191E15A00C2760C /* InAppBilling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C7F9722191E15A00C2760C /* InAppBilling.swift */; };
|
||||
47C7F97521930F5300C2760C /* IInAppBilling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C7F97421930F5300C2760C /* IInAppBilling.swift */; };
|
||||
47C8789022DF525A00A772DA /* SubscriptionSuccessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C8788E22DF525A00A772DA /* SubscriptionSuccessViewController.swift */; };
|
||||
47C8789122DF525A00A772DA /* SubscriptionSuccessViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47C8788F22DF525A00A772DA /* SubscriptionSuccessViewController.xib */; };
|
||||
|
@ -1431,7 +1429,6 @@
|
|||
471527362491C20500E91BBA /* SelectBookmarkGroupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectBookmarkGroupViewController.swift; sourceTree = "<group>"; };
|
||||
4716EAB921A325310029B886 /* IPaidRouteStatistics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPaidRouteStatistics.swift; sourceTree = "<group>"; };
|
||||
4716EACA21B01C270029B886 /* MWMUGCReviewSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMUGCReviewSource.h; sourceTree = "<group>"; };
|
||||
4719A642219CB61D009F9AA7 /* BillingPendingTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BillingPendingTransaction.swift; sourceTree = "<group>"; };
|
||||
4719A644219CBD65009F9AA7 /* IPendingTransactionsHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPendingTransactionsHandler.swift; sourceTree = "<group>"; };
|
||||
4719A646219CBD7F009F9AA7 /* IBillingPendingTransaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IBillingPendingTransaction.swift; sourceTree = "<group>"; };
|
||||
4719A64D21A30C3B009F9AA7 /* PaidRouteStatistics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaidRouteStatistics.swift; sourceTree = "<group>"; };
|
||||
|
@ -1516,7 +1513,6 @@
|
|||
47B9064F21C7FA3E0079C85E /* UIImageView+WebImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+WebImage.m"; sourceTree = "<group>"; };
|
||||
47B9065021C7FA3F0079C85E /* NSString+MD5.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MD5.m"; sourceTree = "<group>"; };
|
||||
47B9065121C7FA400079C85E /* IMWMImageCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMWMImageCache.h; sourceTree = "<group>"; };
|
||||
47C7F9722191E15A00C2760C /* InAppBilling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InAppBilling.swift; sourceTree = "<group>"; };
|
||||
47C7F97421930F5300C2760C /* IInAppBilling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IInAppBilling.swift; sourceTree = "<group>"; };
|
||||
47C8788E22DF525A00A772DA /* SubscriptionSuccessViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionSuccessViewController.swift; sourceTree = "<group>"; };
|
||||
47C8788F22DF525A00A772DA /* SubscriptionSuccessViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SubscriptionSuccessViewController.xib; sourceTree = "<group>"; };
|
||||
|
@ -3378,8 +3374,6 @@
|
|||
4719A648219CBD9E009F9AA7 /* Impl */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4719A642219CB61D009F9AA7 /* BillingPendingTransaction.swift */,
|
||||
47C7F9722191E15A00C2760C /* InAppBilling.swift */,
|
||||
470F5A7C2189BB2F00754295 /* PaidRoutePurchase.swift */,
|
||||
47D0026621999DA900F651A2 /* PendingTransactionsHandler.swift */,
|
||||
4719A64D21A30C3B009F9AA7 /* PaidRouteStatistics.swift */,
|
||||
|
@ -5633,7 +5627,6 @@
|
|||
47B06DF021B697230094CCAD /* MWMGeoTrackerCore.mm in Sources */,
|
||||
99B6A74C2362F5AA002C94CB /* PromoButton.swift in Sources */,
|
||||
99F3EB1123F418C900C713F8 /* PlacePageBuilder.swift in Sources */,
|
||||
4719A643219CB61D009F9AA7 /* BillingPendingTransaction.swift in Sources */,
|
||||
4735008A23A83CF700661A95 /* DownloadedMapsDataSource.swift in Sources */,
|
||||
CD9AD96F2281DF3600EC174A /* CategoryInfo.swift in Sources */,
|
||||
3DEE1AEB21F72CD300054A91 /* MWMPowerManagmentViewController.mm in Sources */,
|
||||
|
@ -5952,7 +5945,6 @@
|
|||
F5BD29FF26AD58255766C51A /* DiscoverySpinnerCell.swift in Sources */,
|
||||
47E3C72B2111E62A008B3B27 /* FadeOutAnimatedTransitioning.swift in Sources */,
|
||||
F5BD255A0838E70EC012748E /* DiscoverySearchCell.swift in Sources */,
|
||||
47C7F9732191E15A00C2760C /* InAppBilling.swift in Sources */,
|
||||
F5BD2CA4DBEFACBC48195F39 /* DiscoveryCollectionHolderCell.swift in Sources */,
|
||||
4796037524482E3900F3BDD0 /* KeychainStorage.swift in Sources */,
|
||||
471A7BC4248471BE00A0D4C1 /* BookmarkUIUtils.swift in Sources */,
|
||||
|
|
|
@ -12,12 +12,12 @@ class AllPassSubscriptionBuilder {
|
|||
subscriptionGroupType: subscriptionGroupType,
|
||||
completion: completion)
|
||||
let interactor = SubscriptionInteractor(viewController: viewController,
|
||||
subscriptionManager: InAppPurchase.allPassSubscriptionManager,
|
||||
subscriptionManager: InAppPurchase.allPassSubscriptionManager!,
|
||||
bookmarksManager: BookmarksManager.shared())
|
||||
let presenter = SubscriptionPresenter(view: viewController,
|
||||
router: router,
|
||||
interactor: interactor,
|
||||
subscriptionManager: InAppPurchase.allPassSubscriptionManager,
|
||||
subscriptionManager: InAppPurchase.allPassSubscriptionManager!,
|
||||
source: source)
|
||||
|
||||
interactor.presenter = presenter
|
||||
|
|
|
@ -11,12 +11,12 @@ class CitySubscriptionBuilder {
|
|||
subscriptionGroupType: subscriptionGroupType,
|
||||
completion: completion)
|
||||
let interactor = SubscriptionInteractor(viewController: viewController,
|
||||
subscriptionManager: InAppPurchase.bookmarksSubscriptionManager,
|
||||
subscriptionManager: InAppPurchase.bookmarksSubscriptionManager!,
|
||||
bookmarksManager: BookmarksManager.shared())
|
||||
let presenter = SubscriptionPresenter(view: viewController,
|
||||
router: router,
|
||||
interactor: interactor,
|
||||
subscriptionManager: InAppPurchase.bookmarksSubscriptionManager,
|
||||
subscriptionManager: InAppPurchase.bookmarksSubscriptionManager!,
|
||||
source: source)
|
||||
|
||||
interactor.presenter = presenter
|
||||
|
|
Loading…
Add table
Reference in a new issue