본문 바로가기

프로젝트 만들어보기16

[FirebaseAuth] 회원가입에러 코드 (Swift) if let maybeError = error{ let err = maybeError as NSError switch err.code{ case AuthErrorCode.invalidEmail.rawValue: self.errorLabel.text = "이메일 형식이 잘못되었습니다." case AuthErrorCode.emailAlreadyInUse.rawValue: self.errorLabel.text = "이미 사용중인 이메일입니다." case AuthErrorCode.weakPassword.rawValue: self.errorLabel.text = "암호는 6글자 이상이어야 합니다" default: print("unknow error:\(err.localizedDescription)") } } 2023. 2. 18.
[iOS] Remote Notification (Firebase Cloud Messaging) Remote Notification (원격 알림, 서버 설정) - 서버로부터 push를 앱에 띄우는 것 - 알림을 생성하고 사용자 장치에 푸시알림을 보내고 싶을때 (why? 중요한 정보를 제공하기 위해 ) - 앱이 실행중이 아닌 경우에도 앱을 사용하는 기기에 소량의 데이터를 푸시함 👉 localNotification(앱으로 부터 push를 앱에 띄우는)은 https://01pkd95.tistory.com/290 필요 요소 - Provider : 공급자 서버 (Firebase Cloud Messaging으로 대체) - APNs(Apple Push Notification Service): 애플 푸시 알림 서비스 - 사용자의 기기 - 사용자의 기기에서 실행중인 앱 순서) 1. 원격알림을 보낼수 있는 서버에서 .. 2022. 12. 1.
[iOS] 약 먹기 알람어플 (Swift) 💡배운점 - push 알림을 통해 사용자에게 중요한 정보를 전달할 수 있음(앱 사용량, 특정 행동 유도) - UserNotifications를 이용하여 서버 없이 알림 세부정보를 로컬로 구성해봄 👾 라이브러리/ 프레임워크 UserNotifications NotificationCenter UserNotification 을 이용해 Push 알림 보내는 법 1. 알림 보낼꺼라는 권한 요청 - Option에 UNAuthorizationOptions(alert, badge, sound) 를 넣어 줌 - completionHandler에는 유저가 허락했을 경우와 안했을 경우로 나뉨 - notification을 보내기 전에 어떤 핸들링을 할 것이지 설정 2 . Content 지정 (알림 내용) - title - 제목.. 2022. 11. 23.
[iOS] 실시간 공지 팝업 만들기 (Swift) 💡배운점 Friebase Remote Config를 이용하여 복잡한 인프라를 설정하거나 새 버전을 출시하지 않고도 동적으로 기능을 켜거나 끄고, 세그먼트를 맞춤 설정하여 앱 동작과 모양을 변경할 수 있었음 Firebase A/B Testing을 이용하여 변경사항들을 미리 테스트하여 분석할 수 있었습니다. 👾 라이브러리 'Firebase Remote Config' 'Firebase A/B Testing https://firebase.google.com/products/remote-config?gclid=CjwKCAiA68ebBhB-EiwALVC-NnEtAacIMWZvv8ByqrKAuaEVJCpsORt9BzM2N1ne0EI6Y9GzkwzgLhoCEtEQAvD_BwE&gclsrc=aw.ds Firebase 원.. 2022. 11. 14.