Skip to content

Commit

Permalink
[Fix] Health-Food-Me#205 - 위치 정보 권한 멘트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
L-j-h-c committed Jul 22, 2022
1 parent 0ae6409 commit 24de456
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
8 changes: 4 additions & 4 deletions HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2491,8 +2491,8 @@
INFOPLIST_FILE = HealthFoodMe/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "헬푸미";
INFOPLIST_KEY_NSCameraUsageDescription = "리뷰 사진 촬영을 위해 시스템 카메라에 접근합니다";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "사용자의 위치를 받습니다";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "사용자의 위치를 받습니다";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "현재위치를 가져와 내 주변에 식당, 지도에 현재위치를 표시합니다.";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "현재위치를 가져와 내 주변에 식당, 지도에 현재위치를 표시합니다.";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "리뷰를 작성하기 위해 사용자의 갤러리에 접근합니다";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
Expand Down Expand Up @@ -2529,8 +2529,8 @@
INFOPLIST_FILE = HealthFoodMe/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "헬푸미";
INFOPLIST_KEY_NSCameraUsageDescription = "리뷰 사진 촬영을 위해 시스템 카메라에 접근합니다";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "사용자의 위치를 받습니다";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "사용자의 위치를 받습니다";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "현재위치를 가져와 내 주변에 식당, 지도에 현재위치를 표시합니다.";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "현재위치를 가져와 내 주변에 식당, 지도에 현재위치를 표시합니다.";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "리뷰를 작성하기 위해 사용자의 갤러리에 접근합니다";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
Expand Down
19 changes: 6 additions & 13 deletions HealthFoodMe/HealthFoodMe/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>현재위치를 가져와 내 주변에 식당, 지도에 현재위치를 표시합니다.</string>
<key>NSLocationUsageDescription</key>
<string>현재위치를 가져와 내 주변에 식당, 지도에 현재위치를 표시합니다.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>사용자의 위치를 받습니다</string>
<string>현재위치를 가져와 내 주변에 식당, 지도에 현재위치를 표시합니다.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>사용자의 위치를 받습니다</string>
<string>현재위치를 가져와 내 주변에 식당, 지도에 현재위치를 표시합니다.</string>
<key>CFBundleIdentifier</key>
<string></string>
<key>UIUserInterfaceStyle</key>
Expand Down Expand Up @@ -48,17 +52,6 @@
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UIAppFonts</key>
<array>
<string>Pretendard-Bold.otf</string>
<string>Pretendard-Regular.otf</string>
<string>Pretendard-Medium.otf</string>
<string>NotoSansCJKkr-Bold.otf</string>
<string>NotoSansCJKkr-Medium.otf</string>
<string>NotoSansCJKkr-Regular.otf</string>
<string>GodoB.otf</string>
<string>GodoB.ttf</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import SnapKit
class MainMapVC: UIViewController, NMFLocationManagerDelegate {

// MARK: - Properties
private lazy var clLocationManager: CLLocationManager = {
let manager = CLLocationManager()
manager.desiredAccuracy = kCLLocationAccuracyBest
manager.delegate = self
return manager
}()
private var initialMapOpened: Bool = false
private let disposeBag = DisposeBag()
private var isInitialPoint = false
Expand Down Expand Up @@ -139,6 +145,15 @@ class MainMapVC: UIViewController, NMFLocationManagerDelegate {
if let position = NMGPosition {
self.mapView.moveCameraPositionWithZoom(position, 200)
}
} else {
switch self.clLocationManager.authorizationStatus {
case .denied:
self.clLocationManager.requestWhenInUseAuthorization()
case .notDetermined, .restricted:
self.clLocationManager.requestWhenInUseAuthorization()
default:
break
}
}
}), for: .touchUpInside)
bt.backgroundColor = .helfmeWhite
Expand Down

0 comments on commit 24de456

Please sign in to comment.