diff --git a/CHANGELOG.md b/CHANGELOG.md index 62ba028..8b39cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,32 @@ --- +## [0.11.0] + +### Breaking changes + +* `LocationSourceSimulator` has been renamed to `SimulatorLocationSource` +* `NavigationDelegate` has been renamed to `NavigationManagerDelegate` +* `WemapMap.getStyleURL(withMapID:token:)` has been renamed to `WemapMap.getMapData(mapID:token:)` +* `PolestarLocationSource` has been moved to `WemapPositioningSDKPolestar` framework +* `VPSARKit*` classes have been moved from `WemapPositioningSDK` to `WemapPositioningSDKVPSARKit` framework + +### Added + +* MapSDK: Add NavigationManager.hasActiveNavigation +* MapSDK: have a method to startNavigation with itineraries as parameter +* PosSDK: Add "isAvailable" method to LocationSource +* MapSDK: add possibility to center a POI with optional padding + +### Changed + +* MapSDK: Refactor (i) button popup + +### Fixed + +* PosSDK: "Scan Required" state of VPSARKit location source is never reached +* PosSDK: VPS orientation is wrong + ## [0.10.0] ### Added diff --git a/Examples.xcodeproj/project.pbxproj b/Examples.xcodeproj/project.pbxproj index 4853451..aa994e0 100644 --- a/Examples.xcodeproj/project.pbxproj +++ b/Examples.xcodeproj/project.pbxproj @@ -15,15 +15,17 @@ D250CA2C28D31E4D00DBFF5D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D250CA2628D31E4D00DBFF5D /* LaunchScreen.storyboard */; }; D250CA3F28D31EF100DBFF5D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D250CA2528D31E4D00DBFF5D /* Assets.xcassets */; }; D250CA4028D31EF100DBFF5D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D250CA2628D31E4D00DBFF5D /* LaunchScreen.storyboard */; }; + D26AB6362B304C3100408BF8 /* UserDefaults+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AB6352B304C3000408BF8 /* UserDefaults+Additions.swift */; }; + D26AB6372B304C3100408BF8 /* UserDefaults+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AB6352B304C3000408BF8 /* UserDefaults+Additions.swift */; }; + D26AB6392B3050B100408BF8 /* UIConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AB6382B3050B100408BF8 /* UIConstants.swift */; }; + D26AB63A2B3050B100408BF8 /* UIConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AB6382B3050B100408BF8 /* UIConstants.swift */; }; + D26AB63C2B30515400408BF8 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = D208E10629C312C0007CCC8A /* Constants.swift */; }; D273E31A2AA0DE5E00114854 /* InitialViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D273E3152AA0DE5E00114854 /* InitialViewController.swift */; }; D273E31B2AA0DE5E00114854 /* NavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D273E3162AA0DE5E00114854 /* NavigationViewController.swift */; }; - D273E31F2AA0DEEC00114854 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = D273E31E2AA0DEEC00114854 /* Constants.swift */; }; D273E3202AA0DF1D00114854 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D22EC7472A79017A007BC4DE /* MapViewController.swift */; }; D273E3212AA0E3B200114854 /* ToastHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A6255328F6C08400274721 /* ToastHelper.swift */; }; D273E3222AA0E41000114854 /* LocationSourceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D22EC7412A78166E007BC4DE /* LocationSourceType.swift */; }; - D273E3242AA0E45F00114854 /* PolestarLocationSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D286990E2A7CFD200026A53B /* PolestarLocationSource.swift */; }; D273E3262AA0EDDC00114854 /* LocationSourceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D273E3252AA0EDDC00114854 /* LocationSourceType.swift */; }; - D286990F2A7CFD200026A53B /* PolestarLocationSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D286990E2A7CFD200026A53B /* PolestarLocationSource.swift */; }; D2A55FE1297FE32600402286 /* SettingsBundleHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A55FE0297FE32600402286 /* SettingsBundleHelper.swift */; }; D2A55FE629801A3700402286 /* SettingsBundleHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2A55FE0297FE32600402286 /* SettingsBundleHelper.swift */; }; D2A6254428F6AB0000274721 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D2A6254128F6AB0000274721 /* Assets.xcassets */; }; @@ -57,16 +59,16 @@ D208E10629C312C0007CCC8A /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; D22EC7412A78166E007BC4DE /* LocationSourceType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationSourceType.swift; sourceTree = ""; }; D22EC7472A79017A007BC4DE /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = ""; }; - D250C9D728D3176F00DBFF5D /* MapExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MapExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D250C9D728D3176F00DBFF5D /* Map.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Map.app; sourceTree = BUILT_PRODUCTS_DIR; }; D250CA2528D31E4D00DBFF5D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; D250CA2728D31E4D00DBFF5D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; D250CA2A28D31E4D00DBFF5D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D250CA4428D31EF100DBFF5D /* Map+PositioningExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Map+PositioningExample.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + D250CA4428D31EF100DBFF5D /* Map+Pos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Map+Pos.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + D26AB6352B304C3000408BF8 /* UserDefaults+Additions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UserDefaults+Additions.swift"; sourceTree = ""; }; + D26AB6382B3050B100408BF8 /* UIConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIConstants.swift; sourceTree = ""; }; D273E3152AA0DE5E00114854 /* InitialViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InitialViewController.swift; sourceTree = ""; }; D273E3162AA0DE5E00114854 /* NavigationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationViewController.swift; sourceTree = ""; }; - D273E31E2AA0DEEC00114854 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; D273E3252AA0EDDC00114854 /* LocationSourceType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationSourceType.swift; sourceTree = ""; }; - D286990E2A7CFD200026A53B /* PolestarLocationSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PolestarLocationSource.swift; sourceTree = ""; }; D2A55FE0297FE32600402286 /* SettingsBundleHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsBundleHelper.swift; sourceTree = ""; }; D2A6254128F6AB0000274721 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; D2A6254328F6AB0000274721 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -134,8 +136,8 @@ D250C9D828D3176F00DBFF5D /* Products */ = { isa = PBXGroup; children = ( - D250C9D728D3176F00DBFF5D /* MapExample.app */, - D250CA4428D31EF100DBFF5D /* Map+PositioningExample.app */, + D250C9D728D3176F00DBFF5D /* Map.app */, + D250CA4428D31EF100DBFF5D /* Map+Pos.app */, ); name = Products; sourceTree = ""; @@ -188,14 +190,6 @@ name = Frameworks; sourceTree = ""; }; - D2651FB52A95F60000F698E5 /* LocationSources */ = { - isa = PBXGroup; - children = ( - D286990E2A7CFD200026A53B /* PolestarLocationSource.swift */, - ); - path = LocationSources; - sourceTree = ""; - }; D273E3132AA0DE5E00114854 /* ViewControllers */ = { isa = PBXGroup; children = ( @@ -210,7 +204,6 @@ isa = PBXGroup; children = ( D2FD56B329802C6C003F508D /* Config.swift */, - D208E10629C312C0007CCC8A /* Constants.swift */, D2D62C5329E6F75C0000463E /* ConsumerData.swift */, D273E3252AA0EDDC00114854 /* LocationSourceType.swift */, D2D62C4A29E6F68D0000463E /* ViewControllers */, @@ -244,10 +237,12 @@ isa = PBXGroup; children = ( D2A6254D28F6AEB900274721 /* AppDelegate.swift */, + D208E10629C312C0007CCC8A /* Constants.swift */, D22EC7472A79017A007BC4DE /* MapViewController.swift */, D2A55FE0297FE32600402286 /* SettingsBundleHelper.swift */, D2A6255328F6C08400274721 /* ToastHelper.swift */, - D2651FB52A95F60000F698E5 /* LocationSources */, + D26AB6382B3050B100408BF8 /* UIConstants.swift */, + D26AB6352B304C3000408BF8 /* UserDefaults+Additions.swift */, ); path = Sources; sourceTree = ""; @@ -268,7 +263,6 @@ isa = PBXGroup; children = ( D2FD56B52980341A003F508D /* Config.swift */, - D273E31E2AA0DEEC00114854 /* Constants.swift */, D22EC7412A78166E007BC4DE /* LocationSourceType.swift */, D273E3132AA0DE5E00114854 /* ViewControllers */, ); @@ -294,7 +288,7 @@ ); name = MapExample; productName = Examples; - productReference = D250C9D728D3176F00DBFF5D /* MapExample.app */; + productReference = D250C9D728D3176F00DBFF5D /* Map.app */; productType = "com.apple.product-type.application"; }; D250CA2F28D31EF100DBFF5D /* Map+PositioningExample */ = { @@ -313,7 +307,7 @@ ); name = "Map+PositioningExample"; productName = Examples; - productReference = D250CA4428D31EF100DBFF5D /* Map+PositioningExample.app */; + productReference = D250CA4428D31EF100DBFF5D /* Map+Pos.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -468,6 +462,8 @@ files = ( D2D62C5429E6F75C0000463E /* ConsumerData.swift in Sources */, D2D62C4F29E6F7450000463E /* NavigationViewController.swift in Sources */, + D26AB6392B3050B100408BF8 /* UIConstants.swift in Sources */, + D26AB6362B304C3100408BF8 /* UserDefaults+Additions.swift in Sources */, D273E3262AA0EDDC00114854 /* LocationSourceType.swift in Sources */, D2A55FE1297FE32600402286 /* SettingsBundleHelper.swift in Sources */, D2A6254E28F6AEB900274721 /* AppDelegate.swift in Sources */, @@ -477,7 +473,6 @@ D2D62C5129E6F7450000463E /* POIsViewController.swift in Sources */, D2D62C5229E6F7450000463E /* LevelsViewController.swift in Sources */, D2D62C5029E6F7450000463E /* SamplesTableViewController.swift in Sources */, - D286990F2A7CFD200026A53B /* PolestarLocationSource.swift in Sources */, D22EC7482A79017A007BC4DE /* MapViewController.swift in Sources */, D208E10729C312C0007CCC8A /* Constants.swift in Sources */, ); @@ -493,11 +488,12 @@ D273E31A2AA0DE5E00114854 /* InitialViewController.swift in Sources */, D2FD56B62980341A003F508D /* Config.swift in Sources */, D273E31B2AA0DE5E00114854 /* NavigationViewController.swift in Sources */, - D273E3242AA0E45F00114854 /* PolestarLocationSource.swift in Sources */, D273E3222AA0E41000114854 /* LocationSourceType.swift in Sources */, - D273E31F2AA0DEEC00114854 /* Constants.swift in Sources */, + D26AB6372B304C3100408BF8 /* UserDefaults+Additions.swift in Sources */, D273E3202AA0DF1D00114854 /* MapViewController.swift in Sources */, D273E3212AA0E3B200114854 /* ToastHelper.swift in Sources */, + D26AB63A2B3050B100408BF8 /* UIConstants.swift in Sources */, + D26AB63C2B30515400408BF8 /* Constants.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -660,7 +656,7 @@ DEVELOPMENT_TEAM = 64DXV5M5R8; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Examples/Resources/Info.plist; - INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "For Polestar"; + INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "Used for Polestar"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Used to track user location"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; @@ -671,9 +667,9 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.10.0; + MARKETING_VERSION = 0.11.0; PRODUCT_BUNDLE_IDENTIFIER = com.getwemap.example.map.debug; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = Map; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -692,7 +688,7 @@ DEVELOPMENT_TEAM = 64DXV5M5R8; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Examples/Resources/Info.plist; - INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "For Polestar"; + INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "Used for Polestar"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Used to track user location"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; @@ -703,9 +699,9 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.10.0; + MARKETING_VERSION = 0.11.0; PRODUCT_BUNDLE_IDENTIFIER = com.getwemap.example.map; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = Map; PROVISIONING_PROFILE_SPECIFIER = "match AdHoc com.getwemap.example.map"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -724,6 +720,7 @@ DEVELOPMENT_TEAM = 64DXV5M5R8; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Examples/Resources/Info.plist; + INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "Used for Polestar"; INFOPLIST_KEY_NSCameraUsageDescription = "Used for VPS"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Used to track user location"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; @@ -737,7 +734,7 @@ ); MARKETING_VERSION = 0.10.0; PRODUCT_BUNDLE_IDENTIFIER = com.getwemap.example.map.positioning.debug; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = "Map+Pos"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -756,6 +753,7 @@ DEVELOPMENT_TEAM = 64DXV5M5R8; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Examples/Resources/Info.plist; + INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "Used for Polestar"; INFOPLIST_KEY_NSCameraUsageDescription = "Used for VPS"; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Used to track user location"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; @@ -769,7 +767,7 @@ ); MARKETING_VERSION = 0.10.0; PRODUCT_BUNDLE_IDENTIFIER = com.getwemap.example.map.positioning; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = "Map+Pos"; PROVISIONING_PROFILE_SPECIFIER = "match AdHoc com.getwemap.example.map.positioning"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; diff --git a/Examples.xcodeproj/xcshareddata/xcschemes/Map+PositioningExample.xcscheme b/Examples.xcodeproj/xcshareddata/xcschemes/Map+PositioningExample.xcscheme index 42a5944..547763f 100644 --- a/Examples.xcodeproj/xcshareddata/xcschemes/Map+PositioningExample.xcscheme +++ b/Examples.xcodeproj/xcshareddata/xcschemes/Map+PositioningExample.xcscheme @@ -15,7 +15,7 @@ @@ -33,7 +33,7 @@ @@ -56,7 +56,7 @@ @@ -73,7 +73,7 @@ diff --git a/Examples.xcodeproj/xcshareddata/xcschemes/MapExample.xcscheme b/Examples.xcodeproj/xcshareddata/xcschemes/MapExample.xcscheme index 1e62e1d..f2c919f 100644 --- a/Examples.xcodeproj/xcshareddata/xcschemes/MapExample.xcscheme +++ b/Examples.xcodeproj/xcshareddata/xcschemes/MapExample.xcscheme @@ -15,7 +15,7 @@ @@ -33,7 +33,7 @@ @@ -78,7 +78,7 @@ @@ -95,7 +95,7 @@ diff --git a/Examples/Map+Positioning/Resources/Settings.bundle/Root.plist b/Examples/Map+Positioning/Resources/Settings.bundle/Root.plist index d7108ee..57c2fc8 100644 --- a/Examples/Map+Positioning/Resources/Settings.bundle/Root.plist +++ b/Examples/Map+Positioning/Resources/Settings.bundle/Root.plist @@ -94,13 +94,29 @@ Type - PSTitleValueSpecifier + PSGroupSpecifier Title - Turf + Camera image side + FooterText + The maximum size of the smaller side of the camera image sent to the server + + + Type + PSTextFieldSpecifier + Title + Camera image side Key - turfVersion + cameraImageMaxSizeSmallerSide DefaultValue - Unknown + 720 + IsSecure + + KeyboardType + NumberPad + AutocapitalizationType + None + AutocorrectionType + No diff --git a/Examples/Map+Positioning/Sources/Config.swift b/Examples/Map+Positioning/Sources/Config.swift index e35b136..ba39806 100644 --- a/Examples/Map+Positioning/Sources/Config.swift +++ b/Examples/Map+Positioning/Sources/Config.swift @@ -8,15 +8,20 @@ import WemapMapSDK import WemapPositioningSDK +import WemapPositioningSDKVPSARKit -private enum PreferencesKey: String { +enum PreferencesKey: String { case mapVersion, positioningVersion, - mapLibreVersion + mapLibreVersion, + cameraImageMaxSizeSmallerSide } func customKeysAndValues() -> [String: Any] { + VPSARKitConstants.cameraImageMaxSizeSmallerSide = UserDefaults + .double(forKey: .cameraImageMaxSizeSmallerSide, defaultValue: VPSARKitConstants.cameraImageMaxSizeSmallerSide) + let specificKeysAndValues: [PreferencesKey: Any] = [ .mapVersion: Bundle.map.version, .mapLibreVersion: Bundle.mapLibre.version, diff --git a/Examples/Map+Positioning/Sources/Constants.swift b/Examples/Map+Positioning/Sources/Constants.swift deleted file mode 100644 index 4a3345c..0000000 --- a/Examples/Map+Positioning/Sources/Constants.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Constants.swift -// Map+PositioningExample -// -// Created by Evgenii Khrushchev on 31/08/2023. -// Copyright © 2023 Wemap SAS. All rights reserved. -// - -import Foundation -import WemapCoreSDK - -enum Constants { - - static var mapID: Int { - fatalError("Specify mapID and remove fatalError") - } - - static var token: String { - fatalError("Specify token and remove fatalError") - } - - static var polestarApiKey: String { - fatalError("Specify polestarApiKey and remove fatalError") - } -} - -enum UIConstants { - - enum Delay { - static let short: TimeInterval = 5 - static let long: TimeInterval = 10 - } - - enum Inset { - static let top: CGFloat = -200 - static let mid: CGFloat = -150 - } -} diff --git a/Examples/Map+Positioning/Sources/LocationSourceType.swift b/Examples/Map+Positioning/Sources/LocationSourceType.swift index bb4cfad..a1dcd70 100644 --- a/Examples/Map+Positioning/Sources/LocationSourceType.swift +++ b/Examples/Map+Positioning/Sources/LocationSourceType.swift @@ -6,10 +6,6 @@ // Copyright © 2023 Wemap SAS. All rights reserved. // -import WemapCoreSDK -import WemapMapSDK -import WemapPositioningSDK - enum LocationSourceType: Int, CaseIterable { case vps, @@ -20,11 +16,11 @@ enum LocationSourceType: Int, CaseIterable { var name: String { switch self { - case .simulator: return "Simulator" - case .polestar: return "Polestar" - case .systemDefault: return "System Default" - case .polestarEmulator: return "Polestar Emulator" - case .vps: return "VPS" + case .simulator: "Simulator" + case .polestar: "Polestar" + case .systemDefault: "System Default" + case .polestarEmulator: "Polestar Emulator" + case .vps: "VPS" } } } diff --git a/Examples/Map+Positioning/Sources/ViewControllers/CameraViewController.swift b/Examples/Map+Positioning/Sources/ViewControllers/CameraViewController.swift index 62ad631..7ef61ad 100644 --- a/Examples/Map+Positioning/Sources/ViewControllers/CameraViewController.swift +++ b/Examples/Map+Positioning/Sources/ViewControllers/CameraViewController.swift @@ -10,7 +10,7 @@ import ARKit import RealityKit import RxSwift import UIKit -import WemapPositioningSDK +import WemapPositioningSDKVPSARKit @available(iOS 13.0, *) class CameraViewController: UIViewController { diff --git a/Examples/Map+Positioning/Sources/ViewControllers/InitialViewController.swift b/Examples/Map+Positioning/Sources/ViewControllers/InitialViewController.swift index 6ec8aab..0328f0e 100644 --- a/Examples/Map+Positioning/Sources/ViewControllers/InitialViewController.swift +++ b/Examples/Map+Positioning/Sources/ViewControllers/InitialViewController.swift @@ -48,7 +48,7 @@ class InitialViewController: UIViewController { } WemapMap.shared - .getStyleURL(withMapID: id, token: Constants.token) + .getMapData(mapID: id, token: Constants.token) .subscribe(onSuccess: { self.showMap($0) }, onFailure: { diff --git a/Examples/Map+Positioning/Sources/ViewControllers/NavigationViewController.swift b/Examples/Map+Positioning/Sources/ViewControllers/NavigationViewController.swift index cb7416b..37fda4d 100644 --- a/Examples/Map+Positioning/Sources/ViewControllers/NavigationViewController.swift +++ b/Examples/Map+Positioning/Sources/ViewControllers/NavigationViewController.swift @@ -12,7 +12,7 @@ import RxSwift import UIKit import WemapCoreSDK import WemapMapSDK -import WemapPositioningSDK +import WemapPositioningSDKVPSARKit @available(iOS 13.0, *) final class NavigationViewController: MapViewController { @@ -33,8 +33,8 @@ final class NavigationViewController: MapViewController { .filter { $0.title == "user-created" } ?? [] } - private var simulator: LocationSourceSimulator? { - map.userLocationManager.locationSource as? LocationSourceSimulator + private var simulator: SimulatorLocationSource? { + map.userLocationManager.locationSource as? SimulatorLocationSource } private var vpsLocationSource: VPSARKitLocationSource? { @@ -196,7 +196,7 @@ extension NavigationViewController: PointOfInterestManagerDelegate { } @available(iOS 13.0, *) -extension NavigationViewController: NavigationDelegate { +extension NavigationViewController: NavigationManagerDelegate { func navigationManager(_: NavigationManager, didUpdateNavigationInfo info: NavigationInfo) { navigationInfo.isHidden = false @@ -233,6 +233,8 @@ extension NavigationViewController: VPSARKitLocationSourceDelegate { func locationSource(_ locationSource: VPSARKitLocationSource, didChangeState state: VPSARKitLocationSource.State) { + debugPrint("state - \(state)") + guard state == .scanRequired, cameraVC == nil else { return } showCamera(session: locationSource.session, assignCamera: true) diff --git a/Examples/Map/Resources/Settings.bundle/Root.plist b/Examples/Map/Resources/Settings.bundle/Root.plist index d2660ff..aceea54 100644 --- a/Examples/Map/Resources/Settings.bundle/Root.plist +++ b/Examples/Map/Resources/Settings.bundle/Root.plist @@ -82,16 +82,6 @@ DefaultValue Unknown - - Type - PSTitleValueSpecifier - Title - Turf - Key - turfVersion - DefaultValue - Unknown - Type PSGroupSpecifier @@ -162,7 +152,7 @@ Title Stop distance threshold FooterText - The distance measured in meters, indicating when the navigation manager considers that the user has arrived at the final destination. Default is 5 meters + The distance measured in meters, indicating when the navigation manager considers that the user has arrived at the final destination. Default is 15 meters Type @@ -172,7 +162,7 @@ Key stopDistanceThreshold DefaultValue - 5 + 15 IsSecure KeyboardType @@ -188,7 +178,7 @@ Title User position threshold FooterText - The distance measured in meters indicates when the user's location will no longer be projected onto the itinerary and navigation will be recalculated. Default is 5 meters + The distance measured in meters indicates when the user's location will no longer be projected onto the itinerary and navigation will be recalculated. Default is 25 meters Type @@ -198,7 +188,7 @@ Key userPositionThreshold DefaultValue - 5 + 25 IsSecure KeyboardType diff --git a/Examples/Map/Sources/Config.swift b/Examples/Map/Sources/Config.swift index f51b0e4..9d2ee3a 100644 --- a/Examples/Map/Sources/Config.swift +++ b/Examples/Map/Sources/Config.swift @@ -52,13 +52,9 @@ func customKeysAndValues() -> [String: Any] { return dict } -extension UserDefaults { - - static func bool(forKey key: PreferencesKey) -> Bool { - standard.bool(forKey: key.rawValue) - } - - static func value(forKey key: PreferencesKey) -> Any? { - standard.value(forKey: key.rawValue) - } +var globalNavigationOptions: NavigationOptions { + NavigationOptions( + itineraryOptions: .init(color: .cyan, projectionOptions: .init(width: 5, color: .lightGray)), + userTrackingMode: .followWithHeading + ) } diff --git a/Examples/Map/Sources/Constants.swift b/Examples/Map/Sources/Constants.swift deleted file mode 100644 index 100ffaa..0000000 --- a/Examples/Map/Sources/Constants.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// Constants.swift -// MapExample -// -// Created by Evgenii Khrushchev on 16/03/2023. -// Copyright © 2023 Wemap SAS. All rights reserved. -// - -import Foundation -import WemapCoreSDK -import WemapMapSDK - -enum Constants { - - static var mapID: Int { - fatalError("Specify mapID and remove fatalError") - } - - static var token: String { - fatalError("Specify token and remove fatalError") - } - - static var polestarApiKey: String { - fatalError("Specify polestarApiKey and remove fatalError") - } - - static var globalNavigationOptions: NavigationOptions { - NavigationOptions( - itineraryOptions: .init(color: .cyan, projectionOptions: .init(width: 5, color: .lightGray)), - userTrackingMode: .followWithHeading - ) - } -} - -enum UIConstants { - - enum Delay { - static let short: TimeInterval = 5 - static let long: TimeInterval = 10 - } - - enum Inset { - static let top: CGFloat = -200 - static let mid: CGFloat = -150 - } -} - -extension UserDefaults { - - static func double(forKey key: PreferencesKey, defaultValue: Double) -> Double { - UserDefaults.value(forKey: key) != nil ? standard.double(forKey: key.rawValue) : defaultValue - } -} diff --git a/Examples/Map/Sources/LocationSourceType.swift b/Examples/Map/Sources/LocationSourceType.swift index 2bac806..d6fc9b5 100644 --- a/Examples/Map/Sources/LocationSourceType.swift +++ b/Examples/Map/Sources/LocationSourceType.swift @@ -6,9 +6,6 @@ // Copyright © 2023 Wemap SAS. All rights reserved. // -import WemapCoreSDK -import WemapMapSDK - enum LocationSourceType: Int, CaseIterable { case simulator, @@ -18,10 +15,10 @@ enum LocationSourceType: Int, CaseIterable { var name: String { switch self { - case .simulator: return "Simulator" - case .polestar: return "Polestar" - case .systemDefault: return "System Default" - case .polestarEmulator: return "Polestar Emulator" + case .simulator: "Simulator" + case .polestar: "Polestar" + case .systemDefault: "System Default" + case .polestarEmulator: "Polestar Emulator" } } } diff --git a/Examples/Map/Sources/ViewControllers/InitialViewController.swift b/Examples/Map/Sources/ViewControllers/InitialViewController.swift index a868f14..af9fb9e 100644 --- a/Examples/Map/Sources/ViewControllers/InitialViewController.swift +++ b/Examples/Map/Sources/ViewControllers/InitialViewController.swift @@ -60,7 +60,7 @@ class InitialViewController: UIViewController { } WemapMap.shared - .getStyleURL(withMapID: id, token: Constants.token) + .getMapData(mapID: id, token: Constants.token) .subscribe(onSuccess: { self.showMap($0) }, onFailure: { diff --git a/Examples/Map/Sources/ViewControllers/NavigationViewController.swift b/Examples/Map/Sources/ViewControllers/NavigationViewController.swift index e7b70be..d938c12 100644 --- a/Examples/Map/Sources/ViewControllers/NavigationViewController.swift +++ b/Examples/Map/Sources/ViewControllers/NavigationViewController.swift @@ -28,8 +28,8 @@ final class NavigationViewController: MapViewController { .filter { $0.title == "user-created" } ?? [] } - private var simulator: LocationSourceSimulator? { - map.userLocationManager.locationSource as? LocationSourceSimulator + private var simulator: SimulatorLocationSource? { + map.userLocationManager.locationSource as? SimulatorLocationSource } private var navigationManager: NavigationManager { map.navigationManager } @@ -86,6 +86,9 @@ final class NavigationViewController: MapViewController { point.title = "user-created" point.subtitle = "\(focusedBuilding?.activeLevel.id ?? 0.0)" map.addAnnotation(point) + + map.setCenter(coord, zoomLevel: 18, edgePadding: .init(top: 0, left: 0, bottom: 200, right: 0)) + updateUI() } @@ -155,8 +158,8 @@ final class NavigationViewController: MapViewController { disableStartButtons() navigationManager -// .startNavigation(from: origin, to: destination, options: Constants.globalNavigationOptions, itinerarySearchOptions: .init(useStairs: false)) - .startNavigation(from: origin, to: destination, options: Constants.globalNavigationOptions) +// .startNavigation(from: origin, to: destination, options: globalNavigationOptions, itinerarySearchOptions: .init(useStairs: false)) + .startNavigation(from: origin, to: destination, options: globalNavigationOptions) .subscribe( onSuccess: { [unowned self] itinerary in simulator?.setItinerary(itinerary) @@ -201,7 +204,7 @@ extension NavigationViewController: PointOfInterestManagerDelegate { } } -extension NavigationViewController: NavigationDelegate { +extension NavigationViewController: NavigationManagerDelegate { func navigationManager(_: NavigationManager, didUpdateNavigationInfo info: NavigationInfo) { navigationInfo.isHidden = false diff --git a/Examples/Map/Sources/ViewControllers/POIsViewController.swift b/Examples/Map/Sources/ViewControllers/POIsViewController.swift index 7cf7490..b83208d 100644 --- a/Examples/Map/Sources/ViewControllers/POIsViewController.swift +++ b/Examples/Map/Sources/ViewControllers/POIsViewController.swift @@ -25,8 +25,8 @@ final class POIsViewController: MapViewController { @IBOutlet var removeSimulatedUserPositionButton: UIButton! @IBOutlet var navigationInfo: UILabel! - private var simulator: LocationSourceSimulator? { - map.userLocationManager.locationSource as? LocationSourceSimulator + private var simulator: SimulatorLocationSource? { + map.userLocationManager.locationSource as? SimulatorLocationSource } private var navigationManager: NavigationManager { map.navigationManager } @@ -109,7 +109,7 @@ final class POIsViewController: MapViewController { let destination = Coordinate(coordinate2D: poi.coordinate2D, levels: levels) navigationManager - .startNavigation(from: origin, to: destination, options: Constants.globalNavigationOptions) + .startNavigation(from: origin, to: destination, options: globalNavigationOptions) .subscribe( onSuccess: { [unowned self] itinerary in simulator?.setItinerary(itinerary) @@ -187,7 +187,7 @@ extension POIsViewController: PointOfInterestManagerDelegate { } } -extension POIsViewController: NavigationDelegate { +extension POIsViewController: NavigationManagerDelegate { func navigationManager(_: NavigationManager, didUpdateNavigationInfo info: NavigationInfo) { navigationInfo.isHidden = false diff --git a/Examples/Sources/Constants.swift b/Examples/Sources/Constants.swift new file mode 100644 index 0000000..19e86c0 --- /dev/null +++ b/Examples/Sources/Constants.swift @@ -0,0 +1,30 @@ +// +// Constants.swift +// MapExample +// +// Created by Evgenii Khrushchev on 16/03/2023. +// Copyright © 2023 Wemap SAS. All rights reserved. +// + +import Foundation +import WemapCoreSDK +import WemapMapSDK + +enum Constants { + + static var mapID: Int { + 19158 // TODO: Modify this value with your own map id + } + + static var token: String { + "GUHTU6TYAWWQHUSR5Z5JZNMXX" // TODO: Modify this value with your own wemap token + } + + static var polestarApiKey: String { + fatalError("Specify polestarApiKey and remove fatalError") + } + + static var vpsEndpoint: String { + fatalError("Specify vpsEndpoint and remove fatalError") + } +} diff --git a/Examples/Sources/LocationSources/PolestarLocationSource.swift b/Examples/Sources/LocationSources/PolestarLocationSource.swift deleted file mode 100644 index a820a2d..0000000 --- a/Examples/Sources/LocationSources/PolestarLocationSource.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// PolestarLocationSource.swift -// MapExample -// -// Created by Evgenii Khrushchev on 10/03/2023. -// Copyright © 2023 Wemap SAS. All rights reserved. -// - -import CoreLocation -import NAOSwiftProvider -import WemapCoreSDK - -class PolestarLocationSource: NSObject, LocationSource { - - weak var delegate: LocationSourceDelegate? - - var supportsHeading = false - - private let locationProvider: LocationProvider - - init(apiKey: String) { - locationProvider = LocationProvider(apikey: apiKey) - super.init() - locationProvider.delegate = self - } - - func start() { - locationProvider.start() - } - - func stop() { - locationProvider.stop() - } - - deinit { - stop() - locationProvider.delegate = nil - } -} - -extension PolestarLocationSource: LocationProviderDelegate { - - func didLocationChange(_ location: CLLocation!) { - - let coordinate: Coordinate - if location.verticalAccuracy < 0 { // outdoor location - coordinate = Coordinate(location: location) - } else { - coordinate = Coordinate(location: location, levels: [Float(location.altitude / 5)]) - } - - delegate?.locationSource(self, didUpdateLocation: coordinate) - -// debugPrint("didLocationChange with location - \(location!)") - } - - func didLocationStatusChanged(_ status: String!) { - debugPrint("didLocationStatusChanged with status - \(status!)") - } - - func didEnterSite(_ name: String!) { - debugPrint("didEnterSite with name - \(name!)") - } - - func didExitSite(_ name: String!) { - debugPrint("didExitSite with status - \(name!)") - } - - func didApikeyReceived(_ apikey: String!) { - debugPrint("didApikeyReceived with status - \(apikey!)") - } - - func didLocationFailWithErrorCode(_ message: String!) { - let error = NSError(domain: message, code: -1) - delegate?.locationSource(self, didFailWithError: error) - debugPrint("didLocationFailWithErrorCode with errorCode - \(message!)") - } - - func requiresWifiOn() { - debugPrint("requiresWifiOn") - } - - func requiresBLEOn() { - debugPrint("requiresBLEOn") - } - - func requiresLocationOn() { - debugPrint("requiresLocationOn") - } - - func requiresCompassCalibration() { - debugPrint("requiresCompassCalibration") - } - - func didSynchronizationSuccess() { - debugPrint("didSynchronizationSuccess") - } - - func didSynchronizationFailure(_ message: String!) { - debugPrint("didSynchronizationFailure with message - \(message!)") - } -} diff --git a/Examples/Sources/MapViewController.swift b/Examples/Sources/MapViewController.swift index 43c8b2c..51c7d9d 100644 --- a/Examples/Sources/MapViewController.swift +++ b/Examples/Sources/MapViewController.swift @@ -9,8 +9,9 @@ import RxSwift import WemapCoreSDK import WemapMapSDK -#if canImport(WemapPositioningSDK) -import WemapPositioningSDK +import WemapPositioningSDKPolestar +#if canImport(WemapPositioningSDKVPSARKit) +import WemapPositioningSDKVPSARKit #endif class MapViewController: UIViewController, BuildingManagerDelegate { @@ -41,18 +42,18 @@ class MapViewController: UIViewController, BuildingManagerDelegate { let source: LocationSource? switch locationSourceType { - case .simulator: source = LocationSourceSimulator() + case .simulator: source = SimulatorLocationSource() case .polestar: source = PolestarLocationSource(apiKey: Constants.polestarApiKey) case .systemDefault, .none: source = nil case .polestarEmulator: source = PolestarLocationSource(apiKey: "emulator") -#if canImport(WemapPositioningSDK) - case .vps: source = VPSARKitLocationSource(serviceURL: URL(string: mapData.extras!.vpsEndpoint!)!) +#if canImport(WemapPositioningSDKVPSARKit) + case .vps: source = VPSARKitLocationSource(serviceURL: URL(string: Constants.vpsEndpoint)!) #endif } map.userLocationManager.locationSource = source -// camera bounds can be specified even if they don't exist in MapData + // camera bounds can be specified even if they don't exist in MapData // map.cameraBounds = maxBounds buildingManager.delegate = self @@ -76,6 +77,12 @@ class MapViewController: UIViewController, BuildingManagerDelegate { let camera = map.cameraThatFitsCoordinateBounds(initialBounds) map.setCamera(camera, animated: true) } + + if !(map.userLocationManager.locationSource?.isAvailable ?? true) { + let vc = UIAlertController(title: nil, message: "Desired location source is unavailable", preferredStyle: .alert) + vc.addAction(.init(title: "Cancel", style: .cancel)) + present(vc, animated: true) + } } @IBAction func levelChanged(_ sender: UISegmentedControl) { diff --git a/Examples/Sources/ToastHelper.swift b/Examples/Sources/ToastHelper.swift index ec5be82..827fb6f 100644 --- a/Examples/Sources/ToastHelper.swift +++ b/Examples/Sources/ToastHelper.swift @@ -8,7 +8,7 @@ import UIKit -class ToastHelper { +enum ToastHelper { @discardableResult static func showToast( diff --git a/Examples/Sources/UIConstants.swift b/Examples/Sources/UIConstants.swift new file mode 100644 index 0000000..d591e25 --- /dev/null +++ b/Examples/Sources/UIConstants.swift @@ -0,0 +1,22 @@ +// +// UIConstants.swift +// Examples +// +// Created by Evgenii Khrushchev on 18/12/2023. +// Copyright © 2023 Wemap SAS. All rights reserved. +// + +import Foundation + +enum UIConstants { + + enum Delay { + static let short: TimeInterval = 5 + static let long: TimeInterval = 10 + } + + enum Inset { + static let top: CGFloat = -200 + static let mid: CGFloat = -150 + } +} diff --git a/Examples/Sources/UserDefaults+Additions.swift b/Examples/Sources/UserDefaults+Additions.swift new file mode 100644 index 0000000..fc0e94c --- /dev/null +++ b/Examples/Sources/UserDefaults+Additions.swift @@ -0,0 +1,24 @@ +// +// UserDefaults+Additions.swift +// Examples +// +// Created by Evgenii Khrushchev on 15/11/2023. +// Copyright © 2023 Wemap SAS. All rights reserved. +// + +import Foundation + +extension UserDefaults { + + static func bool(forKey key: PreferencesKey) -> Bool { + standard.bool(forKey: key.rawValue) + } + + static func value(forKey key: PreferencesKey) -> Any? { + standard.value(forKey: key.rawValue) + } + + static func double(forKey key: PreferencesKey, defaultValue: Double) -> Double { + UserDefaults.value(forKey: key) != nil ? standard.double(forKey: key.rawValue) : defaultValue + } +} diff --git a/Gemfile.lock b/Gemfile.lock index 6b1a8ac..e728926 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ GEM specs: CFPropertyList (3.0.6) rexml - activesupport (7.1.1) + activesupport (7.1.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -13,37 +13,37 @@ GEM minitest (>= 5.1) mutex_m tzinfo (~> 2.0) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) - aws-eventstream (1.2.0) - aws-partitions (1.843.0) - aws-sdk-core (3.185.1) - aws-eventstream (~> 1, >= 1.0.2) + aws-eventstream (1.3.0) + aws-partitions (1.868.0) + aws-sdk-core (3.190.0) + aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) + aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.72.0) - aws-sdk-core (~> 3, >= 3.184.0) + aws-sdk-kms (1.75.0) + aws-sdk-core (~> 3, >= 3.188.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.136.0) - aws-sdk-core (~> 3, >= 3.181.0) + aws-sdk-s3 (1.141.0) + aws-sdk-core (~> 3, >= 3.189.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.6) - aws-sigv4 (1.6.1) + aws-sigv4 (~> 1.8) + aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) - base64 (0.1.1) - bigdecimal (3.1.4) + base64 (0.2.0) + bigdecimal (3.1.5) claide (1.1.0) - cocoapods (1.14.2) + cocoapods (1.14.3) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.14.2) + cocoapods-core (= 1.14.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 2.0) + cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-trunk (>= 1.6.0, < 2.0) @@ -56,7 +56,7 @@ GEM nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.14.2) + cocoapods-core (1.14.3) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -67,7 +67,7 @@ GEM public_suffix (~> 4.0) typhoeus (~> 1.0) cocoapods-deintegrate (1.0.5) - cocoapods-downloader (2.0) + cocoapods-downloader (2.1) cocoapods-plugins (1.0.0) nap cocoapods-s3-download (0.0.3) @@ -80,7 +80,7 @@ GEM colored2 (3.1.2) concurrent-ruby (1.2.2) connection_pool (2.4.1) - drb (2.1.1) + drb (2.2.0) ruby2_keywords escape (0.0.4) ethon (0.16.0) @@ -93,10 +93,10 @@ GEM i18n (1.14.1) concurrent-ruby (~> 1.0) jmespath (1.6.2) - json (2.6.3) + json (2.7.1) minitest (5.20.0) molinillo (0.8.0) - mutex_m (0.1.2) + mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) @@ -104,7 +104,7 @@ GEM rexml (3.2.6) ruby-macho (2.5.1) ruby2_keywords (0.0.5) - typhoeus (1.4.0) + typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -124,4 +124,4 @@ DEPENDENCIES cocoapods-s3-download BUNDLED WITH - 2.4.21 + 2.4.22 diff --git a/Podfile b/Podfile index 9443791..3368776 100644 --- a/Podfile +++ b/Podfile @@ -1,5 +1,5 @@ source 'https://cdn.cocoapods.org/' -source 'https://github.com/wemap/cocoapods-specs.git' +source 'https://github.com/wemap/cocoapods-specs.git' workspace 'WemapExamples.xcworkspace' @@ -11,14 +11,15 @@ platform :ios, '11.0' abstract_target 'Map' do - pod 'WemapMapSDK', '~>0.10.0' + pod 'WemapMapSDK', '~>0.11.0' pod 'NAOSwiftProvider', :git => 'git@github.com:wemap/NAOSwiftProvider.git', :tag => '1.2.2' + pod 'WemapPositioningSDKPolestar', '~>0.11.0' target 'MapExample' target 'Map+PositioningExample' do - pod 'WemapPositioningSDK', '~>0.10.0' + pod 'WemapPositioningSDK/VPSARKit', '~>0.11.0' end end diff --git a/Podfile.lock b/Podfile.lock index aad3b23..22b8e11 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -11,21 +11,28 @@ PODS: - RxSwift (= 6.6.0) - RxSwift (6.6.0) - Turf (2.7.0) - - WemapCoreSDK (0.10.0): + - WemapCoreSDK (0.11.0): - Alamofire (~> 5.8.0) - RxCocoa (~> 6.6.0) - RxSwift (~> 6.6.0) - Turf (~> 2.7.0) - - WemapMapSDK (0.10.0): + - WemapMapSDK (0.11.0): - MapLibre (~> 5.13.0) - - WemapCoreSDK (~> 0.10.0) - - WemapPositioningSDK (0.10.0): - - WemapCoreSDK (~> 0.10.0) + - WemapCoreSDK (~> 0.11.0) + - WemapPositioningSDK/Core (0.11.0): + - RxSwift (~> 6.6.0) + - WemapCoreSDK (~> 0.11.0) + - WemapPositioningSDK/VPSARKit (0.11.0): + - WemapPositioningSDK/Core + - WemapPositioningSDKPolestar (0.11.0): + - NAOSwiftProvider (~> 1.2.2) + - WemapCoreSDK (~> 0.11.0) DEPENDENCIES: - "NAOSwiftProvider (from `git@github.com:wemap/NAOSwiftProvider.git`, tag `1.2.2`)" - - WemapMapSDK (~> 0.10.0) - - WemapPositioningSDK (~> 0.10.0) + - WemapMapSDK (~> 0.11.0) + - WemapPositioningSDK/VPSARKit (~> 0.11.0) + - WemapPositioningSDKPolestar (~> 0.11.0) SPEC REPOS: https://github.com/wemap/cocoapods-specs.git: @@ -33,6 +40,7 @@ SPEC REPOS: - WemapCoreSDK - WemapMapSDK - WemapPositioningSDK + - WemapPositioningSDKPolestar trunk: - Alamofire - NAOSDK @@ -60,10 +68,11 @@ SPEC CHECKSUMS: RxRelay: 45eaa5db8ee4fb50e5ebd57deec0159e97fa51e6 RxSwift: a4b44f7d24599f674deebd1818eab82e58410632 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 - WemapCoreSDK: 7de307d46f40bfc4970ff7fbaebd921e6653e281 - WemapMapSDK: 721240db8b76e849dccbc00d5c24c064ca038d54 - WemapPositioningSDK: bdf9f671237722e96b5558c7123b2425df480354 + WemapCoreSDK: 04be24b576924dffcc2e00dde0fe2e00a1d7193a + WemapMapSDK: bfab10c5c28605adaefa5d98209186587cc3bbd6 + WemapPositioningSDK: 6391e0f4eb5309e3cdbae6cf3200413f79a683ad + WemapPositioningSDKPolestar: ab0e460eaaf540cb6f31a57c3a4b46add243a356 -PODFILE CHECKSUM: d220fb3c67ec6e4eb8134e38ae12d080ba18ab2b +PODFILE CHECKSUM: d07a2e3e87669559c27d1c7e13edf72b9d8e2720 -COCOAPODS: 1.14.2 +COCOAPODS: 1.14.3 diff --git a/README.md b/README.md index 33578cb..1f4d0ed 100644 --- a/README.md +++ b/README.md @@ -16,24 +16,22 @@ * install necessary gems using Bundler and Gemfile or manually - ``` shell - bundle install - ``` + ``` shell + bundle install + ``` * run in console in project folder - ``` shell - export AWS_ACCESS_KEY_ID=*** && \ - export AWS_SECRET_ACCESS_KEY=*** && \ - export AWS_REGION=*** && \ - [bundle exec] pod install --repo-update - ``` + ``` shell + AWS_ACCESS_KEY_ID=*** \ + AWS_SECRET_ACCESS_KEY=*** \ + AWS_REGION=*** \ + [bundle exec] pod install --repo-update + ``` * open `WemapExamples.xcworkspace` -* specify `mapID` and `token` and optionally `polestarApiKey` in Examples: - * [`Map`](Examples/Map/Sources/Constants.swift) - * [`Map+Positioning`](Examples/Map+Positioning/Sources/Constants.swift) +* modify `mapID`, `token` and optionally `polestarApiKey`, `vpsEndpoint` [here in Constants](./Examples/Sources/Constants.swift) * build and run desired example app scheme