Skip to content

Commit

Permalink
Merge pull request #71 from AVIRO-official/Feature/AnnouncementPopup
Browse files Browse the repository at this point in the history
(24.08.21 - 24.08.28) [Feat]: 공지 팝업 업데이트
  • Loading branch information
Jeon0976 authored Aug 28, 2024
2 parents a50dbbb + f34ed50 commit 192f6dc
Show file tree
Hide file tree
Showing 70 changed files with 307 additions and 82 deletions.
42 changes: 23 additions & 19 deletions AVIRO.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
C52FA3472A175B20005E70DC /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52FA3462A175B20005E70DC /* HomeViewController.swift */; };
C52FA34C2A175B20005E70DC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C52FA34B2A175B20005E70DC /* Assets.xcassets */; };
C52FA34F2A175B20005E70DC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C52FA34D2A175B20005E70DC /* LaunchScreen.storyboard */; };
C533122A2C7CA2C70026703B /* WelcomePopups.swift in Sources */ = {isa = PBXBuildFile; fileRef = C53312292C7CA2C70026703B /* WelcomePopups.swift */; };
C534B14E2C2EABE900C62FDA /* LoginInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = C534B14D2C2EABE900C62FDA /* LoginInfo.swift */; };
C534B1522C32662A00C62FDA /* LoginButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C534B1512C32662A00C62FDA /* LoginButton.swift */; };
C5351B4D2A19223300116D50 /* KakaoMapRequestAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5351B4C2A19223300116D50 /* KakaoMapRequestAPI.swift */; };
Expand Down Expand Up @@ -142,7 +143,7 @@
C562B6DF2B387AE200CE5D4C /* ChallengeInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C562B6DE2B387AE200CE5D4C /* ChallengeInfoViewController.swift */; };
C562B6E22B387B8700CE5D4C /* ChallengeInfoPresentationAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C562B6E12B387B8700CE5D4C /* ChallengeInfoPresentationAnimator.swift */; };
C562B6E42B387CA200CE5D4C /* ChallengeInfoPresentaionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C562B6E32B387CA200CE5D4C /* ChallengeInfoPresentaionDelegate.swift */; };
C564DAB32BA57240002174B4 /* AVIROWellcome+DTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = C564DAB22BA57240002174B4 /* AVIROWellcome+DTO.swift */; };
C564DAB32BA57240002174B4 /* AVIROWelcome+DTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = C564DAB22BA57240002174B4 /* AVIROWelcome+DTO.swift */; };
C566EF622C398EC6009E58DD /* AuthAPIEndpoints.swift in Sources */ = {isa = PBXBuildFile; fileRef = C566EF612C398EC6009E58DD /* AuthAPIEndpoints.swift */; };
C566EF652C39931B009E58DD /* RepositoryTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = C566EF642C39931B009E58DD /* RepositoryTask.swift */; };
C566EF672C399333009E58DD /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C566EF662C399333009E58DD /* Cancellable.swift */; };
Expand Down Expand Up @@ -437,6 +438,7 @@
C52FA3462A175B20005E70DC /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; };
C52FA34B2A175B20005E70DC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
C52FA3502A175B20005E70DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C53312292C7CA2C70026703B /* WelcomePopups.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomePopups.swift; sourceTree = "<group>"; };
C534B14D2C2EABE900C62FDA /* LoginInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginInfo.swift; sourceTree = "<group>"; };
C534B1512C32662A00C62FDA /* LoginButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginButton.swift; sourceTree = "<group>"; };
C5351B4A2A1919F700116D50 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = "<group>"; };
Expand Down Expand Up @@ -487,7 +489,7 @@
C562B6DE2B387AE200CE5D4C /* ChallengeInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChallengeInfoViewController.swift; sourceTree = "<group>"; };
C562B6E12B387B8700CE5D4C /* ChallengeInfoPresentationAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChallengeInfoPresentationAnimator.swift; sourceTree = "<group>"; };
C562B6E32B387CA200CE5D4C /* ChallengeInfoPresentaionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChallengeInfoPresentaionDelegate.swift; sourceTree = "<group>"; };
C564DAB22BA57240002174B4 /* AVIROWellcome+DTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AVIROWellcome+DTO.swift"; sourceTree = "<group>"; };
C564DAB22BA57240002174B4 /* AVIROWelcome+DTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AVIROWelcome+DTO.swift"; sourceTree = "<group>"; };
C566EF612C398EC6009E58DD /* AuthAPIEndpoints.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthAPIEndpoints.swift; sourceTree = "<group>"; };
C566EF642C39931B009E58DD /* RepositoryTask.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepositoryTask.swift; sourceTree = "<group>"; };
C566EF662C399333009E58DD /* Cancellable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cancellable.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -760,9 +762,10 @@
path = Manager;
sourceTree = "<group>";
};
C50367F32A1795BE0020C6BB /* Model */ = {
C50367F32A1795BE0020C6BB /* Model_Domain */ = {
isa = PBXGroup;
children = (
C53312282C7CA2B40026703B /* WelcomeModel */,
C51000292AB5B90200F65C1F /* UserModel */,
C5EB51022A20927400B29CC1 /* HomeViewModel */,
C5732C7A2A41D3F800CDC499 /* EnrollViewModel */,
Expand All @@ -772,7 +775,7 @@
C51B09B62A82046000916BBD /* LocalDataModel */,
C5351B652A1A128D00116D50 /* SingletonModel */,
);
path = Model;
path = Model_Domain;
sourceTree = "<group>";
};
C50367F62A179D6E0020C6BB /* Custom */ = {
Expand Down Expand Up @@ -986,13 +989,6 @@
path = HeaderView;
sourceTree = "<group>";
};
C520663D2A80C60D0038ECCD /* ViewLogic */ = {
isa = PBXGroup;
children = (
);
path = ViewLogic;
sourceTree = "<group>";
};
C520663E2A80C6220038ECCD /* CoordinateSingleton */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1047,7 +1043,7 @@
C593B64C2A4BFD9A00D224CE /* AVIRO.entitlements */,
C50367EC2A1791620020C6BB /* App */,
C50367F62A179D6E0020C6BB /* Custom */,
C50367F32A1795BE0020C6BB /* Model */,
C50367F32A1795BE0020C6BB /* Model_Domain */,
C50367F22A1795B90020C6BB /* Manager */,
C50367ED2A1791840020C6BB /* Scene */,
C5BA9DFE2BED1C64004FA06E /* Data */,
Expand All @@ -1059,6 +1055,14 @@
path = AVIRO;
sourceTree = "<group>";
};
C53312282C7CA2B40026703B /* WelcomeModel */ = {
isa = PBXGroup;
children = (
C53312292C7CA2C70026703B /* WelcomePopups.swift */,
);
path = WelcomeModel;
sourceTree = "<group>";
};
C534B14C2C2EABD300C62FDA /* User */ = {
isa = PBXGroup;
children = (
Expand All @@ -1080,7 +1084,6 @@
C5351B652A1A128D00116D50 /* SingletonModel */ = {
isa = PBXGroup;
children = (
C520663D2A80C60D0038ECCD /* ViewLogic */,
C5166E4B2A945214003495AA /* MyData */,
C520663E2A80C6220038ECCD /* CoordinateSingleton */,
C520663F2A80C6450038ECCD /* APISingleton */,
Expand Down Expand Up @@ -1536,7 +1539,7 @@
C564DAB12BA571A7002174B4 /* ETC */ = {
isa = PBXGroup;
children = (
C564DAB22BA57240002174B4 /* AVIROWellcome+DTO.swift */,
C564DAB22BA57240002174B4 /* AVIROWelcome+DTO.swift */,
);
path = ETC;
sourceTree = "<group>";
Expand Down Expand Up @@ -3061,14 +3064,15 @@
C5A201C72A98A6D200A54381 /* EditOperatingHoursView.swift in Sources */,
C5BA9DF62BECCD58004FA06E /* DataTransferError.swift in Sources */,
C5C290772A85E4FF00ED5DCE /* PlaceHomeView.swift in Sources */,
C564DAB32BA57240002174B4 /* AVIROWellcome+DTO.swift in Sources */,
C564DAB32BA57240002174B4 /* AVIROWelcome+DTO.swift in Sources */,
C5D93D9F2A581EC800629C39 /* FirstRegistrationViewController.swift in Sources */,
C528E4C02A5FF1CB002BD72E /* FinalRegistrationViewController.swift in Sources */,
C5FBDA5C2B398264007AC77E /* ChallengeInfoYellowView.swift in Sources */,
C5DCBC8F2B91CF46003502BA /* AVIROMyBookmarkList+DTO.swift in Sources */,
C5A1691D2C4D5DD60028BCC0 /* CommonError.swift in Sources */,
C5D93DA32A58718300629C39 /* NextPageButton.swift in Sources */,
C5ED99602C088FAA0077B2F9 /* UserInfoRepositoryInterface.swift in Sources */,
C533122A2C7CA2C70026703B /* WelcomePopups.swift in Sources */,
C5BA9E0E2BED1D75004FA06E /* AVIROViewModel.swift in Sources */,
C50DB7512A9B83550078B501 /* ChangeableAddressViewController.swift in Sources */,
C5ED99762C0892170077B2F9 /* StoreManagementRepositoryInterface.swift in Sources */,
Expand Down Expand Up @@ -3435,7 +3439,7 @@
CODE_SIGN_ENTITLEMENTS = AVIRO/AVIRO.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = C4K2HXA435;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = AVIRO/App/Info.plist;
Expand All @@ -3454,7 +3458,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.4.0;
PRODUCT_BUNDLE_IDENTIFIER = SeonghunJeon.VeganRestaurant;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -3473,7 +3477,7 @@
CODE_SIGN_ENTITLEMENTS = AVIRO/AVIRO.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = C4K2HXA435;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = AVIRO/App/Info.plist;
Expand All @@ -3492,7 +3496,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.4.0;
PRODUCT_BUNDLE_IDENTIFIER = SeonghunJeon.VeganRestaurant;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 2 additions & 2 deletions AVIRO/App/AppController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ final class AppController {
self.window = window
window.backgroundColor = .gray7

// setTutorialView()
// setTabBarView()
checkLoginType()
}
Expand Down Expand Up @@ -133,13 +134,12 @@ final class AppController {
keychain.delete(KeychainKey.refreshToken.rawValue)

guard let userID = keychain.get(KeychainKey.userID.rawValue) else {
print("ADAWDAW")
setLoginView()
return
}

let userCheck = AVIROKakaoUserCheckMemberDTO(userId: userID)
print("TSET")

AVIROAPI.manager.checkKakaoUserWhenLogin(with: userCheck) { [weak self] result in
DispatchQueue.main.async {
switch result {
Expand Down
49 changes: 47 additions & 2 deletions AVIRO/Custom/Utility/AmplitudeUtility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,29 @@ import AmplitudeSwift

// MARK: Amplitude
enum AMType: String {
// Remove
case signUp = "user_sign up"
// Remove
case withdrawal = "user_withdrawal"
// Remove
case userLogin = "user_login"
// Remove
case userLogout = "user_logout"

//t
// Move
case placeUpload = "place_upload"
// Move
case reviewUpload = "review_upload"

// Move
case placeEdit = "place_edit"
// Remove
case placeSearch = "place_serach"
// Remove
case placePresent = "place_present"
// Move
case menuEdit = "menu_edit"

// Move everything
case challPresent = "chall_present"
case placeListPresent = "placeList_present"
case reviewListPresent = "reviewList_present"
Expand All @@ -36,6 +46,41 @@ enum AMType: String {
case wellcomeClose = "wellcome_close"
}

enum AMPUserType: String {
case signUpClick = "signup_click"
case signupComplete = "signup_complete"
case loginComplete = "login_complete"
case logoutComplete = "logout_comlete"
case withdrawalComplete = "withdrawal_Complete"
}

enum AMPBrowseType: String {
case searchEnterTerm = "search_enter_term"
case searchClickResult = "search_click_result"
case bookmarkClickInPlace = "bookmark_click_in_place"
case bookmarkClickInMap = "bookmark_click_in_map"
case bookmarkClickList = "bookmark_click_list"
case placeViewSheet = "place_view_sheet"
case placeViewhalf = "place_view_half"
case placeViewMenu = "place_view_menu"
case placeViewReview = "place_view_review"
}

enum AMPEngage: String {
case reviewViewUpload = "review_view_upload"
case reviewCompleteUpload = "review_complete_upload"
case placeViewUpload = "place_view_upload"
case placeCompleteUpload = "place_complete_upload"
case challengeClickCheckingLevelUp = "challenge_click_checking_levelup"
case challengeView = "challenge_view"
case placeClickEditPlace = "place_click_edit_place"
case placeCompleteEditPlace = "place_complete_edit_place"
case placeClickEditMenu = "place_click_edit_menu"
case placeCompleteEditMenu = "place_complete_edit_menu"
case placeClickRemove = "place_click_remove"
case placeCompleteRemove = "place_complete_remove"
}

protocol AmplitudeProtocol {
func signUp(with userId: String)
func withdrawal()
Expand Down
6 changes: 3 additions & 3 deletions AVIRO/Manager/APIManager/AVIROManager/AVIROAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,10 @@ final class AVIROAPI: AVIROAPIMangerProtocol {
*/

// MARK: Get wellcomeImagesURL
func loadWellcomeImagesURL(
completionHandler: @escaping (Result<AVIROWellcomeDTO, APIError>) -> Void
func loadWelcomePopups(
completionHandler: @escaping (Result<AVIROWelcomeDTO, APIError>) -> Void
) {
guard let url = requestAPI.getWellcomImagesURL().url else {
guard let url = requestAPI.getWelcomeImagesURL().url else {
completionHandler(.failure(.urlError))
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

protocol AVIROAPIMangerProtocol: APIManagerProtocol {
// MARK: - Marker Refer
// MARK: - Marker / Map Refer
/*
- GET places
- POST place
Expand Down Expand Up @@ -272,4 +272,9 @@ protocol AVIROAPIMangerProtocol: APIManagerProtocol {
with nickname: AVIRONicknameChagneableDTO,
completionHandler: @escaping (Result<AVIROResultDTO, APIError>) -> Void
)

// MARK: Popup
func loadWelcomePopups(
completionHandler: @escaping (Result<AVIROWelcomeDTO, APIError>) -> Void
)
}
6 changes: 3 additions & 3 deletions AVIRO/Manager/APIManager/AVIROManager/AVIRORequestAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct AVIRORequestAPI {
static let myCommentListPath = "/2/mypage/comment"
static let myBookmarkListPath = "/2/mypage/bookmark"

static let wellcomeImagesPath = "/2/map/load/popup"
static let welcomeImagesPath = "/3/map/load/popup"

static let kakaoUserCheckPath = "/3/member/kakao"

Expand Down Expand Up @@ -304,8 +304,8 @@ struct AVIRORequestAPI {
}

// MARK: GET WellcomeImages URL
mutating func getWellcomImagesURL() -> URLComponents {
return createURLComponents(path: AVIRORequestAPI.wellcomeImagesPath)
mutating func getWelcomeImagesURL() -> URLComponents {
return createURLComponents(path: AVIRORequestAPI.welcomeImagesPath)
}

// MARK: Kakao user check
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// AVIROWelcome+DTO.swift
// AVIRO
//
// Created by 전성훈 on 2024/03/16.
//

import Foundation

struct AVIROWelcomeDTO: Decodable {
let statusCode: Int
let data: [AVIROWelcomeDataDTO]?
let message: String?
}

struct AVIROWelcomeDataDTO: Decodable {
let title: String
let imageURL: String
let url: String?
let event: String?
let buttonColor: String
let order: Int

enum CodingKeys: String, CodingKey {
case title
case imageURL = "image_url"
case url
case event
case buttonColor = "button_color"
case order
}

func toDomain() -> WelcomePopup {
let imageURL = URL(string: imageURL)!

let url = self.url.flatMap { URL(string: $0) }

let event: WelcomePopupEvent? = {
guard let eventString = self.event else { return nil }

switch eventString {
case "MTCH":
return .MTCH
default:
return nil
}
}()

return WelcomePopup(
title: title,
imageURL: imageURL,
url: url,
event: event,
buttonColor: buttonColor
)
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 192f6dc

Please sign in to comment.