From 3d15d1c5c763960ac3bcbf577c758361618651ae Mon Sep 17 00:00:00 2001 From: Lapisoft Date: Tue, 8 Feb 2022 13:59:16 +0100 Subject: [PATCH 01/10] Add navigation to a location with a coordinate * Add button in interface to allow navigation to a location * Improve documentation of select and navigate to poi --- CHANGELOG_UNRELEASED.md | 5 +++ .../Base.lproj/Main.storyboard | 24 ++++++++++++-- Example/SitumWayfinding/ViewController.swift | 32 +++++++++++++++++-- .../WayfindingController.swift | 8 ++--- .../PositioningViewController.swift | 26 ++++++++++++++- .../Classes/WayfindingLibrary/SitumMap.swift | 16 ++++++++-- .../WayfindingLibrary/SitumMapsLibrary.swift | 29 ++++++++++------- 7 files changed, 115 insertions(+), 25 deletions(-) diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index e69de29..64d3433 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -0,0 +1,5 @@ +## [0.2.0] - 2022-02-08 + +### Added +* Added method navigateToLocation(floor, lat, lng) on SitumMapLibrary to navigate towards a coordinate on the map +specified by latitude and longitude. \ No newline at end of file diff --git a/Example/SitumWayfinding/Base.lproj/Main.storyboard b/Example/SitumWayfinding/Base.lproj/Main.storyboard index 7278979..dc7a044 100644 --- a/Example/SitumWayfinding/Base.lproj/Main.storyboard +++ b/Example/SitumWayfinding/Base.lproj/Main.storyboard @@ -24,7 +24,7 @@ - + + - + + + + + @@ -118,19 +127,24 @@ - + + + + + + diff --git a/Example/SitumWayfinding/ViewController.swift b/Example/SitumWayfinding/ViewController.swift index 96795f8..2121ed0 100644 --- a/Example/SitumWayfinding/ViewController.swift +++ b/Example/SitumWayfinding/ViewController.swift @@ -23,6 +23,9 @@ class ViewController: UIViewController { private var selectedPoi: SITPOI? = nil private var action: WYFAction? private let cellId = "cell" + + @IBOutlet weak var remoteConfigSwitch: UISwitch! + override func viewDidLoad() { super.viewDidLoad() @@ -94,6 +97,7 @@ class ViewController: UIViewController { vc.credentials = credentials vc.buildingId = buildingId vc.action = action + vc.useRemoteConfig = remoteConfigSwitch.isOn } } } diff --git a/Example/SitumWayfinding/WayfindingController.swift b/Example/SitumWayfinding/WayfindingController.swift index 3b0f85f..ca3efb3 100644 --- a/Example/SitumWayfinding/WayfindingController.swift +++ b/Example/SitumWayfinding/WayfindingController.swift @@ -19,6 +19,7 @@ class WayfindingController: UIViewController, OnPoiSelectionListener, OnFloorCha var action: WYFAction? var credentials: Credentials! var buildingId: String! + var useRemoteConfig: Bool = false var library: SitumMapsLibrary? @@ -30,7 +31,7 @@ class WayfindingController: UIViewController, OnPoiSelectionListener, OnFloorCha let settings = LibrarySettings.Builder() .setCredentials(credentials: credentials) .setBuildingId(buildingId: buildingId) - .setUseRemoteConfig(useRemoteConfig: true) + .setUseRemoteConfig(useRemoteConfig: useRemoteConfig) .build() self.library = SitumMapsLibrary(containedBy: self.containerView, controlledBy: self, withSettings: settings) diff --git a/SitumWayfinding/Classes/WayfindingLibrary/SitumMapsLibrary.swift b/SitumWayfinding/Classes/WayfindingLibrary/SitumMapsLibrary.swift index f902345..a0ea7a6 100644 --- a/SitumWayfinding/Classes/WayfindingLibrary/SitumMapsLibrary.swift +++ b/SitumWayfinding/Classes/WayfindingLibrary/SitumMapsLibrary.swift @@ -65,6 +65,7 @@ import GoogleMaps if let settings = getSettings() { let mapView = settings.googleMap != nil ? settings.googleMap : obtainGMSMapView() prepareForLoading(buildingWithId: settings.buildingId, withMap: mapView) + SITServices.setUseRemoteConfig(settings.useRemoteConfig) UIUtils().present(the: self.toPresentViewController!, over: self.parentViewControler, in: self.containerView) } // NOTE: else unnecessary: validateSettings already checks settings not nil } From 2e501b620567c3b0d16b6cd43c99b92f453c1613 Mon Sep 17 00:00:00 2001 From: Abraham Barros Date: Fri, 18 Feb 2022 10:32:01 +0100 Subject: [PATCH 07/10] bug fix in remote config initialization --- .../Classes/Positioning/PositioningViewController.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SitumWayfinding/Classes/Positioning/PositioningViewController.swift b/SitumWayfinding/Classes/Positioning/PositioningViewController.swift index c1d5472..498b0e5 100644 --- a/SitumWayfinding/Classes/Positioning/PositioningViewController.swift +++ b/SitumWayfinding/Classes/Positioning/PositioningViewController.swift @@ -138,7 +138,11 @@ class PositioningViewController: UIViewController, GMSMapViewDelegate, UITableVi self.situmLoadFinished(loadingAlert: loadingAlert) self.presenter = PositioningPresenter(view: self, buildingInfo: self.buildingInfo!, interceptorsManager: self.library?.interceptorsManager ?? InterceptorsManager()) - self.presenter?.useRemoteConfig = ((self.library?.settings?.useRemoteConfig) != nil) + if let lib = self.library { + if let set = lib.settings { + self.presenter?.useRemoteConfig = set.useRemoteConfig + } + } self.initializeUIElements() } }, failure: { (error: Error?) in From d3059dbd1a8f89fe6a846e208064617e17c486e7 Mon Sep 17 00:00:00 2001 From: Abraham Barros Date: Mon, 21 Feb 2022 09:55:55 +0100 Subject: [PATCH 08/10] updated changelog and version number --- CHANGELOG.md | 7 +++++++ CHANGELOG_UNRELEASED.md | 5 ----- SitumWayfinding.podspec | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ac5fb7..b3323d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. All non released changes should be in CHANGELOG_UNRELEASED.md file --------- +## [0.1.22] - 2022-02-21 +# Added +* Added method navigateToLocation(floor, lat, lng) on SitumMapLibrary to navigate to a location in the current building. +The location is specified by a floor, a latitude and a longitude + +* Included functionality to configure and use remote configuration to initialize location engine. See https://situm.com/docs/07-remote-configuration/ to learn more on how to use this functionality. + ## [0.1.21] - 2022-02-07 ### Addded diff --git a/CHANGELOG_UNRELEASED.md b/CHANGELOG_UNRELEASED.md index 5983a88..e69de29 100644 --- a/CHANGELOG_UNRELEASED.md +++ b/CHANGELOG_UNRELEASED.md @@ -1,5 +0,0 @@ -# Added -* Added method navigateToLocation(floor, lat, lng) on SitumMapLibrary to navigate to a location in the current building. -The location is specified by a floor, a latitude and a longitude - -* Included functionality to configure and use remote configuration to initialize location engine. See https://situm.com/docs/07-remote-configuration/ to learn more on how to use this functionality. \ No newline at end of file diff --git a/SitumWayfinding.podspec b/SitumWayfinding.podspec index e6c1071..31cd7c1 100644 --- a/SitumWayfinding.podspec +++ b/SitumWayfinding.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'SitumWayfinding' - s.version = '0.1.21' + s.version = '0.1.22' s.summary = 'Indoor Location for iOS.' s.static_framework = true From 394be49c089563ed03074c76b495dbad462ec5d2 Mon Sep 17 00:00:00 2001 From: Abraham Barros Date: Mon, 21 Feb 2022 10:04:13 +0100 Subject: [PATCH 09/10] updating version and pod dependencies --- Example/Podfile.lock | 8 ++++---- scripts/framework.properties | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index a28f8d1..eead7db 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -8,10 +8,10 @@ PODS: - SitumSDK (2.52.0): - Protobuf (~> 3.7) - SSZipArchive (~> 2.4) - - SitumWayfinding (0.1.21): + - SitumWayfinding (0.1.22): - GoogleMaps (~> 4.2.0) - SitumSDK (~> 2.52.0) - - SSZipArchive (2.4.2) + - SSZipArchive (2.4.3) DEPENDENCIES: - SitumWayfinding (from `../`) @@ -31,8 +31,8 @@ SPEC CHECKSUMS: GoogleMaps: eb03e327edfd70b06de1e6e321653f73712df7ad Protobuf: 235750e4696ff59fb07d949a9dbbc92b3c0700fe SitumSDK: cc0a5b48a90669c463622b12ae6f07588863f5af - SitumWayfinding: cf842d0899a923a7885c1bcbedb6a72aa6d89c62 - SSZipArchive: e7b4f3d9e780c2acc1764cd88fbf2de28f26e5b2 + SitumWayfinding: 9f56c9004b7136580ab154830c758416fb977919 + SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef PODFILE CHECKSUM: 181eb894514efe3e0119ec84dae5349934aaaa20 diff --git a/scripts/framework.properties b/scripts/framework.properties index fa0aee3..d9e3e22 100644 --- a/scripts/framework.properties +++ b/scripts/framework.properties @@ -1 +1 @@ -frameworkVersion=0.1.21 +frameworkVersion=0.1.22 From 7134336422215fa444de309c518d8c438d84bbc6 Mon Sep 17 00:00:00 2001 From: Abraham Barros Date: Mon, 21 Feb 2022 10:20:52 +0100 Subject: [PATCH 10/10] fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3323d2..c359d6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ All non released changes should be in CHANGELOG_UNRELEASED.md file * Added method navigateToLocation(floor, lat, lng) on SitumMapLibrary to navigate to a location in the current building. The location is specified by a floor, a latitude and a longitude -* Included functionality to configure and use remote configuration to initialize location engine. See https://situm.com/docs/07-remote-configuration/ to learn more on how to use this functionality. +* Added the method setUseRemoteConfig(Bool) to LibrarySettings to start positioning using the Remote Configuration. The default value is false. When this parameter is set to true the local settings will be overwritten. ## [0.1.21] - 2022-02-07