아마존 SNS 및 iOS 앱을 설정하여 SNS 콘솔을 통해 푸시 알림을 보내고 iOS에서 수신합니다. 제대로 작동합니다. 이제Amazon SNS를 사용하여 iOS에서 푸시 알림 보내기
, 나는 다른 장치에 장치에서 푸시 알림을 보내려고 해요,하지만 난 다음 오류 받고 있어요 :
-[AWSServiceInfo initWithInfoDictionary:checkRegion:] | Couldn't read credentials provider configurations from
Info.plist
. Please check yourInfo.plist
if you are providing the SDK configuration values throughInfo.plist
.
보낼 수있는 내 코드가있다 푸시 알림
AWSSNS *publishCall = [AWSSNS defaultSNS];
AWSSNSPublishInput *message = [AWSSNSPublishInput new];
message.subject = @"My First Message";
//This is the ending point
message.targetArn = @"arn:aws:sns:us-west-2:895047407854:endpoint/APNS_SANDBOX/XXXXX/XXXX-XXXX-XXX-XXXX";
message.subject [email protected]"hello";
message.message [email protected]"teste from device";
// message.messageAttributes = messageDict;
//
// message.messageStructure = jsonString;
[publishCall publish:message completionHandler:^(AWSSNSPublishResponse * _Nullable response, NSError * _Nullable error) {
if(error) NSLog(@"%@", [error userInfo]);
if(response) NSLog(@"%@", [response description]);
}];
내가 무엇을 놓치고 있는지 모르겠다. 그들은 당신이 오류가 발생합니다 _cognitoCredentialsProvider
전무를 발견하면 그들은
_cognitoCredentialsProvider = [AWSInfo defaultAWSInfo].defaultCognitoCredentialsProvider;
을 확인합니다으로 당신이 당신의 defaultCognitoCredentialsProvider
를 구성하지 않은 경우이 오류가 발생합니다 AWSInfo.m
here의 디버그 로그 당으로
오류가 '수행 권한이 없습니다.'로 변경되었습니다. SNS : 자원 게시 : arn : aws : sns : us-west-2 : XXXXXXXXXX : app/APNS_SANDBOX/XXXXXX <' – sdadsad
오류로 인해 이 작업을 수행하려면 사용 권한을 확인해야합니다. – Rajat
내 사용 권한은 어디에서 확인할 수 있습니까? – sdadsad