[iOS] All Pass Subscription screen

https://jira.mail.ru/browse/MAPSME-12083
This commit is contained in:
Alexander Boriskov 2019-10-16 16:03:03 +03:00 committed by Aleksey Belousov
parent 078ae69d08
commit 8e615cde35
45 changed files with 1307 additions and 110 deletions

View file

@ -223,7 +223,7 @@ final class CatalogWebViewController: WebViewController {
subscribeViewController.onSubscribe = { [weak self] in
self?.webView.reloadFromOrigin()
self?.dismiss(animated: true)
let successDialog = BookmarksSubscriptionSuccessViewController { [weak self] in
let successDialog = SubscriptionSuccessViewController { [weak self] in
self?.dismiss(animated: true)
}
self?.present(successDialog, animated: true)

View file

@ -1,4 +1,4 @@
class BookmarksSubscriptionExpiredViewController: UIViewController {
class SubscriptionExpiredViewController: UIViewController {
private let transitioning = FadeTransitioning<AlertPresentationController>(cancellable: false)
private let onSubscribe: MWMVoidBlock
private let onDelete: MWMVoidBlock

View file

@ -1,16 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BookmarksSubscriptionExpiredViewController" customModule="maps_me" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SubscriptionExpiredViewController" customModule="maps_me" customModuleProvider="target">
<connections>
<outlet property="view" destination="Kxh-WQ-Arx" id="tq9-Vt-1LI"/>
</connections>
@ -20,10 +16,10 @@
<rect key="frame" x="0.0" y="0.0" width="284" height="451"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bookmarksSubscriptionFail" translatesAutoresizingMaskIntoConstraints="NO" id="aPq-P8-sA5">
<rect key="frame" x="68.5" y="16" width="147" height="134"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" image="bookmarksSubscriptionFail" translatesAutoresizingMaskIntoConstraints="NO" id="aPq-P8-sA5">
<rect key="frame" x="-5" y="16" width="294" height="134"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your subscription has expired" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D7k-iL-1r7">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Your subscription has expired" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D7k-iL-1r7">
<rect key="frame" x="16" y="166" width="252" height="50.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="21"/>
<nil key="textColor"/>
@ -62,7 +58,7 @@
<action selector="onSubscribe:" destination="-1" eventType="touchUpInside" id="gD5-39-MrO"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="All the guides downloaded by subscription are going to be deleted. Want to resume the subscription and keep them?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CJe-NE-j8c">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="All the guides downloaded by subscription are going to be deleted. Want to resume the subscription and keep them?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CJe-NE-j8c">
<rect key="frame" x="16" y="232.5" width="252" height="67"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.0" alpha="0.39696596750000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

View file

@ -1,4 +1,4 @@
class BookmarksSubscriptionFailViewController: UIViewController {
class SubscriptionFailViewController: UIViewController {
private let transitioning = FadeTransitioning<AlertPresentationController>()
private let onOk: MWMVoidBlock

View file

@ -1,16 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BookmarksSubscriptionFailViewController" customModule="maps_me" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SubscriptionFailViewController" customModule="maps_me" customModuleProvider="target">
<connections>
<outlet property="view" destination="LxW-jP-dXy" id="LjI-6j-3V1"/>
</connections>
@ -20,10 +16,10 @@
<rect key="frame" x="0.0" y="0.0" width="284" height="343"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bookmarksSubscriptionFail" translatesAutoresizingMaskIntoConstraints="NO" id="QsQ-Qr-kgU">
<rect key="frame" x="68.5" y="16" width="147" height="134"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" image="bookmarksSubscriptionFail" translatesAutoresizingMaskIntoConstraints="NO" id="QsQ-Qr-kgU">
<rect key="frame" x="-5" y="16" width="294" height="134"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Purchase has failed" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BQC-4m-6q5">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Purchase has failed" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BQC-4m-6q5">
<rect key="frame" x="16" y="166" width="252" height="25.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="21"/>
<nil key="textColor"/>
@ -62,7 +58,7 @@
<action selector="onOk:" destination="-1" eventType="touchUpInside" id="TOs-X1-qKX"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="The service is currently unavailable in your region. Please try again later." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lrT-fS-BfP">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="The service is currently unavailable in your region. Please try again later." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lrT-fS-BfP">
<rect key="frame" x="16" y="207.5" width="252" height="33.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.0" alpha="0.39696596750000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

View file

@ -1,4 +1,4 @@
@objc class BookmarksSubscriptionGoToCatalogViewController: UIViewController {
@objc class SubscriptionGoToCatalogViewController: UIViewController {
private let transitioning = FadeTransitioning<AlertPresentationController>()
private let onOk: MWMVoidBlock
private let onCancel: MWMVoidBlock

View file

@ -1,16 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BookmarksSubscriptionGoToCatalogViewController" customModule="maps_me" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SubscriptionGoToCatalogViewController" customModule="maps_me" customModuleProvider="target">
<connections>
<outlet property="view" destination="SOP-ru-g5D" id="1nu-A8-eNS"/>
</connections>

View file

@ -1,4 +1,4 @@
class BookmarksSubscriptionSuccessViewController: UIViewController {
class SubscriptionSuccessViewController: UIViewController {
private let transitioning = FadeTransitioning<AlertPresentationController>()
private let onOk: MWMVoidBlock

View file

@ -8,7 +8,7 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BookmarksSubscriptionSuccessViewController" customModule="maps_me" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SubscriptionSuccessViewController" customModule="maps_me" customModuleProvider="target">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>

View file

@ -154,7 +154,7 @@ class PaidRouteViewController: MWMViewController {
pingServer { [weak self] (success) in
guard success else {
self?.loadingView.isHidden = true
let errorDialog = BookmarksSubscriptionFailViewController { [weak self] in
let errorDialog = SubscriptionFailViewController { [weak self] in
self?.dismiss(animated: true)
}
self?.present(errorDialog, animated: true)
@ -200,7 +200,7 @@ class PaidRouteViewController: MWMViewController {
pingServer { [weak self] (success) in
guard success else {
self?.loadingView.isHidden = true
let errorDialog = BookmarksSubscriptionFailViewController { [weak self] in
let errorDialog = SubscriptionFailViewController { [weak self] in
self?.dismiss(animated: true)
}
self?.present(errorDialog, animated: true)
@ -245,7 +245,7 @@ extension PaidRouteViewController : SubscriptionManagerListener {
loadingView.isHidden = true
if (isValid) {
delegate?.didCompleteSubscription(self)
let successDialog = BookmarksSubscriptionSuccessViewController { [weak self] in
let successDialog = SubscriptionSuccessViewController { [weak self] in
self?.dismiss(animated: true)
}
present(successDialog, animated: true)

View file

@ -0,0 +1,280 @@
import UIKit
import SafariServices
class AllPassSubscriptionViewController: UIViewController {
//MARK:outlets
@IBOutlet private var backgroundImageView: ImageViewCrossDisolve!
@IBOutlet private var annualSubscriptionButton: BookmarksSubscriptionButton!
@IBOutlet private var annualDiscountView: UIView!
@IBOutlet private var annualDiscountLabel: UILabel!
@IBOutlet private var monthlySubscriptionButton: BookmarksSubscriptionButton!
@IBOutlet private var loadingView: UIView!
@IBOutlet private var pageIndicator: PageIndicator!
@IBOutlet private var descriptionPageScrollView: UIScrollView!
//MARK: locals
private var subscriptionGroup: ISubscriptionGroup?
private var pageWidth: CGFloat {
return self.descriptionPageScrollView.frame.width;
}
private let maxPages = 3;
private var currentPage: Int {
return Int(self.descriptionPageScrollView.contentOffset.x/self.pageWidth) + 1;
}
private var animatingTask: DispatchWorkItem?
private let animationDelay: TimeInterval = 2
private let animationDuration: TimeInterval = 0.75
private let animationBackDuration: TimeInterval = 0.3
//MARK: dependency
private let subscriptionManager: ISubscriptionManager = InAppPurchase.allPassSubscriptionManager
private let bookmarksManager: MWMBookmarksManager = MWMBookmarksManager.shared()
@objc var onSubscribe: MWMVoidBlock?
@objc var onCancel: MWMVoidBlock?
@objc var source: String = kStatWebView
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
get { return [.portrait] }
}
override var preferredStatusBarStyle: UIStatusBarStyle {
get { return .lightContent }
}
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
subscriptionManager.addListener(self)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
deinit {
subscriptionManager.removeListener(self)
}
override func viewDidLoad() {
super.viewDidLoad()
self.presentationController?.delegate = self;
backgroundImageView.images = [
UIImage.init(named: "AllPassSubscriptionBg1"),
UIImage.init(named: "AllPassSubscriptionBg2"),
UIImage.init(named: "AllPassSubscriptionBg3")
]
pageIndicator.pageCount = maxPages
startAnimating();
annualSubscriptionButton.config(title: L("annual_subscription_title"),
price: "...",
enabled: false)
monthlySubscriptionButton.config(title: L("montly_subscription_title"),
price: "...",
enabled: false)
annualDiscountView.layer.shadowRadius = 4
annualDiscountView.layer.shadowOffset = CGSize(width: 0, height: 2)
annualDiscountView.layer.shadowColor = UIColor.blackHintText().cgColor
annualDiscountView.layer.shadowOpacity = 0.62
subscriptionManager.getAvailableSubscriptions { [weak self] (subscriptions, error) in
guard let subscriptions = subscriptions, subscriptions.count == 2 else {
MWMAlertViewController.activeAlert().presentInfoAlert(L("price_error_title"),
text: L("price_error_subtitle"))
self?.onCancel?()
return
}
let group = SubscriptionGroup(subscriptions: subscriptions)
self?.subscriptionGroup = group
if let annual = group[.year]{
self?.annualSubscriptionButton.config(title: annual.title,
price: annual.formattedPrice,
enabled: true)
self?.annualDiscountView.isHidden = !annual.hasDiscount
self?.annualDiscountLabel.text = annual.formattedDisount
}
if let mountly = group[.month]{
self?.monthlySubscriptionButton.config(title: mountly.title,
price: mountly.formattedPrice,
enabled: true)
}
}
}
@IBAction func onAnnualButtonTap(_ sender: UIButton) {
purchase(sender: sender, subscription: subscriptionGroup?[.year]?.subscription)
}
@IBAction func onMonthlyButtonTap(_ sender: UIButton) {
purchase(sender: sender, subscription: subscriptionGroup?[.month]?.subscription)
}
private func purchase(sender: UIButton, subscription: ISubscription?) {
signup(anchor: sender) { [weak self] success in
guard success else { return }
self?.loadingView.isHidden = false
self?.bookmarksManager.ping { success in
guard success else {
self?.loadingView.isHidden = true
let errorDialog = SubscriptionFailViewController { [weak self] in
self?.dismiss(animated: true)
}
self?.present(errorDialog, animated: true)
return
}
guard let subscription = subscription else {
return
}
self?.subscriptionManager.subscribe(to: subscription)
}
}
Statistics.logEvent(kStatInappPay, withParameters: [kStatPurchase: MWMPurchaseManager.bookmarksSubscriptionServerId()],
with: .realtime)
}
@IBAction func onRestore(_ sender: UIButton) {
Statistics.logEvent(kStatInappRestore, withParameters: [kStatPurchase: MWMPurchaseManager.bookmarksSubscriptionServerId()])
signup(anchor: sender) { [weak self] (success) in
guard success else { return }
self?.loadingView.isHidden = false
self?.subscriptionManager.restore { result in
self?.loadingView.isHidden = true
let alertText: String
switch result {
case .valid:
alertText = L("restore_success_alert")
case .notValid:
alertText = L("restore_no_subscription_alert")
case .serverError, .authError:
alertText = L("restore_error_alert")
}
MWMAlertViewController.activeAlert().presentInfoAlert(L("restore_subscription"), text: alertText)
}
}
}
@IBAction func onClose(_ sender: UIButton) {
onCancel?()
Statistics.logEvent(kStatInappCancel, withParameters: [kStatPurchase: MWMPurchaseManager.bookmarksSubscriptionServerId()])
}
@IBAction func onTerms(_ sender: UIButton) {
guard let url = URL(string: MWMAuthorizationViewModel.termsOfUseLink()) else { return }
let safari = SFSafariViewController(url: url)
self.present(safari, animated: true, completion: nil)
}
@IBAction func onPrivacy(_ sender: UIButton) {
guard let url = URL(string: MWMAuthorizationViewModel.privacyPolicyLink()) else { return }
let safari = SFSafariViewController(url: url)
self.present(safari, animated: true, completion: nil)
}
}
extension AllPassSubscriptionViewController: UIAdaptivePresentationControllerDelegate {
func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
onCancel?()
}
}
//MARK: Animation
extension AllPassSubscriptionViewController {
private func perform(withDelay: TimeInterval, execute: DispatchWorkItem?) {
if let execute = execute {
DispatchQueue.main.asyncAfter(deadline: .now() + withDelay, execute: execute)
}
}
private func startAnimating() {
if animatingTask != nil {
animatingTask?.cancel();
}
animatingTask = DispatchWorkItem.init {[weak self, animationDelay] in
self?.scrollToWithAnimation(page: (self?.currentPage ?? 0) + 1, completion: {
self?.perform(withDelay: animationDelay, execute: self?.animatingTask)
})
}
perform(withDelay: animationDelay, execute: animatingTask)
}
private func stopAnimating() {
animatingTask?.cancel();
animatingTask = nil
view.layer.removeAllAnimations()
}
private func scrollToWithAnimation(page: Int, completion: @escaping ()->()) {
var nextPage = page
var duration = animationDuration
if nextPage < 1 || nextPage > maxPages{
nextPage = 1
duration = animationBackDuration
}
let xOffset = CGFloat(nextPage - 1) * pageWidth
UIView.animate(withDuration: duration,
delay: 0,
options: [.curveEaseInOut, .allowUserInteraction],
animations: {[weak self] in
self?.descriptionPageScrollView.contentOffset.x = xOffset
}, completion:{complete in
completion()
})
}
}
extension AllPassSubscriptionViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let pageProgress = scrollView.contentOffset.x/self.pageWidth
pageIndicator.currentPage = pageProgress
backgroundImageView.currentPage = pageProgress
}
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
stopAnimating()
}
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
startAnimating()
}
}
extension AllPassSubscriptionViewController: SubscriptionManagerListener {
func didFailToValidate() {
loadingView.isHidden = true
MWMAlertViewController.activeAlert().presentInfoAlert(L("bookmarks_convert_error_title"),
text: L("purchase_error_subtitle"))
}
func didValidate(_ isValid: Bool) {
loadingView.isHidden = true
if (isValid) {
onSubscribe?()
} else {
MWMAlertViewController.activeAlert().presentInfoAlert(L("bookmarks_convert_error_title"),
text: L("purchase_error_subtitle"))
}
}
func didFailToSubscribe(_ subscription: ISubscription, error: Error?) {
loadingView.isHidden = true
MWMAlertViewController.activeAlert().presentInfoAlert(L("bookmarks_convert_error_title"),
text: L("purchase_error_subtitle"))
}
func didSubscribe(_ subscription: ISubscription) {
MWMPurchaseManager.setBookmarksSubscriptionActive(true)
bookmarksManager.resetInvalidCategories()
}
func didDefer(_ subscription: ISubscription) {
}
}

View file

@ -0,0 +1,480 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="FredokaOne-Regular.ttf">
<string>FredokaOne-Regular</string>
</array>
</customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AllPassSubscriptionViewController" customModule="maps_me" customModuleProvider="target">
<connections>
<outlet property="annualDiscountLabel" destination="Zd8-3s-FUz" id="7Wb-NZ-IIc"/>
<outlet property="annualDiscountView" destination="JKt-iA-TiF" id="Eu5-dr-o61"/>
<outlet property="annualSubscriptionButton" destination="Lg7-Sn-MNZ" id="Dfz-gM-gDd"/>
<outlet property="backgroundImageView" destination="MVh-rE-VHd" id="aK3-Tk-Q82"/>
<outlet property="descriptionPageScrollView" destination="pyJ-8x-bjL" id="763-Gg-LfT"/>
<outlet property="loadingView" destination="je2-0p-PRM" id="q8x-ah-ZDN"/>
<outlet property="monthlySubscriptionButton" destination="UL9-YY-AHH" id="5ms-ia-Lwx"/>
<outlet property="pageIndicator" destination="2G3-Jk-HS0" id="rP5-AD-4DA"/>
<outlet property="view" destination="ttH-ve-i20" id="OSf-Qm-h6u"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="ttH-ve-i20">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MVh-rE-VHd" customClass="ImageViewCrossDisolve" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
<scrollView multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" contentInsetAdjustmentBehavior="always" translatesAutoresizingMaskIntoConstraints="NO" id="OgE-tu-SWu">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TaY-K1-Hdb">
<rect key="frame" x="0.0" y="0.0" width="414" height="735.33333333333337"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="try to subscribe" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v4o-CM-FZh">
<rect key="frame" x="24" y="62.000000000000007" width="366" height="14.333333333333336"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
<color key="textColor" red="0.89803921568627454" green="0.89803921568627454" blue="0.89803921568627454" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="semibold12"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="all_pass_subscription_header"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionTitle"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="All Pass Premium" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PQG-Je-4JN">
<rect key="frame" x="24" y="84.333333333333329" width="366" height="30.333333333333329"/>
<fontDescription key="fontDescription" name="FredokaOne-Regular" family="Fredoka One" pointSize="25"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="fredokaRegular25"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionSubTitle"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="all_pass_subscription_subheader"/>
</userDefinedRuntimeAttributes>
</label>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" directionalLockEnabled="YES" bounces="NO" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pyJ-8x-bjL">
<rect key="frame" x="0.0" y="114.66666666666669" width="414" height="194"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="dDh-cr-cQb">
<rect key="frame" x="0.0" y="0.0" width="1242" height="194"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d1O-vM-kfx">
<rect key="frame" x="0.0" y="0.0" width="414" height="194"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HKS-Ck-8Qo">
<rect key="frame" x="20" y="37.999999999999986" width="374" height="40.666666666666671"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="34"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionDescription"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="bold34"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="all_pass_subscription_message_title"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="X8c-aP-lNH">
<rect key="frame" x="20" y="96.666666666666671" width="374" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium18"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionDescription"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="all_pass_subscription_message_subtitle"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="X8c-aP-lNH" secondAttribute="trailing" constant="20" id="Kwj-4x-VDK"/>
<constraint firstItem="HKS-Ck-8Qo" firstAttribute="leading" secondItem="d1O-vM-kfx" secondAttribute="leading" constant="20" id="aNO-Mh-Rsd"/>
<constraint firstAttribute="trailing" secondItem="HKS-Ck-8Qo" secondAttribute="trailing" constant="20" id="l5F-f7-cP1"/>
<constraint firstItem="X8c-aP-lNH" firstAttribute="leading" secondItem="d1O-vM-kfx" secondAttribute="leading" constant="20" id="lC0-u9-tWQ"/>
<constraint firstItem="X8c-aP-lNH" firstAttribute="top" secondItem="HKS-Ck-8Qo" secondAttribute="bottom" constant="18" id="n30-Js-7bp"/>
<constraint firstItem="HKS-Ck-8Qo" firstAttribute="top" secondItem="d1O-vM-kfx" secondAttribute="top" constant="38" id="npS-fh-ANK"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c0N-Px-k0D">
<rect key="frame" x="414" y="0.0" width="414" height="194"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hDV-6Z-BW2">
<rect key="frame" x="20" y="37.999999999999986" width="374" height="40.666666666666671"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="34"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="bold34"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionDescription"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="all_pass_subscription_message_title_2"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ysy-K0-iWY">
<rect key="frame" x="20" y="96.666666666666671" width="374" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium18"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionDescription"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="all_pass_subscription_message_subtitle_2"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="ysy-K0-iWY" firstAttribute="leading" secondItem="c0N-Px-k0D" secondAttribute="leading" constant="20" id="23U-CI-2nb"/>
<constraint firstItem="ysy-K0-iWY" firstAttribute="top" secondItem="hDV-6Z-BW2" secondAttribute="bottom" constant="18" id="88z-wp-lvd"/>
<constraint firstItem="hDV-6Z-BW2" firstAttribute="top" secondItem="c0N-Px-k0D" secondAttribute="top" constant="38" id="RcM-4O-1kz"/>
<constraint firstItem="hDV-6Z-BW2" firstAttribute="leading" secondItem="c0N-Px-k0D" secondAttribute="leading" constant="20" id="X72-JC-Eri"/>
<constraint firstAttribute="trailing" secondItem="hDV-6Z-BW2" secondAttribute="trailing" constant="20" id="ZYc-cS-Kb9"/>
<constraint firstAttribute="trailing" secondItem="ysy-K0-iWY" secondAttribute="trailing" constant="20" id="n2u-vi-Yoi"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mpg-Va-Z94">
<rect key="frame" x="828" y="0.0" width="414" height="194"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ss5-hD-fVK">
<rect key="frame" x="20" y="37.999999999999986" width="374" height="40.666666666666671"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="34"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="bold34"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionDescription"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="all_pass_subscription_message_title_3"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8li-NQ-mbT">
<rect key="frame" x="20" y="96.666666666666671" width="374" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium18"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionDescription"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="all_pass_subscription_message_subtitle_"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="8li-NQ-mbT" firstAttribute="top" secondItem="Ss5-hD-fVK" secondAttribute="bottom" constant="18" id="JWM-71-GjL"/>
<constraint firstItem="8li-NQ-mbT" firstAttribute="leading" secondItem="Mpg-Va-Z94" secondAttribute="leading" constant="20" id="RXn-at-8eG"/>
<constraint firstAttribute="trailing" secondItem="Ss5-hD-fVK" secondAttribute="trailing" constant="20" id="dha-wv-fur"/>
<constraint firstAttribute="trailing" secondItem="8li-NQ-mbT" secondAttribute="trailing" constant="20" id="eGG-hq-dHO"/>
<constraint firstItem="Ss5-hD-fVK" firstAttribute="leading" secondItem="Mpg-Va-Z94" secondAttribute="leading" constant="20" id="xWT-nK-l31"/>
<constraint firstItem="Ss5-hD-fVK" firstAttribute="top" secondItem="Mpg-Va-Z94" secondAttribute="top" constant="38" id="zl7-Bk-3ha"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="height" secondItem="d1O-vM-kfx" secondAttribute="height" id="8fL-tJ-S0T"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="dDh-cr-cQb" firstAttribute="centerY" secondItem="pyJ-8x-bjL" secondAttribute="centerY" id="5ip-zK-aBj"/>
<constraint firstAttribute="bottom" secondItem="dDh-cr-cQb" secondAttribute="bottom" id="I0C-Mf-781"/>
<constraint firstAttribute="height" constant="194" id="NmP-6k-haJ"/>
<constraint firstItem="dDh-cr-cQb" firstAttribute="top" secondItem="pyJ-8x-bjL" secondAttribute="top" id="agi-7v-2YF"/>
<constraint firstAttribute="trailing" secondItem="dDh-cr-cQb" secondAttribute="trailing" id="eYw-FB-3yK"/>
<constraint firstItem="dDh-cr-cQb" firstAttribute="leading" secondItem="pyJ-8x-bjL" secondAttribute="leading" id="jVk-g5-yGQ"/>
<constraint firstItem="dDh-cr-cQb" firstAttribute="height" secondItem="pyJ-8x-bjL" secondAttribute="height" id="sCs-Sd-G2n"/>
</constraints>
<connections>
<outlet property="delegate" destination="-1" id="Lr4-5q-4qa"/>
</connections>
</scrollView>
<view contentMode="scaleToFill" placeholderIntrinsicWidth="106" placeholderIntrinsicHeight="16" translatesAutoresizingMaskIntoConstraints="NO" id="2G3-Jk-HS0" customClass="PageIndicator" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="154" y="308.66666666666669" width="106" height="16"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="kgh-BN-Pin">
<rect key="frame" x="20" y="394.66666666666669" width="374" height="144.00000000000006"/>
<subviews>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lg7-Sn-MNZ" userLabel="Continue" customClass="BookmarksSubscriptionButton" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="374" height="64"/>
<color key="backgroundColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_subscription_annual"/>
<constraints>
<constraint firstAttribute="height" constant="64" id="TXW-gO-Ecv"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<state key="normal" title="!! Annual">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="allPassSubscriptionDescription"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="allPassSubscriptionSubTitle"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueHighlighted"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onAnnualButtonTap:" destination="-1" eventType="touchUpInside" id="95i-dj-7pg"/>
</connections>
</button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UL9-YY-AHH" userLabel="Continue" customClass="BookmarksSubscriptionButton" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="0.0" y="80" width="374" height="64"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_subscription_monthly"/>
<constraints>
<constraint firstAttribute="height" constant="64" id="BUv-IH-Qg2"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<state key="normal" title="!! Monthly">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="allPassSubscriptionMonthlyTitle"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="borderColorName" value="blackHintText"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="blackDividers"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="allPassSubscriptionMonthlyBackground"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onMonthlyButtonTap:" destination="-1" eventType="touchUpInside" id="iKa-Pf-ltA"/>
</connections>
</button>
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JKt-iA-TiF">
<rect key="frame" x="28" y="371.66666666666669" width="68.333333333333329" height="35"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="- $38" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="12" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zd8-3s-FUz">
<rect key="frame" x="10.000000000000004" y="6.6666666666666305" width="48.333333333333343" height="21.666666666666671"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionMonthlyTitle"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" red="0.63921568630000003" green="0.20784313730000001" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="35" id="56G-rz-ypw"/>
<constraint firstItem="Zd8-3s-FUz" firstAttribute="centerY" secondItem="JKt-iA-TiF" secondAttribute="centerY" id="7s7-4f-TPE"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="20" id="EWS-Yf-4mf"/>
<constraint firstItem="Zd8-3s-FUz" firstAttribute="leading" secondItem="JKt-iA-TiF" secondAttribute="leading" constant="10" id="YHT-vA-aVn"/>
<constraint firstAttribute="trailing" secondItem="Zd8-3s-FUz" secondAttribute="trailing" constant="10" id="kT5-qY-MU3"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="allPassSubscriptionDiscountBackground"/>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wL2-uQ-ivp" userLabel="Restore">
<rect key="frame" x="50" y="548.66666666666663" width="314" height="50"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_next2"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="edu-2N-QrS"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<state key="normal" title="Restore purchases">
<color key="titleColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="linkBlueHighlighted"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="allPassSubscriptionDescription"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="restore_purchase"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onRestore:" destination="-1" eventType="touchUpInside" id="Y63-jh-jyb"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="justified" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Frp-JY-kuq">
<rect key="frame" x="20" y="606.66666666666663" width="374" height="64.666666666666629"/>
<string key="text">Payment will be charged to your iTunes account at confirmation of purchase. The subscription will automatically renew unless auto-renew is turned off at least 24 hours before the end of the current period. Your account will be charged according to your plan for renewal within 24 hours prior to the end of the current period. You can manage or turn off auto-renew in your Apple ID account settings at any time of your purchase.</string>
<fontDescription key="fontDescription" type="system" pointSize="9"/>
<color key="textColor" white="0.0" alpha="0.31555008559999997" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular9"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionTermsTitle"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="subscription_terms_guides"/>
</userDefinedRuntimeAttributes>
</label>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2O1-n3-hBU" userLabel="TermsOfUse">
<rect key="frame" x="20" y="671.33333333333337" width="66" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_next2"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="Vm1-h8-QKt"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
<state key="normal" title="Terms of Use">
<color key="titleColor" white="0.55912912869999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="blackHintText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium10"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionTermsTitle"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="terms_of_use"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onTerms:" destination="-1" eventType="touchUpInside" id="9o5-Yl-wgh"/>
</connections>
</button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FUY-sv-eiY" userLabel="PrivacyPolicy">
<rect key="frame" x="325" y="671.33333333333337" width="69" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_next2"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="kvO-Id-B9b"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
<state key="normal" title="Privacy Policy">
<color key="titleColor" white="0.55912912869999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="blackHintText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium10"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="allPassSubscriptionTermsTitle"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="privacy_policy"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onPrivacy:" destination="-1" eventType="touchUpInside" id="rNQ-Ud-B0f"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sqn-U5-uoO">
<rect key="frame" x="362" y="4" width="44" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="ToA-Oe-6qB"/>
<constraint firstAttribute="width" constant="44" id="q4u-Mh-lXE"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" image="bookmarksSubscriptionClose"/>
<connections>
<action selector="onClose:" destination="-1" eventType="touchUpInside" id="QgZ-de-IfH"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="kgh-BN-Pin" secondAttribute="trailing" constant="20" id="1Gc-BS-Dq3"/>
<constraint firstItem="FUY-sv-eiY" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="2O1-n3-hBU" secondAttribute="trailing" constant="16" id="1fV-vn-8VV"/>
<constraint firstItem="Frp-JY-kuq" firstAttribute="top" secondItem="wL2-uQ-ivp" secondAttribute="bottom" constant="8" id="3SQ-qZ-lRI"/>
<constraint firstItem="v4o-CM-FZh" firstAttribute="leading" secondItem="TaY-K1-Hdb" secondAttribute="leading" constant="24" id="4u6-gh-txD"/>
<constraint firstItem="2O1-n3-hBU" firstAttribute="top" secondItem="Frp-JY-kuq" secondAttribute="bottom" id="664-Ay-15y"/>
<constraint firstAttribute="trailing" secondItem="v4o-CM-FZh" secondAttribute="trailing" constant="24" id="DmB-2h-xBn"/>
<constraint firstAttribute="trailing" secondItem="pyJ-8x-bjL" secondAttribute="trailing" id="DrF-w9-dGS"/>
<constraint firstItem="wL2-uQ-ivp" firstAttribute="top" secondItem="kgh-BN-Pin" secondAttribute="bottom" constant="10" id="Fmh-oA-JfP"/>
<constraint firstAttribute="trailing" secondItem="Frp-JY-kuq" secondAttribute="trailing" constant="20" id="GCw-Sz-5EM"/>
<constraint firstItem="pyJ-8x-bjL" firstAttribute="top" secondItem="PQG-Je-4JN" secondAttribute="bottom" id="IFM-rv-gVR"/>
<constraint firstItem="pyJ-8x-bjL" firstAttribute="leading" secondItem="TaY-K1-Hdb" secondAttribute="leading" id="KT8-oK-Hyb"/>
<constraint firstAttribute="trailing" secondItem="wL2-uQ-ivp" secondAttribute="trailing" constant="50" id="KbJ-29-yNc"/>
<constraint firstItem="PQG-Je-4JN" firstAttribute="top" secondItem="v4o-CM-FZh" secondAttribute="bottom" constant="8" id="LrZ-TT-NBu"/>
<constraint firstItem="kgh-BN-Pin" firstAttribute="leading" secondItem="TaY-K1-Hdb" secondAttribute="leading" constant="20" id="N9e-ZN-k2x"/>
<constraint firstItem="Frp-JY-kuq" firstAttribute="leading" secondItem="TaY-K1-Hdb" secondAttribute="leading" constant="20" id="OZR-HV-yMB"/>
<constraint firstAttribute="trailing" secondItem="sqn-U5-uoO" secondAttribute="trailing" constant="8" id="SDh-Bg-4qw"/>
<constraint firstItem="PQG-Je-4JN" firstAttribute="leading" secondItem="TaY-K1-Hdb" secondAttribute="leading" constant="24" id="Sa8-ra-H4D"/>
<constraint firstItem="kgh-BN-Pin" firstAttribute="top" secondItem="JKt-iA-TiF" secondAttribute="bottom" constant="-12" id="ZXU-ku-kg9"/>
<constraint firstItem="2G3-Jk-HS0" firstAttribute="top" secondItem="pyJ-8x-bjL" secondAttribute="bottom" id="ZlG-eL-ldY"/>
<constraint firstItem="Lg7-Sn-MNZ" firstAttribute="top" secondItem="2G3-Jk-HS0" secondAttribute="bottom" constant="70" id="dn8-F9-r9b"/>
<constraint firstItem="v4o-CM-FZh" firstAttribute="top" secondItem="TaY-K1-Hdb" secondAttribute="top" constant="62" id="hbo-sM-hkk"/>
<constraint firstItem="2O1-n3-hBU" firstAttribute="leading" secondItem="TaY-K1-Hdb" secondAttribute="leading" constant="20" id="hgm-Kf-otC"/>
<constraint firstItem="JKt-iA-TiF" firstAttribute="leading" secondItem="kgh-BN-Pin" secondAttribute="leading" constant="8" id="lli-5H-c8Z"/>
<constraint firstItem="FUY-sv-eiY" firstAttribute="top" secondItem="Frp-JY-kuq" secondAttribute="bottom" id="rL1-VE-ZEa"/>
<constraint firstAttribute="trailing" secondItem="FUY-sv-eiY" secondAttribute="trailing" constant="20" id="rxK-OW-Kk4"/>
<constraint firstItem="sqn-U5-uoO" firstAttribute="top" secondItem="TaY-K1-Hdb" secondAttribute="top" constant="4" id="snI-hf-xS5"/>
<constraint firstAttribute="bottom" secondItem="FUY-sv-eiY" secondAttribute="bottom" constant="20" id="szb-30-bdv"/>
<constraint firstItem="2G3-Jk-HS0" firstAttribute="centerX" secondItem="TaY-K1-Hdb" secondAttribute="centerX" id="tYG-Ow-N5t"/>
<constraint firstItem="wL2-uQ-ivp" firstAttribute="leading" secondItem="TaY-K1-Hdb" secondAttribute="leading" constant="50" id="uIg-7M-SSB"/>
<constraint firstAttribute="trailing" secondItem="PQG-Je-4JN" secondAttribute="trailing" constant="24" id="veZ-1V-5AM"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="TaY-K1-Hdb" firstAttribute="width" secondItem="OgE-tu-SWu" secondAttribute="width" id="5EU-Ae-NUs"/>
<constraint firstAttribute="bottom" secondItem="TaY-K1-Hdb" secondAttribute="bottom" id="R5w-2Q-dOF"/>
<constraint firstAttribute="trailing" secondItem="TaY-K1-Hdb" secondAttribute="trailing" id="fZP-iJ-Pog"/>
<constraint firstItem="TaY-K1-Hdb" firstAttribute="leading" secondItem="OgE-tu-SWu" secondAttribute="leading" id="vLL-HE-BQP"/>
<constraint firstItem="TaY-K1-Hdb" firstAttribute="top" secondItem="OgE-tu-SWu" secondAttribute="top" id="x9S-Df-Uj7"/>
</constraints>
</scrollView>
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e6Y-4z-J5I">
<rect key="frame" x="0.0" y="0.0" width="414" height="0.0"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="p7B-P2-bDh">
<rect key="frame" x="0.0" y="0.0" width="414" height="0.0"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<blurEffect style="dark"/>
</visualEffectView>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="je2-0p-PRM">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<subviews>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="JNf-wP-Nb4">
<rect key="frame" x="188.66666666666666" y="349.66666666666669" width="37" height="37"/>
<color key="color" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" white="1" alpha="0.89998929790000004" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="JNf-wP-Nb4" firstAttribute="centerX" secondItem="je2-0p-PRM" secondAttribute="centerX" id="J5a-pc-gS0"/>
<constraint firstItem="JNf-wP-Nb4" firstAttribute="centerY" secondItem="je2-0p-PRM" secondAttribute="centerY" id="fkm-e4-8kG"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="toastBackground"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="je2-0p-PRM" secondAttribute="bottom" id="2X4-27-8gN"/>
<constraint firstItem="je2-0p-PRM" firstAttribute="leading" secondItem="ttH-ve-i20" secondAttribute="leading" id="6Th-RG-VU6"/>
<constraint firstItem="e6Y-4z-J5I" firstAttribute="top" secondItem="ttH-ve-i20" secondAttribute="top" id="8hN-RX-cCd"/>
<constraint firstItem="MVh-rE-VHd" firstAttribute="top" secondItem="ttH-ve-i20" secondAttribute="top" id="9BL-0s-t3m"/>
<constraint firstAttribute="trailing" secondItem="je2-0p-PRM" secondAttribute="trailing" id="F4S-IV-SBg"/>
<constraint firstAttribute="bottom" secondItem="OgE-tu-SWu" secondAttribute="bottom" id="Ruo-wn-Zk6"/>
<constraint firstItem="e6Y-4z-J5I" firstAttribute="leading" secondItem="ttH-ve-i20" secondAttribute="leading" id="YZ3-lh-MDK"/>
<constraint firstItem="OgE-tu-SWu" firstAttribute="leading" secondItem="ttH-ve-i20" secondAttribute="leading" id="Yhh-9t-EdU"/>
<constraint firstItem="MVh-rE-VHd" firstAttribute="leading" secondItem="LdD-sY-6l2" secondAttribute="leading" id="bxg-OT-TYg"/>
<constraint firstItem="LdD-sY-6l2" firstAttribute="top" secondItem="e6Y-4z-J5I" secondAttribute="bottom" id="cUS-1u-sBW"/>
<constraint firstAttribute="top" secondItem="je2-0p-PRM" secondAttribute="top" id="cXo-N7-6pw"/>
<constraint firstItem="LdD-sY-6l2" firstAttribute="bottom" secondItem="MVh-rE-VHd" secondAttribute="bottom" id="e4d-de-gcA"/>
<constraint firstItem="OgE-tu-SWu" firstAttribute="top" secondItem="ttH-ve-i20" secondAttribute="top" id="edn-oI-aXU"/>
<constraint firstAttribute="trailing" secondItem="e6Y-4z-J5I" secondAttribute="trailing" id="gDt-bE-oVK"/>
<constraint firstItem="dDh-cr-cQb" firstAttribute="width" secondItem="ttH-ve-i20" secondAttribute="width" multiplier="3" id="hQi-FV-7vM"/>
<constraint firstItem="MVh-rE-VHd" firstAttribute="trailing" secondItem="LdD-sY-6l2" secondAttribute="trailing" id="jrm-Tu-hDq"/>
<constraint firstAttribute="trailing" secondItem="OgE-tu-SWu" secondAttribute="trailing" id="ugD-Iv-ilf"/>
</constraints>
<viewLayoutGuide key="safeArea" id="LdD-sY-6l2"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
<point key="canvasLocation" x="46.376811594202906" y="110.86956521739131"/>
</view>
</objects>
<resources>
<image name="bookmarksSubscriptionClose" width="24" height="24"/>
</resources>
</document>

View file

@ -9,9 +9,7 @@ import SafariServices
@IBOutlet private var loadingView: UIView!
//MARK: locals
private var priceFormatter: NumberFormatter?
private var monthlySubscription: ISubscription?
private var annualSubscription: ISubscription?
private var subscriptionGroup: ISubscriptionGroup?
//MARK: dependency
private let subscriptionManager: ISubscriptionManager = InAppPurchase.bookmarksSubscriptionManager
@ -49,8 +47,8 @@ import SafariServices
price: "...",
enabled: false)
monthlySubscriptionButton.config(title: L("montly_subscription_title"),
price: "...",
enabled: false)
price: "...",
enabled: false)
if !UIColor.isNightMode() {
annualDiscountView.layer.shadowRadius = 4
@ -71,37 +69,30 @@ import SafariServices
self?.onCancel?()
return
}
self?.monthlySubscription = subscriptions[0]
self?.annualSubscription = subscriptions[1]
let s = subscriptions[0]
let formatter = NumberFormatter()
formatter.locale = s.priceLocale
formatter.numberStyle = .currency
let monthlyPrice = subscriptions[0].price
let annualPrice = subscriptions[1].price
let twelveMonthPrice = monthlyPrice.multiplying(by: 12)
let discount = twelveMonthPrice.subtracting(annualPrice).dividing(by: twelveMonthPrice).multiplying(by: 100)
self?.annualSubscriptionButton.config(title: L("annual_subscription_title"),
price: formatter.string(from: annualPrice) ?? "",
enabled: true)
self?.monthlySubscriptionButton.config(title: L("montly_subscription_title"),
price: formatter.string(from: monthlyPrice) ?? "",
enabled: true)
self?.annualDiscountView.isHidden = false
self?.annualDiscountLabel.text = "- \(discount.rounding(accordingToBehavior: nil).intValue) %"
let group = SubscriptionGroup(subscriptions: subscriptions)
self?.subscriptionGroup = group
if let annual = group[.year]{
self?.annualSubscriptionButton.config(title: annual.title,
price: annual.formattedPrice,
enabled: true)
self?.annualDiscountView.isHidden = !annual.hasDiscount
self?.annualDiscountLabel.text = annual.formattedDisount
}
if let mountly = group[.month]{
self?.monthlySubscriptionButton.config(title: mountly.title,
price: mountly.formattedPrice,
enabled: true)
}
}
}
@IBAction func onAnnualButtonTap(_ sender: UIButton) {
purchase(sender: sender, subscription: annualSubscription)
purchase(sender: sender, subscription: subscriptionGroup?[.year]?.subscription)
}
@IBAction func onMonthlyButtonTap(_ sender: UIButton) {
purchase(sender: sender, subscription: monthlySubscription)
purchase(sender: sender, subscription: subscriptionGroup?[.month]?.subscription)
}
private func purchase(sender: UIButton, subscription: ISubscription?) {
@ -111,7 +102,7 @@ import SafariServices
self?.bookmarksManager.ping { success in
guard success else {
self?.loadingView.isHidden = true
let errorDialog = BookmarksSubscriptionFailViewController { [weak self] in
let errorDialog = SubscriptionFailViewController { [weak self] in
self?.dismiss(animated: true)
}
self?.present(errorDialog, animated: true)

View file

@ -232,9 +232,6 @@
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="keyPath" value="YES"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" red="0.63921568630000003" green="0.20784313730000001" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -267,7 +264,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="linkBlueHighlighted"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="restore_subscription"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="restore_purchase"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onRestore:" destination="-1" eventType="touchUpInside" id="3br-rR-hqk"/>

View file

@ -24,7 +24,7 @@ extension UIViewController {
MWMBookmarksManager.shared().deleteInvalidCategories()
completion?(true)
}
let subscriptionExpiredDialog = BookmarksSubscriptionExpiredViewController(onSubscribe: onSubscribe, onDelete: onDelete)
let subscriptionExpiredDialog = SubscriptionExpiredViewController(onSubscribe: onSubscribe, onDelete: onDelete)
self?.present(subscriptionExpiredDialog, animated: true)
}
}

View file

@ -57,6 +57,15 @@ NSDictionary<NSString *, UIColor *> * night = @{
@"bookmarkSubscriptionBackground" : [UIColor colorWithRed:scaled(60.) green:scaled(64.) blue:scaled(68.) alpha:alpha100],
@"bookmarkSubscriptionScrollBackground" : [UIColor colorWithRed:scaled(137) green:scaled(217) blue:scaled(255) alpha:alpha100],
@"bookmarkSubscriptionFooterBackground" : [UIColor colorWithRed:scaled(47) green:scaled(58) blue:scaled(73) alpha:alpha100],
//NO NIGHT
@"allPassSubscriptionTitle" : [UIColor colorWithWhite:1. alpha:alpha40],
@"allPassSubscriptionSubTitle" :[UIColor colorWithRed:scaled(30.) green:scaled(150.) blue:scaled(240.) alpha:alpha100],
@"allPassSubscriptionDescription" : [UIColor colorWithWhite:1. alpha:alpha100],
@"allPassSubscriptionMonthlyBackground" :[UIColor colorWithWhite:0.88 alpha:alpha80],
@"allPassSubscriptionMonthlyTitle" :[UIColor colorWithWhite:0 alpha:alpha87],
@"allPassSubscriptionDiscountBackground" :[UIColor colorWithRed:scaled(245.) green:scaled(210.) blue:scaled(12.) alpha:alpha100],
@"allPassSubscriptionTermsTitle" :[UIColor colorWithWhite:1 alpha:alpha70],
//END NO NIGHT
};
NSDictionary<NSString *, UIColor *> * day = @{
@ -110,6 +119,15 @@ NSDictionary<NSString *, UIColor *> * day = @{
@"bookmarkSubscriptionBackground" : [UIColor colorWithRed:scaled(240) green:scaled(252) blue:scaled(255) alpha:alpha100],
@"bookmarkSubscriptionScrollBackground" : [UIColor colorWithRed:scaled(137) green:scaled(217) blue:scaled(255) alpha:alpha100],
@"bookmarkSubscriptionFooterBackground" : [UIColor colorWithRed:scaled(47) green:scaled(58) blue:scaled(73) alpha:alpha100],
//NO NIGHT
@"allPassSubscriptionTitle" : [UIColor colorWithWhite:1. alpha:alpha40],
@"allPassSubscriptionSubTitle" :[UIColor colorWithRed:scaled(30.) green:scaled(150.) blue:scaled(240.) alpha:alpha100],
@"allPassSubscriptionDescription" : [UIColor colorWithWhite:1. alpha:alpha100],
@"allPassSubscriptionMonthlyBackground" :[UIColor colorWithWhite:0.88 alpha:alpha80],
@"allPassSubscriptionMonthlyTitle" :[UIColor colorWithWhite:0 alpha:alpha87],
@"allPassSubscriptionDiscountBackground" :[UIColor colorWithRed:scaled(245.) green:scaled(210.) blue:scaled(12.) alpha:alpha100],
@"allPassSubscriptionTermsTitle" :[UIColor colorWithWhite:1 alpha:alpha70],
//END NO NIGHT
};
UIColor * color(SEL cmd)
@ -444,4 +462,37 @@ UIColor * color(SEL cmd)
return color(_cmd);
}
//NO NIGHT COLORS
+ (UIColor *)allPassSubscriptionTitle
{
return color(_cmd);
}
+ (UIColor *)allPassSubscriptionDescription
{
return color(_cmd);
}
+ (UIColor *)allPassSubscriptionSubTitle
{
return color(_cmd);
}
+ (UIColor *)allPassSubscriptionMonthlyBackground
{
return color(_cmd);
}
+ (UIColor *)allPassSubscriptionMonthlyTitle
{
return color(_cmd);
}
+ (UIColor *)allPassSubscriptionDiscountBackground
{
return color(_cmd);
}
+ (UIColor *)allPassSubscriptionTermsTitle
{
return color(_cmd);
}
//END NO NIGHT
@end

View file

@ -41,3 +41,23 @@ extension UIColor {
}
}
}
extension UIColor {
func components() -> (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)? {
var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0
return getRed(&r, green: &g, blue: &b, alpha: &a) ? (r,g,b,a) : nil
}
static func intermediateColor( color1: UIColor, color2: UIColor, _ scale: CGFloat) -> UIColor? {
guard let comp1 = color1.components(),
let comp2 = color2.components() else {
return nil
}
let scale = min(1, max(0, scale))
let r = comp1.red + (comp2.red - comp1.red) * scale
let g = comp1.green + (comp2.green - comp1.green) * scale
let b = comp1.blue + (comp2.blue - comp1.blue) * scale
let a = comp1.alpha + (comp2.alpha - comp1.alpha) * scale
return UIColor(red: r, green: g, blue: b, alpha: a)
}
}

View file

@ -39,11 +39,14 @@ NS_ASSUME_NONNULL_BEGIN
+ (UIFont *)bold22;
+ (UIFont *)bold24;
+ (UIFont *)bold28;
+ (UIFont *)bold34;
+ (UIFont *)bold36;
+ (UIFont *)bold48;
+ (UIFont *)italic16;
+ (UIFont *)semibold12;
+ (UIFont *)semibold14;
+ (UIFont *)semibold16;
+ (UIFont *)fredoka25;
+ (UIFont *)fontWithName:(NSString *)fontName;

View file

@ -43,11 +43,15 @@ NSString * const kLightFontName = @"HelveticaNeue-Light";
+ (UIFont *)bold22 { return [UIFont boldSystemFontOfSize:22]; }
+ (UIFont *)bold24 { return [UIFont boldSystemFontOfSize:24]; }
+ (UIFont *)bold28 { return [UIFont boldSystemFontOfSize:28]; }
+ (UIFont *)bold34 { return [UIFont boldSystemFontOfSize:34]; }
+ (UIFont *)bold36 { return [UIFont boldSystemFontOfSize:26]; }
+ (UIFont *)bold48 { return [UIFont boldSystemFontOfSize:48]; }
+ (UIFont *)italic16 { return [UIFont italicSystemFontOfSize:16]; }
+ (UIFont *)semibold12 { return [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold]; }
+ (UIFont *)semibold14 { return [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold]; }
+ (UIFont *)semibold16 { return [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold]; }
+ (UIFont *)fredokaRegular25 { return [UIFont fontWithName:@"FredokaOne-Regular" size:25]; }
+ (UIFont *)fontWithName:(NSString *)fontName
{
#pragma clang diagnostic push

View file

@ -287,8 +287,8 @@ extern NSString * const kAlohalyticsTapEventKey;
controller.onSubscribe = ^{
MapViewController *mapViewController = self.ownerController;
[mapViewController dismissViewControllerAnimated:YES completion:nil];
BookmarksSubscriptionGoToCatalogViewController *successDialog =
[[BookmarksSubscriptionGoToCatalogViewController alloc] initOnOk:^{
SubscriptionGoToCatalogViewController *successDialog =
[[SubscriptionGoToCatalogViewController alloc] initOnOk:^{
[mapViewController dismissViewControllerAnimated:YES completion:nil];
[mapViewController openCatalogAnimated:YES utm:MWMUTMCrownButton];
} onCancel:^{

View file

@ -0,0 +1,46 @@
import UIKit
class ImageViewCrossDisolve: UIView {
private var imageViews: [UIImageView] = []
var images: [UIImage?] = [] {
didSet{
imageViews.forEach { (imageView) in
imageView.removeFromSuperview();
}
for image in images{
let imageView = UIImageView(image: image);
self.addSubview(imageView)
imageView.alpha = 0
imageView.translatesAutoresizingMaskIntoConstraints = false;
imageView.leadingAnchor.constraint(equalTo: self.leadingAnchor).isActive = true
imageView.trailingAnchor.constraint(equalTo: self.trailingAnchor).isActive = true
imageView.topAnchor.constraint(equalTo: self.topAnchor).isActive = true
imageView.trailingAnchor.constraint(equalTo: self.trailingAnchor).isActive = true
self.imageViews.append(imageView)
}
updateLayout()
}
}
var pageCount: Int {
return images.count
}
var currentPage: CGFloat = 0.0 {
didSet {
updateLayout()
}
}
private func updateLayout() {
for i in 0..<imageViews.count {
let imageView = imageViews[i]
let progress:CGFloat = currentPage - CGFloat(i)
let alpha = max(CGFloat(0.0), min(CGFloat(1.0), progress+1))
imageView.alpha = alpha
}
}
override func layoutSubviews() {
super.layoutSubviews()
updateLayout()
}
}

View file

@ -0,0 +1,66 @@
import UIKit
fileprivate let kDotWidth: CGFloat = 6.0
fileprivate let kExtraDotWidth: CGFloat = kDotWidth * 4
class PageIndicator: UIView {
private var pageViews: [UIView] = []
var pageCount = 0 {
didSet {
pageViews.removeAll()
for _ in 0..<pageCount {
let v = UIView()
v.layer.cornerRadius = kDotWidth / 2.0
v.clipsToBounds = true
pageViews.append(v)
addSubview(v)
}
}
}
var currentPage: CGFloat = 0.0 {
didSet {
updateLayout()
}
}
var color = UIColor(white: 1.0, alpha: 0.2) {
didSet {
updateLayout()
}
}
var activeColor = UIColor(white: 1.0, alpha: 0.7) {
didSet {
updateLayout()
}
}
private func updateLayout() {
for i in 0..<pageCount {
let v = pageViews[i]
let d = CGFloat(i) - currentPage
let ad = abs(d)
let x = kDotWidth * CGFloat(i * 2) + kExtraDotWidth * min(max(0, d), 1)
let w = kDotWidth + kExtraDotWidth * max(0, (1 - ad))
v.frame = CGRect(x: x, y: 0, width: w, height: kDotWidth)
if ad >= 1 {
v.backgroundColor = color
} else {
v.backgroundColor = UIColor.intermediateColor(color1: activeColor, color2: color, ad)
}
}
}
override func layoutSubviews() {
super.layoutSubviews()
updateLayout()
}
override var intrinsicContentSize: CGSize {
let w = (pageCount > 0) ? (kExtraDotWidth + kDotWidth * CGFloat((pageCount - 1) * 2 + 1)) : 0
return CGSize(width: w, height: kDotWidth)
}
}

View file

@ -38,4 +38,10 @@ final class InAppPurchase: NSObject {
serverId: MWMPurchaseManager.bookmarksSubscriptionServerId(),
vendorId: MWMPurchaseManager.bookmarksSubscriptionVendorId())
} ()
@objc static var allPassSubscriptionManager: ISubscriptionManager = {
return SubscriptionManager(productIds: MWMPurchaseManager.allPassProductIds(),
serverId: MWMPurchaseManager.allPassSubscriptionServerId(),
vendorId: MWMPurchaseManager.allPassSubscriptionVendorId())
} ()
}

View file

@ -22,6 +22,9 @@ typedef void (^StartTransactionCallback)(BOOL success, NSString * serverId);
+ (NSString *)adsRemovalServerId;
+ (NSString *)adsRemovalVendorId;
+ (NSArray<NSString *> *)productIds;
+ (NSString *)allPassSubscriptionServerId;
+ (NSString *)allPassSubscriptionVendorId;
+ (NSArray<NSString *> *)allPassProductIds;
+ (NSArray<NSString *> *)legacyProductIds;
+ (NSArray<NSString *> *)bookmarkInappIds;
+ (void)setAdsDisabled:(BOOL)disabled;

View file

@ -34,6 +34,22 @@
@(BOOKMARKS_SUBSCRIPTION_MONTHLY_PRODUCT_ID)];
}
+ (NSString *)allPassSubscriptionServerId
{
return @(BOOKMARKS_SUBSCRIPTION_SERVER_ID);
}
+ (NSString *)allPassSubscriptionVendorId
{
return @(BOOKMARKS_SUBSCRIPTION_VENDOR);
}
+ (NSArray *)allPassProductIds
{
return @[@(BOOKMARKS_SUBSCRIPTION_YEARLY_PRODUCT_ID),
@(BOOKMARKS_SUBSCRIPTION_MONTHLY_PRODUCT_ID)];
}
+ (NSString *)adsRemovalServerId
{
return @(ADS_REMOVAL_SERVER_ID);

View file

@ -0,0 +1,56 @@
import Foundation
protocol ISubscriptionGroup {
var count: Int { get }
subscript(period: SubscriptionPeriod) -> ISubscriptionGroupItem? { get }
}
class SubscriptionGroup: ISubscriptionGroup {
private var subscriptions: [ISubscriptionGroupItem]
var count: Int {
return subscriptions.count
}
init(subscriptions: [ISubscription]) {
let formatter = NumberFormatter()
formatter.locale = subscriptions.first?.priceLocale
formatter.numberStyle = .currency
let weekCycle = NSDecimalNumber(value: 7.0)
let mounthCycle = NSDecimalNumber(value: 30.0)
let yearCycle = NSDecimalNumber(value: 12.0 * 30.0)
var rates:[NSDecimalNumber] = []
var maxPriceRate: NSDecimalNumber = NSDecimalNumber.minimum
maxPriceRate = subscriptions.reduce(into: maxPriceRate) { (result, item) in
let price = item.price
var rate: NSDecimalNumber = NSDecimalNumber()
switch item.period {
case .year:
rate = price.dividing(by: yearCycle);
case .month:
rate = price.dividing(by: mounthCycle);
case .week:
rate = price.dividing(by: weekCycle);
case .unknown:
rate = price
}
result = rate.compare(result) == .orderedDescending ? rate : result;
rates.append(rate)
}
self.subscriptions = []
for (idx, subscription) in subscriptions.enumerated() {
let rate = rates[idx]
let discount = NSDecimalNumber(value: 1).subtracting(rate.dividing(by: maxPriceRate)).multiplying(by: 100)
self.subscriptions.append(SubscriptionGroupItem(subscription, discount: discount, formatter: formatter))
}
}
subscript(period: SubscriptionPeriod) -> ISubscriptionGroupItem? {
return subscriptions.first { (item) -> Bool in
return item.period == period
}
}
}

View file

@ -0,0 +1,63 @@
import Foundation
protocol ISubscriptionGroupItem {
var subscription: ISubscription { get }
var productId: String { get }
var period: SubscriptionPeriod { get }
var price: NSDecimalNumber { get }
var priceLocale: Locale? { get }
var formattedPrice: String { get }
var title: String { get }
var discount: NSDecimalNumber { get }
var formattedDisount: String { get }
var hasDiscount: Bool { get }
}
/// Proxy class for subscription, calculates discount and labels
class SubscriptionGroupItem: ISubscriptionGroupItem{
private(set) var subscription: ISubscription
private let formatter: Formatter
var productId: String{
return subscription.productId
}
var period: SubscriptionPeriod{
return subscription.period
}
var price: NSDecimalNumber{
return subscription.price
}
var priceLocale: Locale?{
return subscription.priceLocale
}
lazy var formattedPrice: String = {
formatter.string(for: price) ?? ""
}()
var title: String {
switch subscription.period {
case .year:
return L("annual_subscription_title")
case .month:
return L("montly_subscription_title")
case .week:
return L("weekly_subscription_title")
case .unknown:
return "Unknown"
}
}
private(set) var discount: NSDecimalNumber = 0
lazy var formattedDisount: String = {
return "- \(discount.rounding(accordingToBehavior: nil).intValue) %"
}()
var hasDiscount: Bool {
return discount.compare(0) == .orderedDescending
}
init(_ subscription: ISubscription, discount: NSDecimalNumber, formatter: Formatter) {
self.subscription = subscription
self.formatter = formatter
self.discount = discount
}
}

Binary file not shown.

View file

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 1@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 1@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 MiB

View file

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 2@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 2@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 MiB

View file

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 3.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 3@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "iPhone 8 Plus - 3@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB

View file

@ -103,6 +103,8 @@
<string>185237551520383</string>
<key>FacebookDisplayName</key>
<string>MapsWithMe, offline maps</string>
<key>Item 0</key>
<string>FedokaOne-Regular.ttf</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
@ -173,6 +175,10 @@
<string>84E00-0F767</string>
<key>Pushwoosh_LOG_LEVEL</key>
<string>WARNING</string>
<key>UIAppFonts</key>
<array>
<string>FredokaOne-Regular.ttf</string>
</array>
<key>UIApplicationShortcutItems</key>
<array>
<dict>

View file

@ -374,8 +374,8 @@
4719A647219CBD7F009F9AA7 /* IBillingPendingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4719A646219CBD7F009F9AA7 /* IBillingPendingTransaction.swift */; };
4719A64E21A30C3B009F9AA7 /* PaidRouteStatistics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4719A64D21A30C3B009F9AA7 /* PaidRouteStatistics.swift */; };
471BBD942130390F00EB17C9 /* TutorialViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 471BBD932130390F00EB17C9 /* TutorialViewController.swift */; };
471C448C2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 471C448A2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.swift */; };
471C448D2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 471C448B2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.xib */; };
471C448C2322A7C800C307EC /* SubscriptionGoToCatalogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 471C448A2322A7C800C307EC /* SubscriptionGoToCatalogViewController.swift */; };
471C448D2322A7C800C307EC /* SubscriptionGoToCatalogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 471C448B2322A7C800C307EC /* SubscriptionGoToCatalogViewController.xib */; };
4726254921C27D4B00C7BAAD /* PlacePageDescriptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4726254821C27D4B00C7BAAD /* PlacePageDescriptionViewController.swift */; };
47289E5A2212DFFF002ABFC0 /* EditOnWebAlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47289E582212DFFF002ABFC0 /* EditOnWebAlertViewController.swift */; };
47289E5B2212DFFF002ABFC0 /* EditOnWebAlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47289E592212DFFF002ABFC0 /* EditOnWebAlertViewController.xib */; };
@ -434,12 +434,12 @@
47C3DB582268CDDB00DF6F91 /* DeeplinkInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C3DB572268CDD800DF6F91 /* DeeplinkInfoViewController.swift */; };
47C7F9732191E15A00C2760C /* InAppBilling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C7F9722191E15A00C2760C /* InAppBilling.swift */; };
47C7F97521930F5300C2760C /* IInAppBilling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C7F97421930F5300C2760C /* IInAppBilling.swift */; };
47C8789022DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C8788E22DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.swift */; };
47C8789122DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47C8788F22DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.xib */; };
47C8789922DF622400A772DA /* BookmarksSubscriptionFailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C8789722DF622400A772DA /* BookmarksSubscriptionFailViewController.swift */; };
47C8789A22DF622400A772DA /* BookmarksSubscriptionFailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47C8789822DF622400A772DA /* BookmarksSubscriptionFailViewController.xib */; };
47C8789D22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C8789B22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.swift */; };
47C8789E22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47C8789C22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.xib */; };
47C8789022DF525A00A772DA /* SubscriptionSuccessViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C8788E22DF525A00A772DA /* SubscriptionSuccessViewController.swift */; };
47C8789122DF525A00A772DA /* SubscriptionSuccessViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47C8788F22DF525A00A772DA /* SubscriptionSuccessViewController.xib */; };
47C8789922DF622400A772DA /* SubscriptionFailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C8789722DF622400A772DA /* SubscriptionFailViewController.swift */; };
47C8789A22DF622400A772DA /* SubscriptionFailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47C8789822DF622400A772DA /* SubscriptionFailViewController.xib */; };
47C8789D22DF662700A772DA /* SubscriptionExpiredViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C8789B22DF662700A772DA /* SubscriptionExpiredViewController.swift */; };
47C8789E22DF662700A772DA /* SubscriptionExpiredViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47C8789C22DF662700A772DA /* SubscriptionExpiredViewController.xib */; };
47D0026721999DA900F651A2 /* PendingTransactionsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47D0026621999DA900F651A2 /* PendingTransactionsHandler.swift */; };
47DF72B922520CE20004AB10 /* MWMRoutingOptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 474902D9224A54EC008D71E0 /* MWMRoutingOptions.mm */; };
47DF72BB225356BF0004AB10 /* DrivingOptions.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 47DF72BA225356BF0004AB10 /* DrivingOptions.storyboard */; };
@ -572,7 +572,14 @@
6B653B951C7F2DE4007BEFC5 /* cuisine-strings in Resources */ = {isa = PBXBuildFile; fileRef = 6B653B931C7F2DE4007BEFC5 /* cuisine-strings */; };
6B9978361C89A316003B8AA0 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 6B9978341C89A316003B8AA0 /* editor.config */; };
7BD07E4A8D71CA41F082BEC7 /* Pods_MAPS_ME.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58E5736C23FC4E77509C9946 /* Pods_MAPS_ME.framework */; };
995738DB235484410019AEE7 /* AllPassSubscriptionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 995738DA235484410019AEE7 /* AllPassSubscriptionViewController.xib */; };
995739042355CAA30019AEE7 /* PageIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 995739032355CAA30019AEE7 /* PageIndicator.swift */; };
995739062355CAC40019AEE7 /* ImageViewCrossDisolve.swift in Sources */ = {isa = PBXBuildFile; fileRef = 995739052355CAC40019AEE7 /* ImageViewCrossDisolve.swift */; };
995739082355CB660019AEE7 /* AllPassSubscriptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 995739072355CB660019AEE7 /* AllPassSubscriptionViewController.swift */; };
99865A1B234F629100127532 /* BookmarksSubscriptionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99865A1A234F629100127532 /* BookmarksSubscriptionButton.swift */; };
99D363172358647700941BF4 /* SubscriptionGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99D363162358647700941BF4 /* SubscriptionGroup.swift */; };
99D363192358685300941BF4 /* SubscriptionGroupItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99D363182358685300941BF4 /* SubscriptionGroupItem.swift */; };
99D3631E23589BE800941BF4 /* FredokaOne-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 99D3631D23589BE800941BF4 /* FredokaOne-Regular.ttf */; };
A630D1EA207CA95900976DEA /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = A630D1E8207CA95900976DEA /* Localizable.stringsdict */; };
B32FE74020D2844600EF7446 /* DownloadedBookmarksViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32FE73E20D2844600EF7446 /* DownloadedBookmarksViewController.swift */; };
B32FE74120D2844600EF7446 /* DownloadedBookmarksViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B32FE73F20D2844600EF7446 /* DownloadedBookmarksViewController.xib */; };
@ -1465,8 +1472,8 @@
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>"; };
471BBD932130390F00EB17C9 /* TutorialViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TutorialViewController.swift; sourceTree = "<group>"; };
471C448A2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionGoToCatalogViewController.swift; sourceTree = "<group>"; };
471C448B2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookmarksSubscriptionGoToCatalogViewController.xib; sourceTree = "<group>"; };
471C448A2322A7C800C307EC /* SubscriptionGoToCatalogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionGoToCatalogViewController.swift; sourceTree = "<group>"; };
471C448B2322A7C800C307EC /* SubscriptionGoToCatalogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SubscriptionGoToCatalogViewController.xib; sourceTree = "<group>"; };
4726254821C27D4B00C7BAAD /* PlacePageDescriptionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageDescriptionViewController.swift; sourceTree = "<group>"; };
47289E582212DFFF002ABFC0 /* EditOnWebAlertViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditOnWebAlertViewController.swift; sourceTree = "<group>"; };
47289E592212DFFF002ABFC0 /* EditOnWebAlertViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EditOnWebAlertViewController.xib; sourceTree = "<group>"; };
@ -1547,12 +1554,12 @@
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>"; };
47C7F976219310D800C2760C /* IMWMPurchaseValidation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IMWMPurchaseValidation.h; sourceTree = "<group>"; };
47C8788E22DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionSuccessViewController.swift; sourceTree = "<group>"; };
47C8788F22DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookmarksSubscriptionSuccessViewController.xib; sourceTree = "<group>"; };
47C8789722DF622400A772DA /* BookmarksSubscriptionFailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionFailViewController.swift; sourceTree = "<group>"; };
47C8789822DF622400A772DA /* BookmarksSubscriptionFailViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookmarksSubscriptionFailViewController.xib; sourceTree = "<group>"; };
47C8789B22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionExpiredViewController.swift; sourceTree = "<group>"; };
47C8789C22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookmarksSubscriptionExpiredViewController.xib; 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>"; };
47C8789722DF622400A772DA /* SubscriptionFailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionFailViewController.swift; sourceTree = "<group>"; };
47C8789822DF622400A772DA /* SubscriptionFailViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SubscriptionFailViewController.xib; sourceTree = "<group>"; };
47C8789B22DF662700A772DA /* SubscriptionExpiredViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionExpiredViewController.swift; sourceTree = "<group>"; };
47C8789C22DF662700A772DA /* SubscriptionExpiredViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SubscriptionExpiredViewController.xib; sourceTree = "<group>"; };
47D0026621999DA900F651A2 /* PendingTransactionsHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PendingTransactionsHandler.swift; sourceTree = "<group>"; };
47DF72BA225356BF0004AB10 /* DrivingOptions.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = DrivingOptions.storyboard; sourceTree = "<group>"; };
47E3C71F21108E9F008B3B27 /* BookmarksLoadedViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksLoadedViewController.swift; sourceTree = "<group>"; };
@ -1633,7 +1640,14 @@
8D1107310486CEB800E47090 /* MAPSME.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = MAPSME.plist; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
978D4A30199A11E600D72CA7 /* faq.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = faq.html; path = ../../data/faq.html; sourceTree = "<group>"; };
97A5967E19B9CD47007A963F /* copyright.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = copyright.html; path = ../../data/copyright.html; sourceTree = "<group>"; };
995738DA235484410019AEE7 /* AllPassSubscriptionViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AllPassSubscriptionViewController.xib; sourceTree = "<group>"; };
995739032355CAA30019AEE7 /* PageIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PageIndicator.swift; sourceTree = "<group>"; };
995739052355CAC40019AEE7 /* ImageViewCrossDisolve.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageViewCrossDisolve.swift; sourceTree = "<group>"; };
995739072355CB660019AEE7 /* AllPassSubscriptionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllPassSubscriptionViewController.swift; sourceTree = "<group>"; };
99865A1A234F629100127532 /* BookmarksSubscriptionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionButton.swift; sourceTree = "<group>"; };
99D363162358647700941BF4 /* SubscriptionGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionGroup.swift; sourceTree = "<group>"; };
99D363182358685300941BF4 /* SubscriptionGroupItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionGroupItem.swift; sourceTree = "<group>"; };
99D3631D23589BE800941BF4 /* FredokaOne-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "FredokaOne-Regular.ttf"; sourceTree = "<group>"; };
9DF04B231B71010E00DACAF1 /* 02_droidsans-fallback.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "02_droidsans-fallback.ttf"; path = "../../data/02_droidsans-fallback.ttf"; sourceTree = "<group>"; };
A367C93A1B17334800E2B6E7 /* resources-default */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-default"; path = "../../data/resources-default"; sourceTree = "<group>"; };
A630D1E9207CA95900976DEA /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ar; path = ar.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
@ -2285,6 +2299,7 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
99D3631D23589BE800941BF4 /* FredokaOne-Regular.ttf */,
F6C3A1B121AC22810060EEC8 /* Alert 5.m4a */,
34D7DB77204ED3DD0041D015 /* maps.me dbg.entitlements */,
CD08888422BCF1C900C1368D /* maps.me full.entitlements */,
@ -3557,6 +3572,8 @@
472E3F482146C4CD0020E412 /* MWMPurchaseManager.h */,
472E3F492146C4CD0020E412 /* MWMPurchaseManager.mm */,
472E3F4B2147D5700020E412 /* Subscription.swift */,
99D363162358647700941BF4 /* SubscriptionGroup.swift */,
99D363182358685300941BF4 /* SubscriptionGroupItem.swift */,
);
path = Subscriptions;
sourceTree = "<group>";
@ -3627,14 +3644,14 @@
children = (
47E3C71F21108E9F008B3B27 /* BookmarksLoadedViewController.swift */,
47E3C72021108E9F008B3B27 /* BookmarksLoadedViewController.xib */,
47C8788E22DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.swift */,
47C8788F22DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.xib */,
47C8789722DF622400A772DA /* BookmarksSubscriptionFailViewController.swift */,
47C8789822DF622400A772DA /* BookmarksSubscriptionFailViewController.xib */,
47C8789B22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.swift */,
47C8789C22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.xib */,
471C448A2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.swift */,
471C448B2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.xib */,
47C8788E22DF525A00A772DA /* SubscriptionSuccessViewController.swift */,
47C8788F22DF525A00A772DA /* SubscriptionSuccessViewController.xib */,
47C8789722DF622400A772DA /* SubscriptionFailViewController.swift */,
47C8789822DF622400A772DA /* SubscriptionFailViewController.xib */,
47C8789B22DF662700A772DA /* SubscriptionExpiredViewController.swift */,
47C8789C22DF662700A772DA /* SubscriptionExpiredViewController.xib */,
471C448A2322A7C800C307EC /* SubscriptionGoToCatalogViewController.swift */,
471C448B2322A7C800C307EC /* SubscriptionGoToCatalogViewController.xib */,
);
path = Dialogs;
sourceTree = "<group>";
@ -3676,6 +3693,7 @@
97B4E9271851DAB300BEC5D7 /* Custom Views */ = {
isa = PBXGroup;
children = (
995739022355CA5D0019AEE7 /* Pages */,
ED48BBB817C2B1E2003E7E92 /* CircleView.h */,
ED48BBB917C2B1E2003E7E92 /* CircleView.mm */,
349A35741B53D4C9009677EE /* CircularProgress */,
@ -3690,10 +3708,32 @@
name = "Custom Views";
sourceTree = "<group>";
};
995738D9235481FE0019AEE7 /* Subscription */ = {
isa = PBXGroup;
children = (
4728F68E22CE430800E00028 /* BookmarksSubscriptionViewController.swift */,
4728F68F22CE430800E00028 /* BookmarksSubscriptionViewController.xib */,
99865A1A234F629100127532 /* BookmarksSubscriptionButton.swift */,
995738DA235484410019AEE7 /* AllPassSubscriptionViewController.xib */,
995739072355CB660019AEE7 /* AllPassSubscriptionViewController.swift */,
);
path = Subscription;
sourceTree = "<group>";
};
995739022355CA5D0019AEE7 /* Pages */ = {
isa = PBXGroup;
children = (
995739032355CAA30019AEE7 /* PageIndicator.swift */,
995739052355CAC40019AEE7 /* ImageViewCrossDisolve.swift */,
);
path = Pages;
sourceTree = "<group>";
};
B32FE73D20D283D600EF7446 /* Catalog */ = {
isa = PBXGroup;
children = (
47C8788D22DF522B00A772DA /* Dialogs */,
995738D9235481FE0019AEE7 /* Subscription */,
B32FE73E20D2844600EF7446 /* DownloadedBookmarksViewController.swift */,
B32FE73F20D2844600EF7446 /* DownloadedBookmarksViewController.xib */,
B32FE74220D2B09600EF7446 /* CatalogWebViewController.swift */,
@ -3705,9 +3745,6 @@
470F5A592181DE7400754295 /* PaidRouteViewController.swift */,
470F5A5A2181DE7400754295 /* PaidRouteViewController.xib */,
45AC339022C4F57C004DC574 /* MWMUTM.h */,
4728F68E22CE430800E00028 /* BookmarksSubscriptionViewController.swift */,
4728F68F22CE430800E00028 /* BookmarksSubscriptionViewController.xib */,
99865A1A234F629100127532 /* BookmarksSubscriptionButton.swift */,
CD4A1F19230EADC100F2A6B6 /* CatalogConnectionErrorView.swift */,
CD4A1F1B230EB43B00F2A6B6 /* CatalogConnectionErrorView.xib */,
47E6688923196F0000057733 /* UIViewController+Subscription.swift */,
@ -4995,16 +5032,18 @@
F6E2FD6E1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */,
345E8F551F839E6C00A826CC /* GoogleService-Info.plist in Resources */,
3477528B1F725002000D46A3 /* UGCAddReviewRatingCell.xib in Resources */,
471C448D2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.xib in Resources */,
471C448D2322A7C800C307EC /* SubscriptionGoToCatalogViewController.xib in Resources */,
F6E2FD741E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */,
349A13851DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */,
34D3B04B1E389D05004100F9 /* MWMNoteCell.xib in Resources */,
995738DB235484410019AEE7 /* AllPassSubscriptionViewController.xib in Resources */,
F6E2FDEF1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
F655C02920727A630048A241 /* DiscoveryMoreCell.xib in Resources */,
34E50DE31F6FCBA1008EED49 /* UGCAddReviewCell.xib in Resources */,
34B6FD602015E6BF00C18E97 /* DiscoveryBookingCell.xib in Resources */,
4788739020EE30B300F6826B /* LayersViewController.xib in Resources */,
F6E2FDF51E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */,
99D3631E23589BE800941BF4 /* FredokaOne-Regular.ttf in Resources */,
CD96C70D22A681C400DB7CFE /* DiscoveryGuideCell.xib in Resources */,
F6E2FDFB1E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.xib in Resources */,
342639361EA0E60A0025EB89 /* local_ads_symbols.txt in Resources */,
@ -5032,7 +5071,7 @@
34AB66711FC5AA330078E451 /* TransportTransitTrain.xib in Resources */,
33046836219C5A4E0041F3A8 /* CategorySettings.storyboard in Resources */,
34BBD6471F82649D0070CA50 /* GoogleSignIn.bundle in Resources */,
47C8789A22DF622400A772DA /* BookmarksSubscriptionFailViewController.xib in Resources */,
47C8789A22DF622400A772DA /* SubscriptionFailViewController.xib in Resources */,
47DF72BB225356BF0004AB10 /* DrivingOptions.storyboard in Resources */,
F6E2FE851E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */,
F6E2FE941E097BA00083EBEC /* PlacePageTaxiCell.xib in Resources */,
@ -5103,9 +5142,9 @@
6741A97D1BF340DE002C974C /* synonyms.txt in Resources */,
34E50DF31F6FCC41008EED49 /* UGCYourReviewCell.xib in Resources */,
CDB4D4D7222D248900104869 /* CarPlayStoryboard.storyboard in Resources */,
47C8789122DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.xib in Resources */,
47C8789122DF525A00A772DA /* SubscriptionSuccessViewController.xib in Resources */,
3476B8E11BFDD33A00874594 /* tts-how-to-set-up-voice-img in Resources */,
47C8789E22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.xib in Resources */,
47C8789E22DF662700A772DA /* SubscriptionExpiredViewController.xib in Resources */,
3476B8DD1BFDD30B00874594 /* tts-how-to-set-up-voice.html in Resources */,
6741A95D1BF340DE002C974C /* types.txt in Resources */,
6741A94B1BF340DE002C974C /* unicode_blocks.txt in Resources */,
@ -5238,6 +5277,7 @@
47B06DFE21B965950094CCAD /* Geo.swift in Sources */,
6741A9A91BF340DE002C974C /* MWMDefaultAlert.mm in Sources */,
340708781F2B5D6C00029ECC /* DimBackground.swift in Sources */,
99D363172358647700941BF4 /* SubscriptionGroup.swift in Sources */,
3490D2DF1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */,
F6E2FDF81E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.mm in Sources */,
472E3F4C2147D5700020E412 /* Subscription.swift in Sources */,
@ -5247,7 +5287,7 @@
F6E2FDEC1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */,
34BBD64C1F826DB10070CA50 /* AuthorizationViewController.swift in Sources */,
F6E2FE101E097BA00083EBEC /* MWMOpeningHoursTableViewCell.mm in Sources */,
47C8789D22DF662700A772DA /* BookmarksSubscriptionExpiredViewController.swift in Sources */,
47C8789D22DF662700A772DA /* SubscriptionExpiredViewController.swift in Sources */,
6741A9B01BF340DE002C974C /* MapsAppDelegate.mm in Sources */,
4719A645219CBD65009F9AA7 /* IPendingTransactionsHandler.swift in Sources */,
34F742321E0834F400AC1FD6 /* UIViewController+Navigation.mm in Sources */,
@ -5262,6 +5302,7 @@
B366130420D5D9BC00E7DC3E /* MWMCategory.m in Sources */,
3486B51E1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */,
F6E2FE491E097BA00083EBEC /* MWMPlacePageData.mm in Sources */,
99D363192358685300941BF4 /* SubscriptionGroupItem.swift in Sources */,
348F8A531F863B6100060C2A /* UGCReview.swift in Sources */,
340475501E081A4600C92850 /* fabric_logging_ios.mm in Sources */,
CDCA273A2237FCFE00167D87 /* SearchTemplateBuilder.swift in Sources */,
@ -5348,6 +5389,7 @@
F6E2FE551E097BA00083EBEC /* MWMPlacePageActionBar.mm in Sources */,
34AB66051FC5AA320078E451 /* MWMNavigationDashboardManager+Entity.mm in Sources */,
34ABA6171C2D185C00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm in Sources */,
995739042355CAA30019AEE7 /* PageIndicator.swift in Sources */,
B33D21AF20DAF9F000BAD749 /* Toast.swift in Sources */,
33B19C67218B481700B323A7 /* TagCollectionViewCell.swift in Sources */,
6741A9D41BF340DE002C974C /* MWMAlertViewController.mm in Sources */,
@ -5426,7 +5468,7 @@
3404F490202898CC0090E401 /* BMCModels.swift in Sources */,
F6E2FD561E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */,
CDB4D5002231412900104869 /* MapTemplateBuilder.swift in Sources */,
47C8789022DF525A00A772DA /* BookmarksSubscriptionSuccessViewController.swift in Sources */,
47C8789022DF525A00A772DA /* SubscriptionSuccessViewController.swift in Sources */,
3462258F1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm in Sources */,
470F5A7D2189BB2F00754295 /* PaidRoutePurchase.swift in Sources */,
34AB66171FC5AA320078E451 /* MWMiPhoneRoutePreview.m in Sources */,
@ -5487,6 +5529,7 @@
348A8DF81F66775A00D83026 /* RatingViewDelegate.swift in Sources */,
4716EABA21A325310029B886 /* IPaidRouteStatistics.swift in Sources */,
3490D2E11CE9DD2500D0B838 /* MWMSideButtonsView.mm in Sources */,
995739062355CAC40019AEE7 /* ImageViewCrossDisolve.swift in Sources */,
47B9065221C7FA400079C85E /* MWMWebImage.m in Sources */,
F6664C021E6459DA00E703C2 /* PPReviewHeaderCell.swift in Sources */,
F6E2FE7C1E097BA00083EBEC /* MWMPlacePageOpeningHoursCell.mm in Sources */,
@ -5678,14 +5721,15 @@
34B924431DC8A29C0008D971 /* MWMMailViewController.mm in Sources */,
340475651E081A4600C92850 /* MWMRouter.mm in Sources */,
47E3C72F2111F472008B3B27 /* CoverVerticalModalTransitioning.swift in Sources */,
471C448C2322A7C800C307EC /* BookmarksSubscriptionGoToCatalogViewController.swift in Sources */,
471C448C2322A7C800C307EC /* SubscriptionGoToCatalogViewController.swift in Sources */,
346DB83D1E5C4F6700E3123E /* GalleryModel.swift in Sources */,
34E776101F14B165003040B3 /* VisibleArea.swift in Sources */,
330473EA21F7440C00DC4AEA /* MWMHotelParams.mm in Sources */,
47C8789922DF622400A772DA /* BookmarksSubscriptionFailViewController.swift in Sources */,
47C8789922DF622400A772DA /* SubscriptionFailViewController.swift in Sources */,
3454D7D71E07F045004AF2AD /* UIKitCategories.mm in Sources */,
47E6CB0B2178BA3600EA102B /* SearchBannerCell.swift in Sources */,
34AB39C21D2BD8310021857D /* MWMStopButton.mm in Sources */,
995739082355CB660019AEE7 /* AllPassSubscriptionViewController.swift in Sources */,
3488B01A1E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */,
34E50DD81F6FCAB1008EED49 /* UGCSummaryRatingCell.swift in Sources */,
6741AA281BF340DE002C974C /* MWMAlert.mm in Sources */,
@ -5867,6 +5911,7 @@
"$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.mapswithme.full;
PROVISIONING_PROFILE_SPECIFIER = "Maps.me Carplay";
};
@ -5889,6 +5934,7 @@
"$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.mapswithme.full;
PROVISIONING_PROFILE_SPECIFIER = "Maps.me Carplay";
};
@ -5909,6 +5955,7 @@
"$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.mapswithme.full;
};
name = "Production Full";
@ -5948,6 +5995,7 @@
"-Wimplicit-retain-self",
);
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER}";
PRODUCT_NAME = "maps.me dbg";
SDKROOT = iphoneos;
@ -5997,6 +6045,7 @@
"-Wimplicit-retain-self",
);
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER}";
PRODUCT_NAME = maps.me;
SDKROOT = iphoneos;
@ -6049,6 +6098,7 @@
"-Wimplicit-retain-self",
);
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_IDENTIFIER}";
PRODUCT_NAME = "maps.me rel";
SDKROOT = iphoneos;

View file

@ -7,5 +7,5 @@ GCC_OPTIMIZATION_LEVEL = 0
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG _DEBUG HAVE_PTHREAD
GCC_UNROLL_LOOPS = NO
MTL_ENABLE_DEBUG_INFO = YES
OTHER_SWIFT_FLAGS = -Xfrontend -warn-long-function-bodies=400 -Xfrontend -warn-long-expression-type-checking=150
OTHER_SWIFT_FLAGS = -Xfrontend -warn-long-function-bodies=400 -Xfrontend -warn-long-expression-type-checking=150 -DDEBUG
SWIFT_OPTIMIZATION_LEVEL = -Onone

View file

@ -189,7 +189,7 @@
45789EE321353CA3009955CC /* program_manager_metal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = program_manager_metal.mm; sourceTree = "<group>"; };
45789EE52135464D009955CC /* metal_program_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = metal_program_params.hpp; sourceTree = "<group>"; };
45789EE62135464D009955CC /* metal_program_params.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = metal_program_params.mm; sourceTree = "<group>"; };
4598437C21394BE000F8CAB2 /* shaders_metal.metallib */ = {isa = PBXFileReference; explicitFileType = "archive.metal-library"; includeInIndex = 0; path = shaders_metal.metallib; sourceTree = BUILT_PRODUCTS_DIR; };
4598437C21394BE000F8CAB2 /* shaders_metal.metallib */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "archive.metal-library"; path = shaders_metal.metallib; sourceTree = BUILT_PRODUCTS_DIR; };
BBF7916F2146D8EC00D27BD8 /* system.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = system.metal; sourceTree = "<group>"; };
BBF7917221493AFC00D27BD8 /* arrow3d.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = arrow3d.metal; sourceTree = "<group>"; };
BBF7917421495FF900D27BD8 /* shapes.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = shapes.metal; sourceTree = "<group>"; };