Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
coby5502 committed Feb 11, 2024
2 parents 4182819 + 06ee315 commit 7ac278d
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 36 deletions.
24 changes: 12 additions & 12 deletions FoodBowl.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2134,16 +2134,16 @@
BASE_URL = "https://justdoeat.shop";
CODE_SIGN_ENTITLEMENTS = FoodBowl/FoodBowl.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_TEAM = 3Y8YH8GWMM;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = FoodBowl/App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "풋볼";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink";
INFOPLIST_KEY_NSCameraUsageDescription = "Camera permissions for taking photos";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "Application wants to use your location";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Application wants to use your location";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Album permissions to save photos";
INFOPLIST_KEY_NSCameraUsageDescription = "음식 사진을 찍기 위해, 권한이 필요합니다.";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "맛집 겸색을 위해, 사용자의 위치가 필요합니다.";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "맛집 겸색을 위해, 사용자의 위치가 필요합니다.";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "맛집 사진을 올리기 위해, 권한이 필요합니다.";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = "";
Expand All @@ -2156,7 +2156,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
MARKETING_VERSION = 1.0.1;
NONCE = wH_pSu5wSUHzoFPBUE9Q9ZRs3fcKzGSn;
PRODUCT_BUNDLE_IDENTIFIER = com.coby.FoodBowl;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2177,16 +2177,16 @@
BASE_URL = "https://justdoeat.shop";
CODE_SIGN_ENTITLEMENTS = FoodBowl/FoodBowl.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_TEAM = 3Y8YH8GWMM;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = FoodBowl/App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "풋볼";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.food-and-drink";
INFOPLIST_KEY_NSCameraUsageDescription = "Camera permissions for taking photos";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "Application wants to use your location";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Application wants to use your location";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Album permissions to save photos";
INFOPLIST_KEY_NSCameraUsageDescription = "음식 사진을 찍기 위해, 권한이 필요합니다.";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "맛집 겸색을 위해, 사용자의 위치가 필요합니다.";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "맛집 겸색을 위해, 사용자의 위치가 필요합니다.";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "맛집 사진을 올리기 위해, 권한이 필요합니다.";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = "";
Expand All @@ -2199,7 +2199,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
MARKETING_VERSION = 1.0.1;
NONCE = wH_pSu5wSUHzoFPBUE9Q9ZRs3fcKzGSn;
PRODUCT_BUNDLE_IDENTIFIER = com.coby.FoodBowl;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,7 @@ extension MapViewController: MKMapViewDelegate {

func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) {
let center = mapView.centerCoordinate
let koreaLatRange = 33.0...38.0
let koreaLonRange = 125.0...131.0

if !koreaLatRange.contains(center.latitude) || !koreaLonRange.contains(center.longitude) {
let correctedLatitude = min(max(center.latitude, koreaLatRange.lowerBound), koreaLatRange.upperBound)
let correctedLongitude = min(max(center.longitude, koreaLonRange.lowerBound), koreaLonRange.upperBound)
let correctedCenter = CLLocationCoordinate2D(latitude: correctedLatitude, longitude: correctedLongitude)
self.mapView.setCenter(correctedCenter, animated: true)
} else if let currentLocation = LocationManager.shared.manager.location?.coordinate {
if let currentLocation = LocationManager.shared.manager.location?.coordinate {
let visibleMapRect = mapView.visibleMapRect
let topLeftCoordinate = MKMapPoint(x: visibleMapRect.minX, y: visibleMapRect.minY).coordinate
let customLocation = CustomLocationRequestDTO(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ final class CreateReviewViewModel: NSObject, BaseViewModelType {
.store(in: &self.cancellable)

input.completeButtonDidTap
.throttle(for: .milliseconds(1000), scheduler: RunLoop.main, latest: false)
.sink(receiveValue: { [weak self] comment, images in
self?.createReview(comment: comment, images: images)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ final class UpdateProfileViewModel: NSObject, BaseViewModelType {
.store(in: &self.cancellable)

input.completeButtonDidTap
.throttle(for: .milliseconds(1000), scheduler: RunLoop.main, latest: false)
.sink(receiveValue: { [weak self] nickname, introduction in
guard let self = self else { return }
self.updateMemberProfile(nickname: nickname, introduction: introduction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,17 @@ final class SplashViewController: UIViewController {

output.isLogin
.receive(on: DispatchQueue.main)
.sink(receiveValue: { [weak self] isLogin in
switch isLogin {
case true:
self?.presentTapBarController()
case false:
self?.presentSignViewController()
.sink(receiveValue: { [weak self] result in
switch result {
case .success(let isLogin):
switch isLogin {
case true:
self?.presentTapBarController()
case false:
self?.presentSignViewController()
}
case .failure:
self?.makeAlert(title: "인터넷 연결을 확인해주세요.")
}
})
.store(in: &self.cancellable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ final class SplashViewModel: NSObject, BaseViewModelType {
private let usecase: SplashUsecase
private var cancellable: Set<AnyCancellable> = Set()

private let isLoginSubject: PassthroughSubject<Bool, Never> = PassthroughSubject()
private let isLoginSubject: PassthroughSubject<Result<Bool, Error>, Never> = PassthroughSubject()

struct Input {
let viewDidLoad: AnyPublisher<Void, Never>
}

struct Output {
let isLogin: AnyPublisher<Bool, Never>
let isLogin: AnyPublisher<Result<Bool, Error>, Never>
}

func transform(from input: Input) -> Output {
Expand Down Expand Up @@ -64,18 +64,15 @@ final class SplashViewModel: NSObject, BaseViewModelType {
let expiryDate = Date().addingTimeInterval(1800)
UserDefaultHandler.setTokenExpiryDate(tokenExpiryDate: expiryDate)

self.isLoginSubject.send(true)
self.isLoginSubject.send(.success(true))
} else {
KeychainManager.clear()
UserDefaultHandler.clearAllData()

self.isLoginSubject.send(false)
self.isLoginSubject.send(.success(false))
}
} catch {
KeychainManager.clear()
UserDefaultHandler.clearAllData()

self.isLoginSubject.send(false)
} catch(let error) {
self.isLoginSubject.send(.failure(error))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ final class UpdateReviewViewModel: BaseViewModelType {
.store(in: &self.cancellable)

input.completeButtonDidTap
.throttle(for: .milliseconds(1000), scheduler: RunLoop.main, latest: false)
.sink(receiveValue: { [weak self] comment in
self?.updateReview(comment: comment)
})
Expand Down

0 comments on commit 7ac278d

Please sign in to comment.