본문 바로가기

푸쉬5

Swift 로컬에서 Notification(알림) 구현하기. import UserNotifications 우선 이렇게 임포트 하나 해주시구요. let userNotificationCenter = UNUserNotificationCenter.current() 클래스 딴 전역으로 하나 선언해줍니다. func callNotification(seconds: Double, title : String, body : String) { let notificationContent = UNMutableNotificationContent() notificationContent.title = title notificationContent.body = body let trigger = UNTimeIntervalNotificationTrigger(timeInterval: seconds, .. 2021. 12. 6.
IOS 14 버전 업데이트 이후 FCM푸시가 오지않는 현상 Build Settings 에서 Product Name이 한글이라면 영어로 변경해주시면 해결이 됩니다. 근데 이부분을 영어로 바꾸시게되면 앱 설치시 이름도 영문으로 표기되는데 그부분은 General에서 Display Name를 한글로 변경해주시면 됩니다. 2020. 11. 30.
IOS "Notification Service" 생성하기. 위 사진처럼 File - New - Target - Notification Content Extension 해주시면 간단하게 생성 완료됩니다..! 2020. 7. 21.
안드로이드 8.0이상의 버전 Notification 및 버전별 처리 기존 푸시알람과는 달리 안드로이드 8.0이상부터는 채널이란 개념이 추가됩니다. 채널이란건 한번 그 채널로 푸시를 띄웠다면 앱을 지우지 않는 이상 그 채널이 삭제되진 않습니다. private void Success_Notification(String messageBody, String messageTitle) { int notifyID = 2; if(android.os.Build.VERSION.SDK_INT > 25) { //푸쉬알림음설정// AudioAttributes audioAttributes = new AudioAttributes.Builder() .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) .setUsage(AudioAttributes... 2020. 3. 24.