From 75d059dd01a3fbe57ce16048adae679d66a32fe0 Mon Sep 17 00:00:00 2001 From: Allan Lang Date: Fri, 16 Sep 2022 22:38:02 +0100 Subject: [PATCH 1/2] Device ID in Rollbar config; also show in settings --- Tree Tracker/AppDelegate.swift | 1 + Tree Tracker/Screens/Settings/SettingsController.swift | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Tree Tracker/AppDelegate.swift b/Tree Tracker/AppDelegate.swift index 1c82914..83a2e00 100644 --- a/Tree Tracker/AppDelegate.swift +++ b/Tree Tracker/AppDelegate.swift @@ -9,6 +9,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let config = RollbarConfig() config.destination.accessToken = Secrets.rollbarAuthToken config.destination.environment = Constants.Http.protectEarthEnvironmentName + config.person.id = UIDevice.current.identifierForVendor?.uuidString ?? "unknown" Rollbar.initWithConfiguration(config) Rollbar.infoMessage("App startup") diff --git a/Tree Tracker/Screens/Settings/SettingsController.swift b/Tree Tracker/Screens/Settings/SettingsController.swift index a51324f..6a09595 100644 --- a/Tree Tracker/Screens/Settings/SettingsController.swift +++ b/Tree Tracker/Screens/Settings/SettingsController.swift @@ -24,7 +24,7 @@ class SettingsController: UITableViewController { // MARK: - Datasource override func numberOfSections(in tableView: UITableView) -> Int { - return 2 + return 3 } override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { @@ -33,6 +33,8 @@ class SettingsController: UITableViewController { return "Entities" case 1: return "API" + case 2: + return "Device ID" default: return "Error" } @@ -44,6 +46,8 @@ class SettingsController: UITableViewController { return entityTypes.count case 1: return apiProperties.count + case 2: + return 1 default: return 0 } @@ -58,6 +62,9 @@ class SettingsController: UITableViewController { case 1: cell.textLabel?.text = apiProperties[indexPath.item] cell.selectionStyle = .none + case 2: + cell.textLabel?.text = UIDevice.current.identifierForVendor?.uuidString ?? "unknown" + cell.selectionStyle = .none default: break } From 81c7d40fdb93b124d59900c620afcadce0019e0b Mon Sep 17 00:00:00 2001 From: Allan Lang Date: Fri, 16 Sep 2022 22:40:40 +0100 Subject: [PATCH 2/2] Bump version --- Tree Tracker/Info.plist | 2 +- Unit Tests/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tree Tracker/Info.plist b/Tree Tracker/Info.plist index 4aa4399..3608151 100644 --- a/Tree Tracker/Info.plist +++ b/Tree Tracker/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 0.10.3 + 0.10.4 CFBundleVersion $(CURRENT_PROJECT_VERSION) ITSAppUsesNonExemptEncryption diff --git a/Unit Tests/Info.plist b/Unit Tests/Info.plist index 2bd7ac5..b6eeb82 100644 --- a/Unit Tests/Info.plist +++ b/Unit Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 0.10.3 + 0.10.4 CFBundleVersion 1