Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update demo app to latest APIs #74

Merged
merged 161 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
6012439
fixed ALS-1665 added collapse option on directions bottomsheet view
zeeshanmakeen Sep 12, 2023
3f8fab9
removed amplify and map styles
zeeshanmakeen Aug 15, 2024
d78752b
implemented oauth2 sign in
zeeshanmakeen Aug 16, 2024
93ddf1b
Implementation of sign in and removal of auth sdk
zeeshanmakeen Aug 21, 2024
6babcbb
added iot device v2 sdk
zeeshanmakeen Aug 22, 2024
90c09f0
added iot device package
zeeshanmakeen Aug 22, 2024
df3376a
Implemented Geodence batch evaluate and refresh mechanism
zeeshanmakeen Aug 29, 2024
1e1c6bd
fixed navigation and direction issues
zeeshanmakeen Sep 2, 2024
87974b5
Update AWSLoginService.swift
zeeshanmakeen Sep 2, 2024
db600b1
Update AWSLoginService.swift
zeeshanmakeen Sep 3, 2024
7643dc5
Implemented tracking geofence notification IoT
zeeshanmakeen Sep 3, 2024
e9e537f
fix IoT connection
zeeshanmakeen Sep 3, 2024
44c8b0b
refactoring of IoT mqtt client
zeeshanmakeen Sep 3, 2024
8b2fef4
fixed unit test cases
zeeshanmakeen Sep 5, 2024
a3b71cd
Updated E2E test cases
zeeshanmakeen Sep 6, 2024
8046a44
Updated E2E test cases
zeeshanmakeen Sep 6, 2024
d28b0fd
Update Package.resolved
zeeshanmakeen Sep 6, 2024
aa85da0
updating macos github runner
zeeshanmakeen Sep 6, 2024
60e4dbd
Update test-ios-e2e.yml
zeeshanmakeen Sep 6, 2024
e5c7101
Update test-ios-e2e.yml
zeeshanmakeen Sep 6, 2024
3b3c133
Update test-ios-e2e.yml
zeeshanmakeen Sep 6, 2024
aea14df
Update test-ios-e2e.yml
zeeshanmakeen Sep 6, 2024
0e136d9
Update test-ios-e2e.yml
zeeshanmakeen Sep 6, 2024
5f1dc1c
Update test-ios-e2e.yml
zeeshanmakeen Sep 9, 2024
1d5cfec
Update test-ios-e2e.yml
zeeshanmakeen Sep 9, 2024
7bb26ce
Update test-ios-e2e.yml
zeeshanmakeen Sep 9, 2024
667a664
Update test-ios-e2e.yml
zeeshanmakeen Sep 9, 2024
72c9ca0
update E2E test cases and workflow
zeeshanmakeen Sep 9, 2024
ad25eaf
Update Gemfile.lock
zeeshanmakeen Sep 9, 2024
c01e9e1
optimized test cases
zeeshanmakeen Sep 9, 2024
f2c2802
Update MapUITests.swift
zeeshanmakeen Sep 10, 2024
582ed3b
Update test-ios-e2e.yml
zeeshanmakeen Sep 10, 2024
8a2371d
Implemented disconnect and logout on settings screen
zeeshanmakeen Sep 18, 2024
a2fae7c
Update build-ios.yml
zeeshanmakeen Sep 18, 2024
075bc70
Update build-ios.yml
zeeshanmakeen Sep 18, 2024
4bd931f
Update build-ios.yml
zeeshanmakeen Sep 18, 2024
e05f593
Bug Fixes
zeeshanmakeen Sep 19, 2024
23db09e
Update SearchVC.swift
zeeshanmakeen Sep 24, 2024
bfa2ad2
Update SearchViewModel.swift
zeeshanmakeen Sep 25, 2024
4ce2229
Implemented refresh credentials
zeeshanmakeen Sep 25, 2024
4dd66a4
updated workflows
zeeshanmakeen Sep 25, 2024
cbb77be
Update build-ios.yml
zeeshanmakeen Sep 25, 2024
1c771d7
Update build-ios.yml
zeeshanmakeen Sep 25, 2024
f714fcd
Update build-ios.yml
zeeshanmakeen Sep 25, 2024
a4de238
Update build-ios.yml
zeeshanmakeen Sep 25, 2024
b1d87e8
Update project.pbxproj
zeeshanmakeen Sep 25, 2024
d809cad
Update test-ios.yml
zeeshanmakeen Sep 26, 2024
40b007e
Update AWSSignatureDelegate.swift
zeeshanmakeen Sep 26, 2024
b4a0c09
Revert "Update AWSSignatureDelegate.swift"
zeeshanmakeen Sep 26, 2024
83e109d
renamed AWSSignatureV4Delegate
zeeshanmakeen Sep 26, 2024
2e247d0
Update test-ios.yml
zeeshanmakeen Sep 26, 2024
318fddc
Update DateExtensionTests.swift
zeeshanmakeen Sep 26, 2024
5768aa6
Update test-ios-e2e.yml
zeeshanmakeen Sep 27, 2024
f311065
Restricted xcovergage to target projects only
zeeshanmakeen Sep 27, 2024
f8f92ef
Update test-ios-e2e.yml
zeeshanmakeen Sep 27, 2024
bd1d57c
Update UITestGeofenceScreen.swift
zeeshanmakeen Sep 30, 2024
5197ab8
Update UITestGeofenceScreen.swift
zeeshanmakeen Sep 30, 2024
c4f106b
refactoring and removed warnings
zeeshanmakeen Sep 30, 2024
5ec78ba
Update LocationServices.xctestplan
zeeshanmakeen Sep 30, 2024
731ab7f
Removed warnings and reverted back to mac 14 runner
zeeshanmakeen Oct 1, 2024
4c61b3b
Update CLLocationCoordinate2D+Extension.swift
zeeshanmakeen Oct 1, 2024
4771763
Update UITestSettingsScreen.swift
zeeshanmakeen Oct 1, 2024
8fb281f
updated simulator
zeeshanmakeen Oct 1, 2024
3a723ea
Update Fastfile
zeeshanmakeen Oct 1, 2024
3b0c250
updated checkout version
zeeshanmakeen Oct 1, 2024
e110229
Revert "Removed warnings and reverted back to mac 14 runner"
zeeshanmakeen Oct 1, 2024
5bb7cc2
Update LocationServices.xctestplan
zeeshanmakeen Oct 1, 2024
533bb5a
refactoring
zeeshanmakeen Oct 1, 2024
60fabc9
fixes
zeeshanmakeen Oct 1, 2024
48a7110
Update LocationServices.xctestplan
zeeshanmakeen Oct 1, 2024
71b7004
fix
zeeshanmakeen Oct 1, 2024
f384f4c
add tableview identifier
zeeshanmakeen Oct 1, 2024
2b2e2fc
Update UITestSettingsScreen.swift
zeeshanmakeen Oct 1, 2024
1b41ec5
increase simulator versions
zeeshanmakeen Oct 2, 2024
abe6991
added a dummy test case
zeeshanmakeen Oct 2, 2024
bb7552a
test case fix
zeeshanmakeen Oct 2, 2024
763b8e3
Update test-ios-e2e.yml
zeeshanmakeen Oct 2, 2024
8c6bc36
Update SettingsUITests.swift
zeeshanmakeen Oct 2, 2024
0e59058
Update test-ios-e2e.yml
zeeshanmakeen Oct 2, 2024
de25589
updated test case
zeeshanmakeen Oct 2, 2024
143c4d1
fix
zeeshanmakeen Oct 2, 2024
203f123
fix
zeeshanmakeen Oct 2, 2024
6bd85f0
Update test-ios-e2e.yml
zeeshanmakeen Oct 2, 2024
0856f29
Update Fastfile
zeeshanmakeen Oct 2, 2024
11fe720
Update Fastfile
zeeshanmakeen Oct 2, 2024
b812a30
Update Fastfile
zeeshanmakeen Oct 2, 2024
994b67a
Update SettingsUITests.swift
zeeshanmakeen Oct 3, 2024
ea233b8
Update SettingsUITests.swift
zeeshanmakeen Oct 3, 2024
5c70961
Update SettingsUITests.swift
zeeshanmakeen Oct 3, 2024
98cae61
Update SettingsVC.swift
zeeshanmakeen Oct 3, 2024
1554425
Update SettingsVC.swift
zeeshanmakeen Oct 3, 2024
267c5b7
Update SettingsVC.swift
zeeshanmakeen Oct 3, 2024
41778d5
Update SettingsVC.swift
zeeshanmakeen Oct 3, 2024
4cc9dc5
Update SettingsVC.swift
zeeshanmakeen Oct 3, 2024
0a76dc6
fix
zeeshanmakeen Oct 3, 2024
e9948df
Update SettingsVC.swift
zeeshanmakeen Oct 3, 2024
d8b4778
Update SettingsVC.swift
zeeshanmakeen Oct 3, 2024
5154720
Refactor settings button for disconnect and logout
zeeshanmakeen Oct 4, 2024
9f1a396
re enabled test cases
zeeshanmakeen Oct 4, 2024
51dc79e
Update Fastfile
zeeshanmakeen Oct 4, 2024
769d214
fixed test cases
zeeshanmakeen Oct 4, 2024
61c5bb4
Removed unecessary code
zeeshanmakeen Oct 7, 2024
e9ac921
downgraded macos runner tier
zeeshanmakeen Oct 7, 2024
74d9739
Update Fastfile
zeeshanmakeen Oct 7, 2024
44d3b2b
Update Fastfile
zeeshanmakeen Oct 7, 2024
53620b0
Update UITestTrackingScreen.swift
zeeshanmakeen Oct 8, 2024
e3491c9
Update LocationServices.xctestplan
zeeshanmakeen Oct 8, 2024
b0f73a7
Update TrackingUITests.swift
zeeshanmakeen Oct 8, 2024
f1ee7a4
Re-enabled test cases
zeeshanmakeen Oct 8, 2024
66c70ee
Update Fastfile
zeeshanmakeen Oct 8, 2024
6c9ae65
Update LocationServices.xctestplan
zeeshanmakeen Oct 8, 2024
a1a0f82
Update LocationServices.xctestplan
zeeshanmakeen Oct 8, 2024
4028974
Update test-ios-e2e.yml
zeeshanmakeen Oct 9, 2024
e677a72
Update LocationServices.xctestplan
zeeshanmakeen Oct 9, 2024
ab7b8cf
ALS-1805 fixed PR feedback
zeeshanmakeen Oct 14, 2024
7def1ac
Fixed PR feedback
zeeshanmakeen Oct 15, 2024
0a9540a
Merge branch 'main' into mbalfour/main-sync
mbalfour-amzn Oct 21, 2024
54f2957
Merge pull request #3 from aws-geospatial/mbalfour/main-sync
mbalfour-amzn Oct 22, 2024
a1fa5cd
Create .gitignore
zeeshanmakeen Oct 24, 2024
0748bd0
Implemented Map new Style and new API SDK for places, routes and othe…
zeeshanmakeen Oct 24, 2024
d831561
Update ConfigTestTemplate.xcconfig
zeeshanmakeen Oct 24, 2024
e448bc4
Implemented Political View E2E test case
zeeshanmakeen Oct 24, 2024
0769f02
Merge pull request #4 from makeen-project/ALS-1807_Upgrade_APIs
wadhawh Oct 24, 2024
27dd033
Removed pak political view
zeeshanmakeen Oct 25, 2024
6b8d38e
Merge pull request #6 from makeen-project/ALS-1807_Upgrade_APIs
wadhawh Oct 25, 2024
2bbf116
Refactoring of auth helper files and removed unused codes
zeeshanmakeen Oct 25, 2024
3f9246a
Merge pull request #7 from makeen-project/ALS-1807_Upgrade_APIs
wadhawh Oct 25, 2024
5f28cc1
Fixed ipad settings map style UI
zeeshanmakeen Oct 25, 2024
6eb9d4a
Update MapStyleVC.swift
zeeshanmakeen Oct 25, 2024
40ee9bf
Update SettingsVC.swift
zeeshanmakeen Oct 28, 2024
46d8dd2
removed blurstatusbar
zeeshanmakeen Oct 28, 2024
655bfcb
Update ExploreVC.swift
zeeshanmakeen Oct 28, 2024
c4f33e0
Merge pull request #9 from makeen-project/ALS-1807_Upgrade_APIs
wadhawh Oct 28, 2024
b8634b9
Update LocationSearchService.swift
zeeshanmakeen Oct 28, 2024
8c3e50b
Merge pull request #10 from makeen-project/ALS-1807_Upgrade_APIs
wadhawh Oct 28, 2024
443eb52
Fixed PR Feedback
zeeshanmakeen Oct 28, 2024
1cd8fa7
Renamed destionation typo to destination
zeeshanmakeen Oct 28, 2024
17c8166
Merge pull request #11 from makeen-project/ALS-1807_Upgrade_APIs
wadhawh Oct 28, 2024
67d1863
reverted the bundle identifier
zeeshanmakeen Oct 28, 2024
c404548
Merge pull request #13 from makeen-project/ALS-1807_Upgrade_APIs
wadhawh Oct 28, 2024
73ce582
disable bottomsheet grab on tracking and geofences for mapstyles
zeeshanmakeen Oct 28, 2024
8826ac3
Merge pull request #14 from makeen-project/ALS-1807_Upgrade_APIs
wadhawh Oct 28, 2024
d7cd7ad
removed commented code
zeeshanmakeen Oct 29, 2024
45b0248
Merge pull request #5 from aws-geospatial/ALS-1807_Upgrade_APIs
mbalfour-amzn Oct 29, 2024
07070d6
Implemented multi route leg details
zeeshanmakeen Oct 30, 2024
3d211eb
Fixed post login api Key issue and dismiss login screen after login
zeeshanmakeen Oct 30, 2024
21735e7
Merge branch 'main' into ALS-1815_Route_Legs
zeeshanmakeen Oct 30, 2024
8070372
Merge pull request #15 from makeen-project/ALS-1815_Route_Legs
wadhawh Oct 30, 2024
82f2d6d
Update AWSLoginServiceMock.swift
zeeshanmakeen Oct 30, 2024
04e922c
Merge pull request #17 from makeen-project/ALS-1815_Route_Legs
mbalfour-amzn Oct 30, 2024
897cf7b
Merge pull request #16 from aws-geospatial/ALS-1815_Route_Legs
mbalfour-amzn Oct 30, 2024
40d7543
Fixed coordinates search by replacing nearby with reverse geocode
zeeshanmakeen Oct 31, 2024
9c2c706
Implemented lat, long and long, lat in reverse geocode
zeeshanmakeen Oct 31, 2024
ebb5a45
Update SearchCell.swift
zeeshanmakeen Oct 31, 2024
f3908b8
Implemented new version of Swift sdks such as places & routes
zeeshanmakeen Nov 4, 2024
5f10781
refactoring
zeeshanmakeen Nov 4, 2024
9128f3d
removed local AWSGeoservices package
zeeshanmakeen Nov 4, 2024
cad0ecc
Optimization and Show loader
zeeshanmakeen Nov 5, 2024
d9e2cfd
added loader on sign in button
zeeshanmakeen Nov 5, 2024
51a215b
Merge pull request #18 from makeen-project/ALS-1878_UI_Fixes
wadhawh Nov 5, 2024
e563d10
Merge pull request #19 from aws-geospatial/ALS-1878_UI_Fixes
mbalfour-amzn Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions LocationServices/.xcovignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,19 @@
- DataProviderViewModel.swift
- NavigationViewModel.swift

# Commenting partial code coverage files due to some code is not able to covered in unit test cases. Need refactoring
# Commenting partial code coverage files due to some code is not able to covered in unit test cases.
- GeofenceDashboardViewModel.swift
- TrackingViewModel.swift
- ExploreViewModel.swift
- ExploreViewModel.swift

# Ignoring AuthHelper files as it will be accessed via Auth SDK when it is available
- AuthHelper.swift
- ApiAuthHelper.swift
- CognitoAuthHelper.swift
- LocationCredentialsProvider.swift
- CognitoCredentialsProvider.swift
- AmazonLocationCognitoCredentialsProvider.swift
- AmazonLocationApiCredentialsProvider.swift
- AmazonLocationClient.swift
- ApiKeyAuthScheme.swift
- KeyChainHelper.swift
1 change: 1 addition & 0 deletions LocationServices/ConfigTemplate.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@

IDENTITY_POOL_ID = REGION:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AWS_REGION = REGION
API_KEY = XXXX
1 change: 1 addition & 0 deletions LocationServices/ConfigTestTemplate.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

IDENTITY_POOL_ID = REGION:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AWS_REGION = REGION
API_KEY = XXXX

TEST_IDENTITY_POOL_ID = REGION:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
TEST_USER_POOL_CLIENT_ID = USER_POOL_CLIENT_ID
Expand Down
229 changes: 119 additions & 110 deletions LocationServices/LocationServices.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
{
"originHash" : "33fa476c44ec13ba9dfb107bc55a239c88b17c3ebefc9a581f9498da82ded5fd",
"originHash" : "37fc4666dc940bc2b2a2f41d16bb81b2d1c617bbb6ce9c52d9cf2662479f17b0",
"pins" : [
{
"identity" : "amazon-location-mobile-auth-sdk-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/aws-geospatial/amazon-location-mobile-auth-sdk-ios.git",
"state" : {
"revision" : "787edfff4d6cc7573dc351d3bc851675114838e6",
"version" : "1.0.0"
}
},
{
"identity" : "aws-crt-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/awslabs/aws-crt-swift",
"state" : {
"branch" : "mqtt_test_app",
"revision" : "e7e603d3aadd1749b3e5cc554832ab337fdfd8f3"
"revision" : "599ce744efbba6cc992bf0c59de2c6e4077bb04d"
}
},
{
"identity" : "aws-sdk-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/awslabs/aws-sdk-swift",
"state" : {
"revision" : "8ec5c0c820ca912a6bad1fc31c287d321385d698",
"version" : "1.0.18"
"revision" : "54a459ed4d9af2cb2d8e6fdcd96b72543bebb88a",
"version" : "1.0.33"
}
},
{
"identity" : "keychain-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/evgenyneu/keychain-swift.git",
"state" : {
"revision" : "5e1b02b6a9dac2a759a1d5dbc175c86bd192a608",
"version" : "24.0.0"
"revision" : "d108a1fa6189e661f91560548ef48651ed8d93b9",
"version" : "20.0.0"
}
},
{
Expand All @@ -42,8 +51,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/smithy-lang/smithy-swift",
"state" : {
"revision" : "bf096bf5c507e2c3f9ecc23c0c65dba2e1ffe3b2",
"version" : "0.79.0"
"revision" : "0d4d3eae8cfb04f3e0cbc4e7740e7344cc9fac55",
"version" : "0.87.0"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x98",
"green" : "0x84",
"red" : "0x01"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x98",
"green" : "0x84",
"red" : "0x01"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF0",
"green" : "0xF2",
"red" : "0xF2"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF0",
"green" : "0xF2",
"red" : "0xF2"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ extension UIColor {
//Map Colors
static let mapDarkBlackColor = UIColor(named: "mapdarkblackcolor")!
static let maplightGrayColor = UIColor(named: "maplightGrayColor")!
static let mapStyleTintColor = UIColor(named: "mapStyleTintColor")!
static let politicalListViewBackgroundColor = UIColor(named: "politicalListViewBackgroundColor")!
static let mapElementDiverColor = UIColor(named: "dividerColor")!
static let closeButtonBackgroundColor = UIColor(named: "closeButtonBackgroundColor")!
static let closeButtonTintColor = UIColor(named: "closeButtonTintColor")!
Expand Down
79 changes: 33 additions & 46 deletions LocationServices/LocationServices/Constants/AppConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,62 +8,49 @@
import Foundation

final class DefaultUserSettings {
static let mapStyle = MapStyleModel(title: "Light" ,
imageType: .light,
type: .esri,
isSelected: true)
static let mapHereStyle = MapStyleModel(title: "Explore",
imageType: .explore,
type: .here,
static let mapStyle = MapStyleModel(title: "Standard" ,
imageType: .standard,
isSelected: true)
static let mapStyleColorType = MapStyleColorType.light
static let unitValue = "Metric"
}

final class DefaultMapStyles {

static func getMapStyleUrl() -> URL? {
if let apiKey = AmazonLocationClient.getApiKey(), let regionName = AmazonLocationClient.getApiKeyRegion() {
var colorType = UserDefaultsHelper.getObject(value: MapStyleColorType.self, key: .mapStyleColorType) ?? MapStyleColorType.light
let style = UserDefaultsHelper.getObject(value: MapStyleModel.self, key: .mapStyle) ?? mapStyles.first!
if style.imageType == .hybrid || style.imageType == .satellite {
colorType = .light
}

let politicalView = UserDefaultsHelper.getObject(value: PoliticalViewType.self, key: .politicalView)
let urlString = "https://maps.geo.\(regionName).amazonaws.com/v2/styles/\(style.title)/descriptor?key=\(apiKey)&color-scheme=\(colorType.colorName)\(politicalView != nil ? "&political-view=\(politicalView!.countryCode)" : "")"

return URL(string: urlString)
}
else {
return nil
}
}

static let mapStyles: [MapStyleModel] = [
MapStyleModel(title: "Light" ,
imageType: .light ,
type: .esri,
MapStyleModel(title: "Standard" ,
imageType: .standard ,
isSelected: true),
MapStyleModel(title: "Streets" ,
imageType: .street ,
type: .esri,
isSelected: false),
MapStyleModel(title: "Navigation" ,
imageType: .navigation ,
type: .esri,
isSelected: false),
MapStyleModel(title: "Dark Gray" ,
imageType: .darkGray ,
type: .esri,
isSelected: false),
MapStyleModel(title: "Light Gray" ,
imageType: .lightGray ,
type: .esri,
isSelected: false),
MapStyleModel(title: "Imagery" ,
imageType: .Imagery ,
type: .esri,
isSelected: false),
MapStyleModel(title: "Explore" ,
imageType: .explore ,
type: .here,
isSelected: false),
MapStyleModel(title: "Contrast" ,
imageType: .contrast ,
type: .here,
isSelected: false),
MapStyleModel(title: "ExploreTruck" ,
imageType: .exploreTruck ,
type: .here,
isSelected: false),
MapStyleModel(title: "Imagery" ,
imageType: .hereImagery ,
type: .here,
MapStyleModel(title: "Monochrome" ,
imageType: .monochrome ,
isSelected: false),
MapStyleModel(title: "Hybrid" ,
imageType: .hybrid ,
type: .here,
isSelected: false),
MapStyleModel(title: "Satellite" ,
imageType: .satellite ,
isSelected: false),
]
}

enum AppConstants {
static let amazonHqMapPosition = (latitude: 47.61506909519956, longitude: -122.33826750882835)
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ struct ViewsIdentifiers {
static let imageAnnotationView = "ImageAnnotationView"
static let bottomGrabberView = "BottomGrabberView"
static let sideBarTableView = "SideBarTableView"
static let mapStyleRow = "MapStyleRow"
static let politicalViewButton = "politicalViewButton"
static let politicalViewTable = "politicalViewTable"
static let politicalViewCell = "politicalViewCell"
static let politicalViewSubtitle = "politicalViewSubtitle"
static let politicalViewCloseButton = "politicalViewCloseButton"
}

struct Explore {
Expand Down Expand Up @@ -59,7 +65,7 @@ struct ViewsIdentifiers {
static let routeTypesContainer = "RouteTypesContainer"

static let carContainer = "CarContainer"
static let walkContainer = "WalkContainer"
static let pedestrianContainer = "pedestrianContainer"
static let truckContainer = "TruckContainer"

static let routeEstimatedTime = "RouteEstimatedTime"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ extension ExploreCoordinator: ExploreNavigationDelegate {
}
currentBottomSheet?.dismissBottomSheet()
controller.presentBottomSheet(parentController: ExploreCoordinator.exploreController!)
controller.enableBottomSheetGrab()
controller.setBottomSheetHeight(to: controller.getLargeDetentHeight())
currentBottomSheet = controller
}

func showDirections(isRouteOptionEnabled: Bool?,
firstDestionation: MapModel?,
secondDestionation: MapModel?,
firstDestination: MapModel?,
secondDestination: MapModel?,
lat: Double?,
long: Double?
) {
Expand All @@ -63,22 +63,22 @@ extension ExploreCoordinator: ExploreNavigationDelegate {

NotificationCenter.default.post(name: Notification.Name("DirectionViewDismissed"), object: nil, userInfo: nil)
NotificationCenter.default.post(name: Notification.Name("updateMapViewButtons"), object: nil, userInfo: nil)
guard let secondDestionation, firstDestionation == nil else { return }
let userInfo = ["place" : secondDestionation]
guard let secondDestination, firstDestination == nil else { return }
let userInfo = ["place" : secondDestination]
NotificationCenter.default.post(name: Notification.selectedPlace, object: nil, userInfo: userInfo)
}

if let firstDestionation {
controller.firstDestionation = DirectionTextFieldModel(placeName: firstDestionation.placeName ?? "", placeAddress: firstDestionation.placeAddress, lat: firstDestionation.placeLat, long: firstDestionation.placeLong)
if let firstDestination {
controller.firstDestination = DirectionTextFieldModel(placeName: firstDestination.placeName ?? "", placeAddress: firstDestination.placeAddress, lat: firstDestination.placeLat, long: firstDestination.placeLong)
}

// first location as my current location
if controller.firstDestionation == nil, let lat, let long {
controller.firstDestionation = DirectionTextFieldModel(placeName: "My Location", placeAddress: nil, lat: lat, long: long)
if controller.firstDestination == nil, let lat, let long {
controller.firstDestination = DirectionTextFieldModel(placeName: "My Location", placeAddress: nil, lat: lat, long: long)
}

if let secondDestionation {
controller.secondDestionation = DirectionTextFieldModel(placeName: secondDestionation.placeName ?? "", placeAddress: secondDestionation.placeAddress, lat: secondDestionation.placeLat, long: secondDestionation.placeLong)
if let secondDestination {
controller.secondDestination = DirectionTextFieldModel(placeName: secondDestination.placeName ?? "", placeAddress: secondDestination.placeAddress, lat: secondDestination.placeLat, long: secondDestination.placeLong)
}

controller.userLocation = (lat, long)
Expand Down Expand Up @@ -127,8 +127,8 @@ extension ExploreCoordinator: ExploreNavigationDelegate {

}

func showNavigationview(steps: [NavigationSteps], summaryData: (totalDistance: Double, totalDuration: Double), firstDestionation: MapModel?, secondDestionation: MapModel?) {
let controller = NavigationBuilder.create(steps: steps, summaryData: summaryData, firstDestionation: firstDestionation, secondDestionation: secondDestionation)
func showNavigationview(routeLegDetails: [RouteLegDetails], summaryData: (totalDistance: Double, totalDuration: Double), firstDestination: MapModel?, secondDestination: MapModel?) {
let controller = NavigationBuilder.create(routeLegDetails: routeLegDetails, summaryData: summaryData, firstDestination: firstDestination, secondDestination: secondDestination)
controller.delegate = self

currentBottomSheet?.dismissBottomSheet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ extension GeofenceCoordinator: GeofenceNavigationDelegate {
self.userLocation = (lat: lat, long: long)
}
let controller = GeofenceDashboardBuilder.create(lat: lat ?? self.userLocation.lat, long: long ?? self.userLocation.long, geofences: geofences)

controller.delegate = self
controller.addGeofence = { [weak self] parameters in
self?.showAddGeofenceFlow(activeGeofencesLists: parameters.activeGeofences,
isEditingSceneEnabled: parameters.isEditingSceneEnabled,
Expand Down Expand Up @@ -116,7 +116,7 @@ extension GeofenceCoordinator: GeofenceNavigationDelegate {

currentBottomSheet?.dismissBottomSheet()
controller.presentBottomSheet(parentController: geofenceController!)
controller.enableBottomSheetGrab()
controller.setBottomSheetHeight(to: controller.getLargeDetentHeight())
currentBottomSheet = controller
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ extension SettingsCoordinator: SettingsNavigationDelegate {

private func showAwsCloudFormationscene() {
let controller = LoginVCBuilder.create(from: true)
controller.dismissHandler = { [weak self] in
self?.navigationController.popViewController(animated: true)
}
controller.isFromSettingScene = true
navigationController.pushViewController(controller, animated: true)
}
Expand Down
Loading