전체 글208 Swift 푸시(FCM) 알림 클릭 시 원하는 웹뷰 페이지로 이동하기 AppDelegate에서 extension AppDelegate : UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter,didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { } } 해당 함수를 사용이 가능 합니다. 해당 함수는 푸시를 클릭 했을 시 호출됩니다. 그리고 이제 웹서버에서 보내준 데이터를 받아야 하는데요. let userInfo = response.notification.request.content.userInfo var link .. 2021. 12. 8. 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. 안드로이드 12 PendingIntent 이슈 및 대응 java.lang.IllegalArgumentException: com.example.myapp: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. 대충 이러한 에러메세지를 뱉어내고 있습니다. 보통 PendingIntent는 notification을 터치 시 이동 할 엑티비티를 구현 하는데 많이 쓰이는데요. 안드로이드 12 타겟팅 하실 때는 Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);.. 2021. 12. 6. 안드로이드 12 타겟팅 시 필수 메니페스트 설정 Activity(엑티비티) 속성에 항상 android:exported="false" android:exported="true" 둘 중 하나의 설정을 꼭 해주셔야합니다. true면 외부에서 접근 허용 false면 접근 불가 2021. 12. 6. 이전 1 ··· 13 14 15 16 17 18 19 ··· 52 다음