diff --git a/android/app/src/main/java/app/tourism/data/repositories/PlacesRepository.kt b/android/app/src/main/java/app/tourism/data/repositories/PlacesRepository.kt index dcd24457d7..21c18049e6 100644 --- a/android/app/src/main/java/app/tourism/data/repositories/PlacesRepository.kt +++ b/android/app/src/main/java/app/tourism/data/repositories/PlacesRepository.kt @@ -35,7 +35,6 @@ class PlacesRepository( fun downloadAllData(): Flow> = flow { val hashes = hashesDao.getHashes() - val favoritesResponse = handleResponse(call = { api.getFavorites() }, context) if (hashes.isEmpty()) { diff --git a/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings index e929259743..5ea251ce80 100644 --- a/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/en-GB.lproj/Localizable.strings @@ -3945,6 +3945,10 @@ "smth_went_wrong" = "Error"; +"error" = "Error"; + +"server_error" = "Server error, try later"; + "wait_tjk_map_downloading" = "Please wait, the map of Tajikistan is loading, stay in the app"; "welcome_to_tjk" = "Welcome to Tajikistan"; @@ -3957,6 +3961,8 @@ "sign_up_title" = "Registration"; +"signed_in_successfully" = "Successfully signed in"; + "username" = "Login"; "full_name" = "Full name"; @@ -3965,7 +3971,9 @@ "tourism_email" = "Email"; -"tourism_password" = "Repeat the password"; +"tourism_password" = "Password"; + +"confirm_password" = "Repeat the password"; "tourism_forgot_password" = "Forgot password?"; diff --git a/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings index 9850f20630..e690c44e76 100644 --- a/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/en.lproj/Localizable.strings @@ -3945,6 +3945,10 @@ "smth_went_wrong" = "Error"; +"error" = "Error"; + +"server_error" = "Server error, try later"; + "wait_tjk_map_downloading" = "Please wait, the map of Tajikistan is loading, stay in the app"; "welcome_to_tjk" = "Welcome to Tajikistan"; @@ -3957,17 +3961,19 @@ "sign_up_title" = "Registration"; +"signed_in_successfully" = "Successfully signed in"; + "username" = "Login"; "full_name" = "Full name"; "country" = "Country"; -"confirm_password" = "Repeat the password"; - "tourism_email" = "Email"; -"tourism_password" = "Repeat the password"; +"tourism_password" = "Password"; + +"confirm_password" = "Repeat the password"; "tourism_forgot_password" = "Forgot password?"; diff --git a/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings b/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings index b97417c7b0..b2262de455 100644 --- a/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings +++ b/iphone/Maps/LocalizedStrings/ru.lproj/Localizable.strings @@ -3945,6 +3945,10 @@ "smth_went_wrong" = "Упс, что-то пошло не так"; +"server_error" = "Ошибка сервера, попробуйте позже"; + +"error" = "Ошибка"; + "wait_tjk_map_downloading" = "Пожалуйста, подождите, идет загрузка карты Таджикистана. Оставайтесь в приложении"; "welcome_to_tjk" = "Добро пожаловать в Таджикистан"; @@ -3957,6 +3961,8 @@ "sign_up_title" = "Регистрация"; +"signed_in_successfully" = "Successfully signed in"; + "username" = "Логин"; "full_name" = "Ф.И.О"; @@ -3967,10 +3973,10 @@ "tourism_password" = "Пароль"; -"tourism_forgot_password" = "Забыли пароль?"; - "confirm_password" = "Повторите пароль"; +"tourism_forgot_password" = "Забыли пароль?"; + "home" = "Главная"; "favorites" = "Избранное"; diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 58445da7e3..f1de19bae0 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -263,6 +263,16 @@ 4B4153B52BF9695500EE4B02 /* MWMTextToSpeechTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B4153B42BF9695500EE4B02 /* MWMTextToSpeechTests.mm */; }; 524634C62C53BC3100FDCABA /* Auth.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 524634C22C53BB3A00FDCABA /* Auth.storyboard */; }; 524634CD2C57232400FDCABA /* TourismMain.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 524634CC2C57232400FDCABA /* TourismMain.storyboard */; }; + 5260D3CE2C64F60200C673B4 /* APIEndpoints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3CD2C64F60200C673B4 /* APIEndpoints.swift */; }; + 5260D3D12C64F7F100C673B4 /* SignInRequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3D02C64F7F100C673B4 /* SignInRequestDTO.swift */; }; + 5260D3D82C64F8BC00C673B4 /* AuthResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3D72C64F8BC00C673B4 /* AuthResponseDTO.swift */; }; + 5260D3DA2C661FF000C673B4 /* NetworkError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3D92C661FF000C673B4 /* NetworkError.swift */; }; + 5260D3DE2C66237700C673B4 /* AuthService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3DD2C66237700C673B4 /* AuthService.swift */; }; + 5260D3E02C6624B900C673B4 /* AuthRepositoryImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3DF2C6624B900C673B4 /* AuthRepositoryImpl.swift */; }; + 5260D3E32C66289900C673B4 /* SignInRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3E22C66289900C673B4 /* SignInRequest.swift */; }; + 5260D3E52C66290500C673B4 /* AuthResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3E42C66290500C673B4 /* AuthResponse.swift */; }; + 5260D3E82C66439400C673B4 /* AuthRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3E72C66439400C673B4 /* AuthRepository.swift */; }; + 5260D3EB2C6967DD00C673B4 /* UITextFieldExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5260D3EA2C6967DD00C673B4 /* UITextFieldExtensions.swift */; }; 527D5E752C60A1F800736A85 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 527D5E742C60A1F800736A85 /* Images.xcassets */; }; 527D5E782C60D94B00736A85 /* AppButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527D5E772C60D94B00736A85 /* AppButton.swift */; }; 527D5E7B2C60E05D00736A85 /* LanguageUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527D5E7A2C60E05D00736A85 /* LanguageUtils.swift */; }; @@ -291,6 +301,10 @@ 52D588CE2C5CEAF900AB96B3 /* Gilroy-ExtraBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 52D588C42C5CEAF900AB96B3 /* Gilroy-ExtraBold.ttf */; }; 52E2D3A42C59F9CE00A8843A /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52E2D3A32C59F9CE00A8843A /* WelcomeViewController.swift */; }; 52E2D3A62C5A017400A8843A /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52E2D3A52C5A017400A8843A /* HomeViewController.swift */; }; + 52E95F022C6B32E500A3FE2E /* ErrorResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52E95F012C6B32E500A3FE2E /* ErrorResponse.swift */; }; + 52E95F042C6B71B900A3FE2E /* CombineNetworkHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52E95F032C6B71B900A3FE2E /* CombineNetworkHelper.swift */; }; + 52E95F072C6B7E2400A3FE2E /* SignUpRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52E95F062C6B7E2400A3FE2E /* SignUpRequest.swift */; }; + 52E95F0B2C6B8CC800A3FE2E /* UIViewControllerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52E95F0A2C6B8CC800A3FE2E /* UIViewControllerExtensions.swift */; }; 6741A9421BF340DE002C974C /* sound-strings in Resources */ = {isa = PBXBuildFile; fileRef = 5605022E1B6211E100169CAD /* sound-strings */; }; 6741A9451BF340DE002C974C /* classificator.txt in Resources */ = {isa = PBXBuildFile; fileRef = EE026F0511D6AC0D00645242 /* classificator.txt */; }; 6741A9491BF340DE002C974C /* countries.txt in Resources */ = {isa = PBXBuildFile; fileRef = FA46DA2B12D4166E00968C36 /* countries.txt */; }; @@ -1213,6 +1227,16 @@ 4B4153B42BF9695500EE4B02 /* MWMTextToSpeechTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTextToSpeechTests.mm; sourceTree = ""; }; 524634C22C53BB3A00FDCABA /* Auth.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Auth.storyboard; sourceTree = ""; }; 524634CC2C57232400FDCABA /* TourismMain.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TourismMain.storyboard; sourceTree = ""; }; + 5260D3CD2C64F60200C673B4 /* APIEndpoints.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIEndpoints.swift; sourceTree = ""; }; + 5260D3D02C64F7F100C673B4 /* SignInRequestDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInRequestDTO.swift; sourceTree = ""; }; + 5260D3D72C64F8BC00C673B4 /* AuthResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthResponseDTO.swift; sourceTree = ""; }; + 5260D3D92C661FF000C673B4 /* NetworkError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkError.swift; sourceTree = ""; }; + 5260D3DD2C66237700C673B4 /* AuthService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthService.swift; sourceTree = ""; }; + 5260D3DF2C6624B900C673B4 /* AuthRepositoryImpl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthRepositoryImpl.swift; sourceTree = ""; }; + 5260D3E22C66289900C673B4 /* SignInRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInRequest.swift; sourceTree = ""; }; + 5260D3E42C66290500C673B4 /* AuthResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthResponse.swift; sourceTree = ""; }; + 5260D3E72C66439400C673B4 /* AuthRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthRepository.swift; sourceTree = ""; }; + 5260D3EA2C6967DD00C673B4 /* UITextFieldExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITextFieldExtensions.swift; sourceTree = ""; }; 527D5E742C60A1F800736A85 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 527D5E772C60D94B00736A85 /* AppButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppButton.swift; sourceTree = ""; }; 527D5E7A2C60E05D00736A85 /* LanguageUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageUtils.swift; sourceTree = ""; }; @@ -1240,6 +1264,10 @@ 52D588C42C5CEAF900AB96B3 /* Gilroy-ExtraBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Gilroy-ExtraBold.ttf"; sourceTree = ""; }; 52E2D3A32C59F9CE00A8843A /* WelcomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = ""; }; 52E2D3A52C5A017400A8843A /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; + 52E95F012C6B32E500A3FE2E /* ErrorResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorResponse.swift; sourceTree = ""; }; + 52E95F032C6B71B900A3FE2E /* CombineNetworkHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CombineNetworkHelper.swift; sourceTree = ""; }; + 52E95F062C6B7E2400A3FE2E /* SignUpRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpRequest.swift; sourceTree = ""; }; + 52E95F0A2C6B8CC800A3FE2E /* UIViewControllerExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewControllerExtensions.swift; sourceTree = ""; }; 5605022E1B6211E100169CAD /* sound-strings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "sound-strings"; path = "../../data/sound-strings"; sourceTree = ""; }; 6741AA5D1BF340DE002C974C /* Organic Maps (Debug).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Organic Maps (Debug).app"; sourceTree = BUILT_PRODUCTS_DIR; }; 6B15907026623AE500944BBA /* 00_NotoSansThai-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "00_NotoSansThai-Regular.ttf"; path = "../../data/00_NotoSansThai-Regular.ttf"; sourceTree = ""; }; @@ -2741,10 +2769,11 @@ 5236A3692C52588000E3A7AD /* Tourism */ = { isa = PBXGroup; children = ( + 5260D3C72C64F52C00C673B4 /* Resources */, + 5260D3C52C64B85B00C673B4 /* Domain */, + 5260D3C42C64B84600C673B4 /* Data */, 527D5E792C60E04900736A85 /* Utils */, - 52D588B62C5CE10200AB96B3 /* Fonts */, 5236A36C2C5258AC00E3A7AD /* Presentation */, - 527D5E742C60A1F800736A85 /* Images.xcassets */, 52B573EF2C61E4110047FAC9 /* Constants.swift */, ); path = Tourism; @@ -2753,6 +2782,7 @@ 5236A36C2C5258AC00E3A7AD /* Presentation */ = { isa = PBXGroup; children = ( + 5260D3E92C6967AF00C673B4 /* Extensions */, 527D5E7D2C60E68200736A85 /* Utils */, 527D5E762C60D92900736A85 /* Components */, 528D729F2C5BB7D100D53210 /* Theme */, @@ -2762,6 +2792,154 @@ path = Presentation; sourceTree = ""; }; + 5260D3C42C64B84600C673B4 /* Data */ = { + isa = PBXGroup; + children = ( + 5260D3DB2C66205700C673B4 /* Repositories */, + 5260D3CA2C64F59700C673B4 /* Prefs */, + 5260D3C92C64F58A00C673B4 /* Db */, + 5260D3C82C64F58300C673B4 /* Network */, + ); + path = Data; + sourceTree = ""; + }; + 5260D3C52C64B85B00C673B4 /* Domain */ = { + isa = PBXGroup; + children = ( + 5260D3E62C66437B00C673B4 /* Repositories */, + 5260D3C62C64B87D00C673B4 /* Models */, + ); + path = Domain; + sourceTree = ""; + }; + 5260D3C62C64B87D00C673B4 /* Models */ = { + isa = PBXGroup; + children = ( + 52E95EFE2C6B32D900A3FE2E /* Responses */, + 5260D3E12C66287D00C673B4 /* Auth */, + ); + path = Models; + sourceTree = ""; + }; + 5260D3C72C64F52C00C673B4 /* Resources */ = { + isa = PBXGroup; + children = ( + 52D588B62C5CE10200AB96B3 /* Fonts */, + 527D5E742C60A1F800736A85 /* Images.xcassets */, + ); + path = Resources; + sourceTree = ""; + }; + 5260D3C82C64F58300C673B4 /* Network */ = { + isa = PBXGroup; + children = ( + 52E95F052C6B797E00A3FE2E /* EminoFire */, + 5260D3DC2C66236500C673B4 /* Services */, + 5260D3CF2C64F7E200C673B4 /* DTO */, + 5260D3CD2C64F60200C673B4 /* APIEndpoints.swift */, + ); + path = Network; + sourceTree = ""; + }; + 5260D3C92C64F58A00C673B4 /* Db */ = { + isa = PBXGroup; + children = ( + ); + path = Db; + sourceTree = ""; + }; + 5260D3CA2C64F59700C673B4 /* Prefs */ = { + isa = PBXGroup; + children = ( + ); + path = Prefs; + sourceTree = ""; + }; + 5260D3CF2C64F7E200C673B4 /* DTO */ = { + isa = PBXGroup; + children = ( + 5260D3D62C64F87800C673B4 /* Currency */, + 5260D3D52C64F87500C673B4 /* Place */, + 5260D3D42C64F87200C673B4 /* Profile */, + 5260D3D22C64F84700C673B4 /* Auth */, + ); + path = DTO; + sourceTree = ""; + }; + 5260D3D22C64F84700C673B4 /* Auth */ = { + isa = PBXGroup; + children = ( + 5260D3D02C64F7F100C673B4 /* SignInRequestDTO.swift */, + 5260D3D72C64F8BC00C673B4 /* AuthResponseDTO.swift */, + ); + path = Auth; + sourceTree = ""; + }; + 5260D3D42C64F87200C673B4 /* Profile */ = { + isa = PBXGroup; + children = ( + ); + path = Profile; + sourceTree = ""; + }; + 5260D3D52C64F87500C673B4 /* Place */ = { + isa = PBXGroup; + children = ( + ); + path = Place; + sourceTree = ""; + }; + 5260D3D62C64F87800C673B4 /* Currency */ = { + isa = PBXGroup; + children = ( + ); + path = Currency; + sourceTree = ""; + }; + 5260D3DB2C66205700C673B4 /* Repositories */ = { + isa = PBXGroup; + children = ( + 5260D3DF2C6624B900C673B4 /* AuthRepositoryImpl.swift */, + ); + path = Repositories; + sourceTree = ""; + }; + 5260D3DC2C66236500C673B4 /* Services */ = { + isa = PBXGroup; + children = ( + 5260D3DD2C66237700C673B4 /* AuthService.swift */, + ); + path = Services; + sourceTree = ""; + }; + 5260D3E12C66287D00C673B4 /* Auth */ = { + isa = PBXGroup; + children = ( + 5260D3E22C66289900C673B4 /* SignInRequest.swift */, + 5260D3E42C66290500C673B4 /* AuthResponse.swift */, + 52E95F062C6B7E2400A3FE2E /* SignUpRequest.swift */, + ); + path = Auth; + sourceTree = ""; + }; + 5260D3E62C66437B00C673B4 /* Repositories */ = { + isa = PBXGroup; + children = ( + 5260D3E72C66439400C673B4 /* AuthRepository.swift */, + ); + path = Repositories; + sourceTree = ""; + }; + 5260D3E92C6967AF00C673B4 /* Extensions */ = { + isa = PBXGroup; + children = ( + 5260D3EA2C6967DD00C673B4 /* UITextFieldExtensions.swift */, + 527D5E812C60EFEE00736A85 /* UIViewExtensions.swift */, + 52E95F0A2C6B8CC800A3FE2E /* UIViewControllerExtensions.swift */, + ); + path = Extensions; + sourceTree = ""; + }; 527D5E762C60D92900736A85 /* Components */ = { isa = PBXGroup; children = ( @@ -2785,7 +2963,6 @@ isa = PBXGroup; children = ( 527D5E7E2C60E69C00736A85 /* Layouting.swift */, - 527D5E812C60EFEE00736A85 /* UIViewExtensions.swift */, ); path = Utils; sourceTree = ""; @@ -2862,6 +3039,23 @@ path = Screens; sourceTree = ""; }; + 52E95EFE2C6B32D900A3FE2E /* Responses */ = { + isa = PBXGroup; + children = ( + 52E95F012C6B32E500A3FE2E /* ErrorResponse.swift */, + ); + path = Responses; + sourceTree = ""; + }; + 52E95F052C6B797E00A3FE2E /* EminoFire */ = { + isa = PBXGroup; + children = ( + 5260D3D92C661FF000C673B4 /* NetworkError.swift */, + 52E95F032C6B71B900A3FE2E /* CombineNetworkHelper.swift */, + ); + path = EminoFire; + sourceTree = ""; + }; 97B4E9271851DAB300BEC5D7 /* Custom Views */ = { isa = PBXGroup; children = ( @@ -4362,6 +4556,7 @@ F6E2FF5A1E097BA00083EBEC /* MWMNightModeController.m in Sources */, 471A7BB8247FE3C300A0D4C1 /* URL+Query.swift in Sources */, 47F86D0120C93D8D00FEE291 /* TabViewController.swift in Sources */, + 52E95F022C6B32E500A3FE2E /* ErrorResponse.swift in Sources */, 99536113235DB86C008B218F /* InsetsLabel.swift in Sources */, 6741A9A51BF340DE002C974C /* MWMShareActivityItem.mm in Sources */, 994F790723E85C5900660E75 /* DifficultyView.swift in Sources */, @@ -4397,6 +4592,7 @@ 34F742321E0834F400AC1FD6 /* UIViewController+Navigation.m in Sources */, 340475811E081B3300C92850 /* iosOGLContextFactory.mm in Sources */, 99F3EB0623F418A200C713F8 /* PlacePagePresenter.swift in Sources */, + 52E95F072C6B7E2400A3FE2E /* SignUpRequest.swift in Sources */, AA1C7E3E269A2DD600BAADF2 /* EditTrackViewController.swift in Sources */, 34AB66561FC5AA330078E451 /* TransportTransitPedestrian.swift in Sources */, 993DF0C823F6BD0600AC231A /* ElevationDetailsViewController.swift in Sources */, @@ -4443,6 +4639,7 @@ F6E2FF2D1E097BA00083EBEC /* MWMSearchCell.mm in Sources */, 3454D7C51E07F045004AF2AD /* UIButton+Orientation.m in Sources */, 34AB66831FC5AA330078E451 /* NavigationAddPointToastView.swift in Sources */, + 52E95F0B2C6B8CC800A3FE2E /* UIViewControllerExtensions.swift in Sources */, F6E2FE4C1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 3404757E1E081B3300C92850 /* iosOGLContext.mm in Sources */, 993F5513237C622700545511 /* DeepLinkHandler.swift in Sources */, @@ -4492,6 +4689,7 @@ 993DF11023F6BDB100AC231A /* MWMButtonRenderer.swift in Sources */, 3463BA671DE81DB90082417F /* MWMTrafficButtonViewController.mm in Sources */, ED79A5D52BDF8D6100952D1F /* SynchronizationError.swift in Sources */, + 5260D3DA2C661FF000C673B4 /* NetworkError.swift in Sources */, 993DF10323F6BDB100AC231A /* MainTheme.swift in Sources */, 34AB66051FC5AA320078E451 /* MWMNavigationDashboardManager+Entity.mm in Sources */, 993DF12A23F6BDB100AC231A /* Style.swift in Sources */, @@ -4543,6 +4741,7 @@ F6E2FD711E097BA00083EBEC /* MWMMapDownloaderTableViewCell.m in Sources */, F6E2FE4F1E097BA00083EBEC /* MWMActionBarButton.m in Sources */, 47F86CFF20C936FC00FEE291 /* TabView.swift in Sources */, + 5260D3CE2C64F60200C673B4 /* APIEndpoints.swift in Sources */, 34AB66741FC5AA330078E451 /* BaseRoutePreviewStatus.swift in Sources */, 8C4FB9C72BEFEFF400D44877 /* CarPlayWindowScaleAdjuster.swift in Sources */, 349D1CE41E3F836900A878FD /* UIViewController+Hierarchy.swift in Sources */, @@ -4585,6 +4784,7 @@ 349A13831DEC138C00C7DB60 /* MWMMobileInternetAlert.m in Sources */, 6741A9EC1BF340DE002C974C /* MWMCircularProgress.m in Sources */, 993DF11923F6BDB100AC231A /* UITextFieldRenderer.swift in Sources */, + 5260D3E82C66439400C673B4 /* AuthRepository.swift in Sources */, 342CC5F21C2D7730005F3FE5 /* MWMAuthorizationLoginViewController.mm in Sources */, 340475591E081A4600C92850 /* WebViewController.m in Sources */, 3404F4992028A20D0090E401 /* BMCCategoryCell.swift in Sources */, @@ -4651,6 +4851,7 @@ F6E2FE821E097BA00083EBEC /* MWMPlacePageOpeningHoursDayView.m in Sources */, F6E2FD6B1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.m in Sources */, CDCA27842245090900167D87 /* ListenerContainer.swift in Sources */, + 5260D3E52C66290500C673B4 /* AuthResponse.swift in Sources */, 47E3C7252111E41B008B3B27 /* DimmedModalPresentationController.swift in Sources */, 52B573F22C61E8980047FAC9 /* SignUpViewController.swift in Sources */, 3472B5CB200F43EF00DC6CD5 /* BackgroundFetchScheduler.swift in Sources */, @@ -4685,6 +4886,7 @@ 6741AA0B1BF340DE002C974C /* MWMMapViewControlsManager.mm in Sources */, F6E2FED91E097BA00083EBEC /* MWMSearchContentView.m in Sources */, EDFDFB4C2B722C9C0013A44C /* InfoTableViewCell.swift in Sources */, + 5260D3DE2C66237700C673B4 /* AuthService.swift in Sources */, 47CA68F8250F8AB700671019 /* BookmarksListSectionHeader.swift in Sources */, F6BD1D211CA412920047B8E8 /* MWMOsmAuthAlert.mm in Sources */, 47CF2E6323BA0DD500D11C30 /* CopyLabel.swift in Sources */, @@ -4719,10 +4921,12 @@ 3404164C1E7BF42E00E2B6D6 /* UIView+Coordinates.swift in Sources */, 99F3EB0323F4178200C713F8 /* PlacePageCommonLayout.swift in Sources */, 99C6532223F2F506004322F3 /* IPlacePageLayout.swift in Sources */, + 5260D3D82C64F8BC00C673B4 /* AuthResponseDTO.swift in Sources */, 99F8B4C623B644A6009FF0B4 /* MapStyleSheet.swift in Sources */, 99012851244732DB00C72B10 /* BottomTabBarViewController.swift in Sources */, F63AF5061EA6162400A1DB98 /* FilterTypeCell.swift in Sources */, 993DF10623F6BDB100AC231A /* UIColor+rgba.swift in Sources */, + 52E95F042C6B71B900A3FE2E /* CombineNetworkHelper.swift in Sources */, EDC3573B2B7B5029001AE9CA /* CALayer+SetCorner.swift in Sources */, 47E3C7332111F4D8008B3B27 /* CoverVerticalDismissalAnimator.swift in Sources */, 471AB99423ABA3BD00F56D49 /* SearchMapsDataSource.swift in Sources */, @@ -4731,6 +4935,7 @@ 47F67D1521CAB21B0069754E /* MWMImageCoder.m in Sources */, 34AB66861FC5AA330078E451 /* MWMNavigationInfoView.mm in Sources */, 34C9BD051C6DB693000DC38D /* MWMViewController.m in Sources */, + 5260D3E02C6624B900C673B4 /* AuthRepositoryImpl.swift in Sources */, F6E2FDA41E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */, 3454D7CB1E07F045004AF2AD /* UIColor+MapsMeColor.m in Sources */, 34B127EA1FBDD410008713D9 /* MWMRouterTransitStepInfo.mm in Sources */, @@ -4751,6 +4956,7 @@ 3454D7BF1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */, 991FCA2423B11E61009AD684 /* BookmarksStyleSheet.swift in Sources */, 993DF12823F6BDB100AC231A /* IStyleSheet.swift in Sources */, + 5260D3E32C66289900C673B4 /* SignInRequest.swift in Sources */, 6741AA1C1BF340DE002C974C /* MWMRoutingDisclaimerAlert.m in Sources */, 34D3B0481E389D05004100F9 /* MWMNoteCell.m in Sources */, CD9AD967228067F500EC174A /* MapInfo.swift in Sources */, @@ -4760,6 +4966,7 @@ 993DF0C923F6BD0600AC231A /* ElevationDetailsBuilder.swift in Sources */, 674A7E301C0DB10B003D48E1 /* MWMMapWidgets.mm in Sources */, 34AB66291FC5AA330078E451 /* RouteManagerViewController.swift in Sources */, + 5260D3D12C64F7F100C673B4 /* SignInRequestDTO.swift in Sources */, 3404754D1E081A4600C92850 /* MWMKeyboard.m in Sources */, EDE243E52B6D3F400057369B /* OSMView.swift in Sources */, 993DF10C23F6BDB100AC231A /* MWMTableViewCellRenderer.swift in Sources */, @@ -4794,6 +5001,7 @@ 6741AA2B1BF340DE002C974C /* CircleView.m in Sources */, 4788739220EE326500F6826B /* VerticallyAlignedButton.swift in Sources */, EDFDFB462B7139490013A44C /* AboutInfo.swift in Sources */, + 5260D3EB2C6967DD00C673B4 /* UITextFieldExtensions.swift in Sources */, 3444DFDE1F18A5AF00E73099 /* SideButtonsArea.swift in Sources */, CDCA278622451F5000167D87 /* RouteInfo.swift in Sources */, 3467CEB6202C6FA900D3C670 /* BMCNotificationsCell.swift in Sources */, @@ -5010,7 +5218,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UIStatusBarHidden = NO; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -5040,7 +5248,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UIStatusBarHidden = NO; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/iphone/Maps/Tourism/Constants.swift b/iphone/Maps/Tourism/Constants.swift index 3ab43ddb29..609367d50b 100644 --- a/iphone/Maps/Tourism/Constants.swift +++ b/iphone/Maps/Tourism/Constants.swift @@ -12,4 +12,5 @@ struct Constants { ] } -let BASE_URL = "https://product.rebus.tj" +let BASE_URL_WITHOUT_API = "https://product.rebus.tj/" +let BASE_URL = "https://product.rebus.tj/api/" diff --git a/iphone/Maps/Tourism/Data/Network/APIEndpoints.swift b/iphone/Maps/Tourism/Data/Network/APIEndpoints.swift new file mode 100644 index 0000000000..b81b08262d --- /dev/null +++ b/iphone/Maps/Tourism/Data/Network/APIEndpoints.swift @@ -0,0 +1,35 @@ +import Foundation + +struct APIEndpoints { + // MARK: - Auth + static let signInUrl = "\(BASE_URL)login" + static let signUpUrl = "\(BASE_URL)register" + static let signOutUrl = "\(BASE_URL)logout" + + // MARK: - Profile + static let getUserUrl = "\(BASE_URL)user" + static let updateProfileUrl = "\(BASE_URL)profile" + static let updateLanguageUrl = "\(BASE_URL)profile/lang" + static let updateThemeUrl = "\(BASE_URL)profile/theme" + + // MARK: - Places + static func getPlacesByCategoryUrl(id: Int64) -> String { + return "\(BASE_URL)marks/\(id)" + } + static let getAllPlacesUrl = "\(BASE_URL)marks/all" + + // MARK: - Favorites + static let getFavoritesUrl = "\(BASE_URL)favourite-marks" + static let addFavoritesUrl = "\(BASE_URL)favourite-marks" + static let removeFromFavoritesUrl = "\(BASE_URL)favourite-marks" + + // MARK: - Reviews + static func getReviewsByPlaceIdUrl(id: Int64) -> String { + return "\(BASE_URL)feedbacks/\(id)" + } + static let postReviewUrl = "\(BASE_URL)feedbacks" + static let deleteReviewsUrl = "\(BASE_URL)feedbacks" + + // MARK: - Currency + static let currencyUrl = "\(BASE_URL)currency" +} diff --git a/iphone/Maps/Tourism/Data/Network/DTO/Auth/AuthResponseDTO.swift b/iphone/Maps/Tourism/Data/Network/DTO/Auth/AuthResponseDTO.swift new file mode 100644 index 0000000000..2bd6e4accc --- /dev/null +++ b/iphone/Maps/Tourism/Data/Network/DTO/Auth/AuthResponseDTO.swift @@ -0,0 +1,3 @@ +struct AuthResponseDTO: Codable { + let token: String +} diff --git a/iphone/Maps/Tourism/Data/Network/DTO/Auth/SignInRequestDTO.swift b/iphone/Maps/Tourism/Data/Network/DTO/Auth/SignInRequestDTO.swift new file mode 100644 index 0000000000..e336ad6169 --- /dev/null +++ b/iphone/Maps/Tourism/Data/Network/DTO/Auth/SignInRequestDTO.swift @@ -0,0 +1,11 @@ +struct SignInRequestDTO: Codable { + let email: String + let password: String +} + +extension SignInRequestDTO { + init(from domainModel: SignInRequest) { + self.email = domainModel.email + self.password = domainModel.password + } +} diff --git a/iphone/Maps/Tourism/Data/Network/EminoFire/CombineNetworkHelper.swift b/iphone/Maps/Tourism/Data/Network/EminoFire/CombineNetworkHelper.swift new file mode 100644 index 0000000000..45316805de --- /dev/null +++ b/iphone/Maps/Tourism/Data/Network/EminoFire/CombineNetworkHelper.swift @@ -0,0 +1,104 @@ +import Foundation +import Combine + +// EminoFire is kinda "library" for the abstraction of http code. +// It is named after the inventor of this piece Emin + +class CombineNetworkHelper { + + static func createRequest(url: URL, method: String, headers: [String: String] = [:], body: Data? = nil) -> URLRequest { + var request = URLRequest(url: url) + request.httpMethod = method + request.addValue("application/json", forHTTPHeaderField: "Accept") + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + + headers.forEach { key, value in + request.addValue(value, forHTTPHeaderField: key) + } + + request.httpBody = body + return request + } + + static func encodeRequestBody(_ body: T) throws -> Data { + let encoder = JSONEncoder() + encoder.outputFormatting = .withoutEscapingSlashes + encoder.keyEncodingStrategy = .convertToSnakeCase + return try encoder.encode(body) + } + + static func decodeResponse(data: Data, as type: T.Type = T.self) throws -> T { + let decoder = JSONDecoder() + return try decoder.decode(type, from: data) + } + + static func handleResponse(data: Data, response: URLResponse, decoder: JSONDecoder = JSONDecoder()) throws -> T { + guard let httpResponse = response as? HTTPURLResponse else { + throw NetworkError.other(message: "Network request error") + } + + debugPrint("Status Code: \(httpResponse.statusCode)") + + switch httpResponse.statusCode { + case 200...299: + return try decodeResponse(data: data, as: T.self) + case 422: + let decodedResponse = try decodeResponse(data: data, as: ErrorResponse.self) + throw NetworkError.errorToUser(message: decodedResponse.message) + case 500...599: + throw NetworkError.serverError(message: "Server Error: \(httpResponse.statusCode)") + default: + throw NetworkError.other(message: "Unknown error") + } + } + + static func handleMappingError(_ error: Error) -> NetworkError { + debugPrint("Mapping error: \(error)") + return error as? NetworkError ?? NetworkError.other(message: "\(error)") + } + + static func performRequest(url: URL, + method: String, + body: Data? = nil, + headers: [String: String] = [:], + decoder: JSONDecoder = JSONDecoder()) -> AnyPublisher { + let request = createRequest(url: url, method: method, headers: headers, body: body) + + return URLSession.shared.dataTaskPublisher(for: request) + .tryMap { data, response in + try handleResponse(data: data, response: response, decoder: decoder) + } + .mapError { error in + handleMappingError(error) + } + .receive(on: DispatchQueue.main) + .eraseToAnyPublisher() + } + + static func get(url: URL, headers: [String: String] = [:], decoder: JSONDecoder = JSONDecoder()) -> AnyPublisher { + return performRequest(url: url, method: "GET", headers: headers, decoder: decoder) + } + + static func post(path: String, body: U, headers: [String: String] = [:], decoder: JSONDecoder = JSONDecoder()) -> AnyPublisher { + guard let url = URL(string: path) else { + debugPrint("Invalid url") + return Fail(error: NetworkError.other(message: "Invalid url")).eraseToAnyPublisher() + } + + do { + let jsonData = try encodeRequestBody(body) + return performRequest(url: url, method: "POST", body: jsonData, headers: headers, decoder: decoder) + } catch { + return Fail(error: NetworkError.other(message: "Encoding error: \(error)")).eraseToAnyPublisher() + } + } + + static func postWithoutBody(path: String, headers: [String: String] = [:], decoder: JSONDecoder = JSONDecoder()) -> AnyPublisher { + guard let url = URL(string: path) else { + debugPrint("Invalid url") + return Fail(error: NetworkError.other(message: "Invalid url")).eraseToAnyPublisher() + } + + return performRequest(url: url, method: "POST", headers: headers, decoder: decoder) + } +} diff --git a/iphone/Maps/Tourism/Data/Network/EminoFire/NetworkError.swift b/iphone/Maps/Tourism/Data/Network/EminoFire/NetworkError.swift new file mode 100644 index 0000000000..b55c385137 --- /dev/null +++ b/iphone/Maps/Tourism/Data/Network/EminoFire/NetworkError.swift @@ -0,0 +1,18 @@ +import Foundation + +enum NetworkError: LocalizedError { + case serverError(message: String) + case other(message: String) + case errorToUser(message: String) + + var errorDescription: String { + switch self { + case .serverError: + return L("server_error") + case .other: + return L("smth_went_wrong") + case .errorToUser(let message): + return message + } + } +} diff --git a/iphone/Maps/Tourism/Data/Network/HttpMethod.swift b/iphone/Maps/Tourism/Data/Network/HttpMethod.swift new file mode 100644 index 0000000000..a60053dca1 --- /dev/null +++ b/iphone/Maps/Tourism/Data/Network/HttpMethod.swift @@ -0,0 +1,8 @@ +import Foundation + +enum HTTPMethod: String { + case get = "GET" + case post = "POST" + case put = "PUT" + case delete = "DELETE" +} diff --git a/iphone/Maps/Tourism/Data/Network/Services/AuthService.swift b/iphone/Maps/Tourism/Data/Network/Services/AuthService.swift new file mode 100644 index 0000000000..95ee3de37f --- /dev/null +++ b/iphone/Maps/Tourism/Data/Network/Services/AuthService.swift @@ -0,0 +1,25 @@ +import Combine +import Foundation + +protocol AuthService { + func signIn(body: SignInRequest) -> AnyPublisher + func signUp(body: SignUpRequest) -> AnyPublisher + func signOut() -> AnyPublisher +} + +class AuthServiceImpl: AuthService { + + private let baseURL = BASE_URL + + func signIn(body: SignInRequest) -> AnyPublisher { + return CombineNetworkHelper.post(path: APIEndpoints.signInUrl, body: body) + } + + func signUp(body: SignUpRequest) -> AnyPublisher { + return CombineNetworkHelper.post(path: APIEndpoints.signUpUrl, body: body) + } + + func signOut() -> AnyPublisher { + return CombineNetworkHelper.postWithoutBody(path: APIEndpoints.signOutUrl) + } +} diff --git a/iphone/Maps/Tourism/Data/Repositories/AuthRepositoryImpl.swift b/iphone/Maps/Tourism/Data/Repositories/AuthRepositoryImpl.swift new file mode 100644 index 0000000000..eefc370382 --- /dev/null +++ b/iphone/Maps/Tourism/Data/Repositories/AuthRepositoryImpl.swift @@ -0,0 +1,26 @@ +import Combine + +class AuthRepositoryImpl: AuthRepository { + private let authService: AuthService + + init(authService: AuthService) { + self.authService = authService + } + + func signIn(body: SignInRequest) -> AnyPublisher { + return authService.signIn(body: body).map { dto in + AuthResponse.init(from: dto) + } + .eraseToAnyPublisher() + } + + func signUp(body: SignUpRequest) -> AnyPublisher { + return authService.signUp(body: body).map { dto in AuthResponse.init(from: dto) } + .eraseToAnyPublisher() + } + + func signOut() -> AnyPublisher { + return authService.signOut().map { dto in AuthResponse.init(from: dto) } + .eraseToAnyPublisher() + } +} diff --git a/iphone/Maps/Tourism/Domain/Models/Auth/AuthResponse.swift b/iphone/Maps/Tourism/Domain/Models/Auth/AuthResponse.swift new file mode 100644 index 0000000000..b9fab0e135 --- /dev/null +++ b/iphone/Maps/Tourism/Domain/Models/Auth/AuthResponse.swift @@ -0,0 +1,9 @@ +struct AuthResponse: Codable { + let token: String +} + +extension AuthResponse { + init(from dto: AuthResponseDTO) { + self.token = dto.token + } +} diff --git a/iphone/Maps/Tourism/Domain/Models/Auth/SignUpRequest.swift b/iphone/Maps/Tourism/Domain/Models/Auth/SignUpRequest.swift new file mode 100644 index 0000000000..0c0a5b8d85 --- /dev/null +++ b/iphone/Maps/Tourism/Domain/Models/Auth/SignUpRequest.swift @@ -0,0 +1,7 @@ +struct SignUpRequest: Codable { + let fullName: String + let email: String + let password: String + let passwordConfirmation: String + let country: String +} diff --git a/iphone/Maps/Tourism/Domain/Models/Responses/ErrorResponse.swift b/iphone/Maps/Tourism/Domain/Models/Responses/ErrorResponse.swift new file mode 100644 index 0000000000..f67a2a281b --- /dev/null +++ b/iphone/Maps/Tourism/Domain/Models/Responses/ErrorResponse.swift @@ -0,0 +1,3 @@ +struct ErrorResponse : Codable { + let message: String +} diff --git a/iphone/Maps/Tourism/Domain/Repositories/AuthRepository.swift b/iphone/Maps/Tourism/Domain/Repositories/AuthRepository.swift new file mode 100644 index 0000000000..6253ac7c8f --- /dev/null +++ b/iphone/Maps/Tourism/Domain/Repositories/AuthRepository.swift @@ -0,0 +1,8 @@ +import Foundation +import Combine + +protocol AuthRepository { + func signIn(body: SignInRequest) -> AnyPublisher + func signUp(body: SignUpRequest) -> AnyPublisher + func signOut() -> AnyPublisher +} diff --git a/iphone/Maps/Tourism/Presentation/Auth/Auth.storyboard b/iphone/Maps/Tourism/Presentation/Auth/Auth.storyboard index 9da9886d06..79eae9ac2c 100644 --- a/iphone/Maps/Tourism/Presentation/Auth/Auth.storyboard +++ b/iphone/Maps/Tourism/Presentation/Auth/Auth.storyboard @@ -37,12 +37,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iphone/Maps/Tourism/Presentation/Auth/Screens/SignInViewController.swift b/iphone/Maps/Tourism/Presentation/Auth/Screens/SignInViewController.swift index 8d6fc371d5..4111eaba6e 100644 --- a/iphone/Maps/Tourism/Presentation/Auth/Screens/SignInViewController.swift +++ b/iphone/Maps/Tourism/Presentation/Auth/Screens/SignInViewController.swift @@ -1,6 +1,9 @@ import UIKit +import Combine class SignInViewController: UIViewController { + private var cancellables = Set() + private var authRepository = AuthRepositoryImpl(authService: AuthServiceImpl()) private let backButton: BackButton = { let backButton = BackButton() @@ -60,7 +63,7 @@ class SignInViewController: UIViewController { }() private let signInButton: AppButton = { - let button = AppButton(label: L("sign_in"), isPrimary: true, target: self, action: #selector(signInClicked)) + let button = AppButton(label: L("sign_in"), isPrimary: true, target: self, action: #selector(signInTapped)) return button }() @@ -136,14 +139,27 @@ class SignInViewController: UIViewController { forgotPasswordButton.leadingAnchor.constraint(equalTo: containerView.leadingAnchor, constant: 32), forgotPasswordButton.bottomAnchor.constraint(equalTo: containerView.bottomAnchor, constant: -32) ]) - + backButton.addTarget(self, action: #selector(backButtonTapped), for: .touchUpInside) - signInButton.addTarget(self, action: #selector(signInClicked), for: .touchUpInside) forgotPasswordButton.addTarget(self, action: #selector(forgotPasswordTapped), for: .touchUpInside) } - @objc private func signInClicked() { - // Implement sign-in logic + // MARK: - buttons listeners + @objc private func signInTapped() { + signInButton.isLoading = true + authRepository.signIn(body: SignInRequest(email: emailTextField.text ?? "", password: passwordTextField.text ?? "")) + .sink(receiveCompletion: { [weak self] completion in + switch completion { + case .finished: + self?.navigateToMain() + case .failure(let error): + self?.showError(message: error.errorDescription) + } + }, receiveValue: { response in + self.view.showToast(message: "token: \(response.token)}", duration: 4) + } + ) + .store(in: &cancellables) } @objc private func forgotPasswordTapped() { @@ -153,6 +169,17 @@ class SignInViewController: UIViewController { } @objc private func backButtonTapped() { - self.navigationController?.popViewController(animated: false) + self.navigationController?.popViewController(animated: false) + } + + // MARK: - other functions + private func showError(message: String) { + signInButton.isLoading = false + showAlert(title: L("error"), message: message) + } + + private func navigateToMain() { + signInButton.isLoading = false + performSegue(withIdentifier: "SignIn2TourismMain", sender: nil) } } diff --git a/iphone/Maps/Tourism/Presentation/Auth/Screens/SignUpViewController.swift b/iphone/Maps/Tourism/Presentation/Auth/Screens/SignUpViewController.swift index 98aaecc252..1a732b5bc9 100644 --- a/iphone/Maps/Tourism/Presentation/Auth/Screens/SignUpViewController.swift +++ b/iphone/Maps/Tourism/Presentation/Auth/Screens/SignUpViewController.swift @@ -1,7 +1,10 @@ import UIKit +import Combine import CountryPickerView class SignUpViewController: UIViewController { + private var cancellables = Set() + private var authRepository = AuthRepositoryImpl(authService: AuthServiceImpl()) private let backButton: BackButton = { let backButton = BackButton() @@ -190,12 +193,33 @@ class SignUpViewController: UIViewController { ]) backButton.addTarget(self, action: #selector(backButtonTapped), for: .touchUpInside) - signUpButton.addTarget(self, action: #selector(signUpClicked), for: .touchUpInside) forgotPasswordButton.addTarget(self, action: #selector(forgotPasswordTapped), for: .touchUpInside) } + // MARK: - buttons listeners @objc private func signUpClicked() { - // TODO: signUpClicked + signUpButton.isLoading = true + authRepository.signUp( + body: SignUpRequest( + fullName: nameTextField.text ?? "", + email: emailTextField.text ?? "", + password: passwordTextField.text ?? "", + passwordConfirmation: confirmPasswordTextField.text ?? "", + country: cpv.selectedCountry.code + ) + ) + .sink(receiveCompletion: { [weak self] completion in + switch completion { + case .finished: + self?.navigateToMain() + case .failure(let error): + self?.showError(message: error.errorDescription) + } + }, receiveValue: { response in + self.view.showToast(message: "token: \(response.token)}", duration: 4) + } + ) + .store(in: &cancellables) } @objc private func forgotPasswordTapped() { @@ -207,4 +231,15 @@ class SignUpViewController: UIViewController { @objc private func backButtonTapped() { self.navigationController?.popViewController(animated: false) } + + // MARK: - other functions + private func showError(message: String) { + signUpButton.isLoading = false + showAlert(title: L("error"), message: message) + } + + private func navigateToMain() { + signUpButton.isLoading = false + performSegue(withIdentifier: "SignUp2TourismMain", sender: nil) + } } diff --git a/iphone/Maps/Tourism/Presentation/Auth/Screens/WelcomeViewController.swift b/iphone/Maps/Tourism/Presentation/Auth/Screens/WelcomeViewController.swift index e7af52e205..2bd874ecb5 100644 --- a/iphone/Maps/Tourism/Presentation/Auth/Screens/WelcomeViewController.swift +++ b/iphone/Maps/Tourism/Presentation/Auth/Screens/WelcomeViewController.swift @@ -155,10 +155,10 @@ class WelcomeViewController: UIViewController { } @objc private func signInClicked() { - navigationController?.pushViewController(SignInViewController(), animated: false) + performSegue(withIdentifier: "Welcome2SignIn", sender: nil) } @objc private func signUpClicked() { - navigationController?.pushViewController(SignUpViewController(), animated: false) + performSegue(withIdentifier: "Welcome2SignUp", sender: nil) } } diff --git a/iphone/Maps/Tourism/Presentation/Components/AppButton.swift b/iphone/Maps/Tourism/Presentation/Components/AppButton.swift index 7f421f9a8e..f222c51895 100644 --- a/iphone/Maps/Tourism/Presentation/Components/AppButton.swift +++ b/iphone/Maps/Tourism/Presentation/Components/AppButton.swift @@ -16,6 +16,7 @@ class AppButton: UIButton { init(label: String, isPrimary: Bool, icon: UIImage? = nil, target: Any?, action: Selector) { super.init(frame: .zero) + originalButtonText = label setTitle(label, for: .normal) isPrimary ? setPrimaryAppearance() : setSecondaryAppearance() @@ -90,7 +91,6 @@ class AppButton: UIButton { private func updateLoadingState() { if isLoading { - originalButtonText = title(for: .normal) setTitle("", for: .normal) activityIndicator.startAnimating() isUserInteractionEnabled = false diff --git a/iphone/Maps/Tourism/Presentation/Extensions/UITextFieldExtensions.swift b/iphone/Maps/Tourism/Presentation/Extensions/UITextFieldExtensions.swift new file mode 100644 index 0000000000..94913340fc --- /dev/null +++ b/iphone/Maps/Tourism/Presentation/Extensions/UITextFieldExtensions.swift @@ -0,0 +1,10 @@ +import Foundation +import Combine + +extension UITextField { + var textPublisher: AnyPublisher { + NotificationCenter.default.publisher(for: UITextField.textDidChangeNotification, object: self) + .compactMap { ($0.object as? UITextField)?.text } + .eraseToAnyPublisher() + } +} diff --git a/iphone/Maps/Tourism/Presentation/Extensions/UIViewControllerExtensions.swift b/iphone/Maps/Tourism/Presentation/Extensions/UIViewControllerExtensions.swift new file mode 100644 index 0000000000..92fb270946 --- /dev/null +++ b/iphone/Maps/Tourism/Presentation/Extensions/UIViewControllerExtensions.swift @@ -0,0 +1,9 @@ +import UIKit + +extension UIViewController { + func showAlert(title: String, message: String) { + let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) + present(alert, animated: true, completion: nil) + } +} diff --git a/iphone/Maps/Tourism/Presentation/Extensions/UIViewExtensions.swift b/iphone/Maps/Tourism/Presentation/Extensions/UIViewExtensions.swift new file mode 100644 index 0000000000..ce51138708 --- /dev/null +++ b/iphone/Maps/Tourism/Presentation/Extensions/UIViewExtensions.swift @@ -0,0 +1,20 @@ +extension UIView { + func showToast(message: String, duration: TimeInterval = 2.0) { + let toastLabel = UILabel(frame: CGRect(x: self.frame.size.width/2 - 75, y: self.frame.size.height-100, width: 150, height: 35)) + toastLabel.backgroundColor = UIColor.black.withAlphaComponent(0.6) + toastLabel.textColor = UIColor.white + toastLabel.textAlignment = .center + toastLabel.font = UIFont.systemFont(ofSize: 12.0) + toastLabel.text = message + toastLabel.alpha = 1.0 + toastLabel.layer.cornerRadius = 10 + toastLabel.clipsToBounds = true + self.addSubview(toastLabel) + + UIView.animate(withDuration: duration, delay: 0.1, options: .curveEaseOut, animations: { + toastLabel.alpha = 0.0 + }, completion: { (isCompleted) in + toastLabel.removeFromSuperview() + }) + } +} diff --git a/iphone/Maps/Tourism/Presentation/Home/TourismMainNavigationControllerViewController.swift b/iphone/Maps/Tourism/Presentation/Home/TourismMainNavigationControllerViewController.swift new file mode 100644 index 0000000000..16def19e6f --- /dev/null +++ b/iphone/Maps/Tourism/Presentation/Home/TourismMainNavigationControllerViewController.swift @@ -0,0 +1,9 @@ +import UIKit + +class TourismMainNavigationController: UINavigationController { + + override func viewDidLoad() { + super.viewDidLoad() + } + +} diff --git a/iphone/Maps/Tourism/Presentation/Utils/Alert.swift b/iphone/Maps/Tourism/Presentation/Utils/Alert.swift new file mode 100644 index 0000000000..6bfb935cd2 --- /dev/null +++ b/iphone/Maps/Tourism/Presentation/Utils/Alert.swift @@ -0,0 +1,3 @@ +import UIKit + + diff --git a/iphone/Maps/Tourism/Presentation/Utils/UIViewExtensions.swift b/iphone/Maps/Tourism/Presentation/Utils/UIViewExtensions.swift deleted file mode 100644 index b3d58add21..0000000000 --- a/iphone/Maps/Tourism/Presentation/Utils/UIViewExtensions.swift +++ /dev/null @@ -1,69 +0,0 @@ -extension UIView { - - func applyGradient(isVertical: Bool, colorArray: [UIColor]) { - layer.sublayers?.filter({ $0 is CAGradientLayer }).forEach({ $0.removeFromSuperlayer() }) - - let gradientLayer = CAGradientLayer() - gradientLayer.colors = colorArray.map({ $0.cgColor }) - if isVertical { - //top to bottom - gradientLayer.locations = [0.0, 1.0] - } else { - //left to right - gradientLayer.startPoint = CGPoint(x: 0.0, y: 0.5) - gradientLayer.endPoint = CGPoint(x: 1.0, y: 0.5) - } - - backgroundColor = .clear - gradientLayer.frame = bounds - layer.insertSublayer(gradientLayer, at: 0) - } - - -} - -func gradientColor(yourView:UIView, startColor: UIColor, endColor: UIColor, colorAngle: CGFloat){ - - let gradientLayer = CAGradientLayer() - gradientLayer.colors = [startColor.cgColor, endColor.cgColor] - gradientLayer.locations = [0.0, 1.0] - let (start, end) = gradientPointsForAngle(colorAngle) - gradientLayer.startPoint = start - gradientLayer.endPoint = end - gradientLayer.frame = yourView.bounds - - yourView.layer.insertSublayer(gradientLayer, at: 0) - yourView.layer.masksToBounds = true -} - -func gradientPointsForAngle(_ angle: CGFloat) -> (CGPoint, CGPoint) { - - let end = pointForAngle(angle) - let start = oppositePoint(end) - let p0 = transformToGradientSpace(start) - let p1 = transformToGradientSpace(end) - return (p0, p1) -} - -func pointForAngle(_ angle: CGFloat) -> CGPoint { - let radians = angle * .pi / 180.0 - var x = cos(radians) - var y = sin(radians) - - if (abs(x) > abs(y)) { - x = x > 0 ? 1 : -1 - y = x * tan(radians) - } else { - y = y > 0 ? 1 : -1 - x = y / tan(radians) - } - return CGPoint(x: x, y: y) -} - -func oppositePoint(_ point: CGPoint) -> CGPoint { - return CGPoint(x: -point.x, y: -point.y) -} - -private func transformToGradientSpace(_ point: CGPoint) -> CGPoint { - return CGPoint(x: (point.x + 1) * 0.5, y: 1.0 - (point.y + 1) * 0.5) -} diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-Black.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-Black.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-Black.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-Black.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-Bold.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-Bold.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-Bold.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-Bold.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-ExtraBold.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-ExtraBold.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-ExtraBold.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-ExtraBold.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-Heavy.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-Heavy.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-Heavy.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-Heavy.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-Light.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-Light.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-Light.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-Light.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-Medium.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-Medium.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-Medium.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-Medium.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-Regular.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-Regular.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-Regular.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-Regular.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-SemiBold.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-SemiBold.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-SemiBold.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-SemiBold.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-Thin.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-Thin.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-Thin.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-Thin.ttf diff --git a/iphone/Maps/Tourism/Fonts/Gilroy-UltraLight.ttf b/iphone/Maps/Tourism/Resources/Fonts/Gilroy-UltraLight.ttf similarity index 100% rename from iphone/Maps/Tourism/Fonts/Gilroy-UltraLight.ttf rename to iphone/Maps/Tourism/Resources/Fonts/Gilroy-UltraLight.ttf diff --git a/iphone/Maps/Tourism/Images.xcassets/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/Image.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/Image.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/Image.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/Image.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/add.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/add.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/add.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/add.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/add.imageset/add.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/add.imageset/add.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/add.imageset/add.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/add.imageset/add.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/back.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/back.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/back.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/back.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/back.imageset/back.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/back.imageset/back.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/back.imageset/back.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/back.imageset/back.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/categories.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/categories.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/categories.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/categories.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/categories.imageset/categories.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/categories.imageset/categories.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/categories.imageset/categories.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/categories.imageset/categories.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/categories_selected.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/categories_selected.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/categories_selected.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/categories_selected.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/categories_selected.imageset/categories_selected.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/categories_selected.imageset/categories_selected.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/categories_selected.imageset/categories_selected.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/categories_selected.imageset/categories_selected.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/check_circle_fill.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/check_circle_fill.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/check_circle_fill.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/check_circle_fill.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/check_circle_fill.imageset/check_circle_fill.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/check_circle_fill.imageset/check_circle_fill.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/check_circle_fill.imageset/check_circle_fill.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/check_circle_fill.imageset/check_circle_fill.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/chevron_down.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/chevron_down.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/chevron_down.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/chevron_down.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/chevron_down.imageset/chevron_down.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/chevron_down.imageset/chevron_down.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/chevron_down.imageset/chevron_down.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/chevron_down.imageset/chevron_down.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/close.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/close.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/close.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/close.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/close.imageset/close.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/close.imageset/close.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/close.imageset/close.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/close.imageset/close.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/eye.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/eye.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/eye.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/eye.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/eye.imageset/eye.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/eye.imageset/eye.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/eye.imageset/eye.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/eye.imageset/eye.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/eye_slash.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/eye_slash.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/eye_slash.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/eye_slash.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/eye_slash.imageset/eye-slash.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/eye_slash.imageset/eye-slash.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/eye_slash.imageset/eye-slash.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/eye_slash.imageset/eye-slash.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/globe.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/globe.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/globe.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/globe.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/globe.imageset/globe.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/globe.imageset/globe.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/globe.imageset/globe.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/globe.imageset/globe.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/heart.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/heart.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/heart.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/heart.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/heart.imageset/heart.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/heart.imageset/heart.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/heart.imageset/heart.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/heart.imageset/heart.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/heart_selected.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/heart_selected.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/heart_selected.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/heart_selected.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/heart_selected.imageset/heart_selected.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/heart_selected.imageset/heart_selected.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/heart_selected.imageset/heart_selected.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/heart_selected.imageset/heart_selected.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/home.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/home.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/home.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/home.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/home.imageset/home.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/home.imageset/home.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/home.imageset/home.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/home.imageset/home.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/home_selected.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/home_selected.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/home_selected.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/home_selected.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/home_selected.imageset/home_selected.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/home_selected.imageset/home_selected.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/home_selected.imageset/home_selected.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/home_selected.imageset/home_selected.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/image_down.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/image_down.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/image_down.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/image_down.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/image_down.imageset/image_down.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/image_down.imageset/image_down.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/image_down.imageset/image_down.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/image_down.imageset/image_down.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/map.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/map.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/map.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/map.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/map.imageset/map.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/map.imageset/map.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/map.imageset/map.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/map.imageset/map.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/profile.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/profile.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/profile.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/profile.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/profile.imageset/profile.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/profile.imageset/profile.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/profile.imageset/profile.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/profile.imageset/profile.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/profile_selected.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/profile_selected.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/profile_selected.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/profile_selected.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/profile_selected.imageset/profile_selected.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/profile_selected.imageset/profile_selected.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/profile_selected.imageset/profile_selected.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/profile_selected.imageset/profile_selected.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/search.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/search.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/search.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/search.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/search.imageset/search.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/search.imageset/search.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/search.imageset/search.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/search.imageset/search.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/sign_out.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/sign_out.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/sign_out.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/sign_out.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/sign_out.imageset/sign_out.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/sign_out.imageset/sign_out.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/sign_out.imageset/sign_out.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/sign_out.imageset/sign_out.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/splash_background.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/splash_background.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/splash_background.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/splash_background.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/splash_background.imageset/splash_background.png b/iphone/Maps/Tourism/Resources/Images.xcassets/splash_background.imageset/splash_background.png similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/splash_background.imageset/splash_background.png rename to iphone/Maps/Tourism/Resources/Images.xcassets/splash_background.imageset/splash_background.png diff --git a/iphone/Maps/Tourism/Images.xcassets/star.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/star.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/star.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/star.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/star.imageset/star.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/star.imageset/star.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/star.imageset/star.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/star.imageset/star.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/star_border.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/star_border.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/star_border.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/star_border.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/star_border.imageset/star_border.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/star_border.imageset/star_border.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/star_border.imageset/star_border.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/star_border.imageset/star_border.svg diff --git a/iphone/Maps/Tourism/Images.xcassets/unchecked.imageset/Contents.json b/iphone/Maps/Tourism/Resources/Images.xcassets/unchecked.imageset/Contents.json similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/unchecked.imageset/Contents.json rename to iphone/Maps/Tourism/Resources/Images.xcassets/unchecked.imageset/Contents.json diff --git a/iphone/Maps/Tourism/Images.xcassets/unchecked.imageset/unchecked.svg b/iphone/Maps/Tourism/Resources/Images.xcassets/unchecked.imageset/unchecked.svg similarity index 100% rename from iphone/Maps/Tourism/Images.xcassets/unchecked.imageset/unchecked.svg rename to iphone/Maps/Tourism/Resources/Images.xcassets/unchecked.imageset/unchecked.svg