From abba5b1c511d318dbdc3ef69c111a3b7e66221d0 Mon Sep 17 00:00:00 2001 From: Allan Lang Date: Sun, 15 Oct 2023 20:43:41 +0100 Subject: [PATCH 1/2] Defaults for lat/long meta tags; version bump --- Tree Tracker/Info.plist | 2 +- .../Services/ProtectEarth/ProtectEarthTreeService.swift | 4 ++-- Unit Tests/Info.plist | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tree Tracker/Info.plist b/Tree Tracker/Info.plist index 7d636d3..7a8b63d 100644 --- a/Tree Tracker/Info.plist +++ b/Tree Tracker/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 0.11.0 + 0.11.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) ITSAppUsesNonExemptEncryption diff --git a/Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift b/Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift index b0615f2..ebe6e3a 100644 --- a/Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift +++ b/Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift @@ -72,8 +72,8 @@ class ProtectEarthTreeService: TreeService { // guard let plantedDate = tree.createDate else { return } guard let coordinates: [String] = tree.coordinates?.components(separatedBy: ", ") else { return } - var latitude = "" - var longitude = "" + var latitude = "0" + var longitude = "0" if (coordinates.count == 2) { latitude = coordinates[0] diff --git a/Unit Tests/Info.plist b/Unit Tests/Info.plist index d9cc540..56714be 100644 --- a/Unit Tests/Info.plist +++ b/Unit Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 0.11.0 + 0.11.1 CFBundleVersion 1 From 4bf107ed7e7381c7712dfd4eda00d1489ed64655 Mon Sep 17 00:00:00 2001 From: Allan Lang Date: Sun, 15 Oct 2023 21:18:00 +0100 Subject: [PATCH 2/2] Add Rollbar messaging --- .../ProtectEarth/ProtectEarthTreeService.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift b/Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift index ebe6e3a..3ca4837 100644 --- a/Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift +++ b/Tree Tracker/Services/ProtectEarth/ProtectEarthTreeService.swift @@ -109,6 +109,17 @@ class ProtectEarthTreeService: TreeService { ) .continueWith { (task) -> AnyObject? in // stuff we want to do once the task is *STARTED* + Rollbar.infoMessage("S3 upload started", data: [ + "bucket-path": "\(Secrets.awsBucketPrefix)/\(tree.treeId)", + "x-amz-meta-planted-at": tree.createDate?.ISO8601Format(), + "x-amz-meta-supervisor": tree.supervisor, + "x-amz-meta-latitude": latitude, + "x-amz-meta-longitude": longitude, + "x-amz-meta-site": tree.site, + "x-amz-meta-species": tree.species, + "x-amz-meta-phimageid": tree.phImageId, + "x-amz-meta-md5": md5 + ]) return nil } }