[Fix] iOS 알림·위치 설정 및 마이페이지 주소 연동 - #27
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 풀 리퀘스트는 iOS 환경에서의 사용자 경험을 개선하고 특정 기능의 안정성을 높이는 데 중점을 둡니다. iOS 알림 및 위치 권한 처리의 고질적인 문제를 해결하여 앱의 핵심 기능이 원활하게 작동하도록 보장하며, 사용자 인터페이스의 동작 방식을 조정하여 탭 전환 시 화면 상태가 일관되게 초기화되도록 합니다. 또한, 마이페이지에서 사용자 주소 정보가 더 견고하게 표시되도록 데이터 로딩 로직을 개선했습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
| if (permission == LocationPermission.deniedForever) { | ||
| debugPrint('[MapViewModel] 위치 권한 영구 거부'); | ||
| currentLocation = const LatLng(37.5665, 126.9780); | ||
| isLoading = false; | ||
| notifyListeners(); | ||
| _startLocationStream(); | ||
| return; | ||
| } |
There was a problem hiding this comment.
위치 권한이 영구적으로 거부된(LocationPermission.deniedForever) 상태에서 _startLocationStream()을 호출하면 Geolocator.getPositionStream에서 처리되지 않은 PermissionDeniedException이 발생하여 앱이 비정상적으로 종료될 수 있습니다. 권한이 없는 경우에는 위치 스트림을 시작하지 않도록 해당 호출을 제거하는 것을 제안합니다.
if (permission == LocationPermission.deniedForever) {
debugPrint('[MapViewModel] 위치 권한 영구 거부');
currentLocation = const LatLng(37.5665, 126.9780);
isLoading = false;
notifyListeners();
return;
}| override func userNotificationCenter( | ||
| _ center: UNUserNotificationCenter, | ||
| willPresent notification: UNNotification, | ||
| withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void | ||
| ) { | ||
| completionHandler([.banner, .sound, .badge]) | ||
| } |
There was a problem hiding this comment.
override 키워드는 슈퍼클래스의 메서드를 재정의할 때 사용합니다. userNotificationCenter 메서드는 UNUserNotificationCenterDelegate 프로토콜에 정의된 메서드이며, FlutterAppDelegate는 이 메서드를 기본적으로 구현하고 있지 않습니다. 따라서 override 키워드는 불필요하며, 릴리즈 빌드 시 컴파일 오류를 유발할 수 있습니다. override를 제거하는 것을 제안합니다.
또한, AppDelegate가 UNUserNotificationCenterDelegate 프로토콜을 준수하도록 클래스 선언부에 명시하는 것이 좋습니다. (예: class AppDelegate: FlutterAppDelegate, ..., UNUserNotificationCenterDelegate)
| override func userNotificationCenter( | |
| _ center: UNUserNotificationCenter, | |
| willPresent notification: UNNotification, | |
| withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void | |
| ) { | |
| completionHandler([.banner, .sound, .badge]) | |
| } | |
| func userNotificationCenter( | |
| _ center: UNUserNotificationCenter, | |
| willPresent notification: UNNotification, | |
| withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void | |
| ) { | |
| completionHandler([.banner, .sound, .badge]) | |
| } |
885c7c4 to
e6c9cf8
Compare
Issue
Description
iOS 포그라운드 알림 수신
Test plan
Screenshot
💬 리뷰 요구사항(선택)