Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/iphone
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2019-03-29 17:00:50 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2019-04-08 18:43:37 +0300
commitfb7325b80ebd8afaeca7c2b12eae99c282a002bd (patch)
tree7c448584278f2cae1f19aec952d94244fc62a5d6 /iphone
parent00a432ebe2dc0036a2969ad71229cf240d72b8cc (diff)
[android][ios]statistic events are added for Guides + review fixes
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift12
-rw-r--r--iphone/Maps/Bridging-Header.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift
index 093a3327d9..3ac1744d34 100644
--- a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift
+++ b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift
@@ -260,6 +260,7 @@ final class CatalogWebViewController: WebViewController {
if MWMBookmarksManager.shared().getCatalogDownloadsCount() == 0 {
Statistics.logEvent(kStatInappProductDelivered, withParameters: [kStatVendor: BOOKMARKS_VENDOR,
kStatPurchase: categoryInfo.id])
+ logToPushWoosh(categoryInfo)
MapViewController.shared().showBookmarksLoadedAlert(categoryId)
}
}
@@ -324,6 +325,17 @@ final class CatalogWebViewController: WebViewController {
}
}
+private func logToPushWoosh(_ categoryInfo: CatalogCategoryInfo) {
+ let pushManager = PushNotificationManager.push()
+
+ if categoryInfo.productId == nil {
+ pushManager!.setTags(["Bookmarks_Guides_free_title": categoryInfo.name]);
+ } else {
+ pushManager!.setTags(["Bookmarks_Guides_paid_tier": categoryInfo.productId!]);
+ pushManager!.setTags(["Bookmarks_Guides_paid_title": categoryInfo.name]);
+ }
+}
+
extension CatalogWebViewController: PaidRouteViewControllerDelegate {
func didCompletePurchase(_ viewController: PaidRouteViewController) {
dismiss(animated: true)
diff --git a/iphone/Maps/Bridging-Header.h b/iphone/Maps/Bridging-Header.h
index 749e6d5f3c..b849cba7da 100644
--- a/iphone/Maps/Bridging-Header.h
+++ b/iphone/Maps/Bridging-Header.h
@@ -8,6 +8,7 @@
#import "GoogleSignIn/GIDSignIn.h"
#import "MyTargetSDK/MyTargetSDK.h"
#import "MyTrackerSDK/MRMyTracker.h"
+#import "Pushwoosh/PushNotificationManager.h"
#import "UIKit/UIKit.h"
#import "3party/Alohalytics/src/alohalytics_objc.h"