0
푸시 알림이 사용자에게 전송되는 알림 테스트 기능을 구현하고 싶습니다. 이 작업은 Parse에서 매우 쉽게 수행 할 수 있었고 Firebase 프레임 워크와 함께이 기능을 복제하려고합니다.Firebase 프레임 워크를 사용하여 자기에게 알림 보내기
[[FIRInstanceID instanceID] getIDWithHandler:^(NSString * _Nullable identity, NSError * _Nullable error) {
if (error) {
[self stopWaitingForTestNotification];
}
else {
NSDictionary *payloadDict = @{@"alert": @"Success, Push Notifications are working.", SMAppRemoteNotificationTestNotificationIdentifierKey: @"true"};
[[FIRMessaging messaging] sendMessage:payloadDict to:identity withMessageID:@"test-notification" timeToLive:10];
}
}];
일부 사용자는 알림이나 오류가 콘솔에 전달되지 않는다는 사실에 놀라지 않을 수도 있습니다. 이것은 현재 사용자를 참조하는 잘못된 방법입니까 아니면이 방법이 가능합니까?