我設置了Amazon 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]);
}];
我不知道我在想什麼。
現在錯誤更改爲無權執行:SNS:在資源上發佈:arn:aws:sns:us-west-2:XXXXXXXXXX:app/APNS_SANDBOX/XXXXXX <' – sdadsad
該錯誤表示您無法執行執行此操作,您需要檢查您的權限 – Rajat
我在哪裏可以檢查我的權限? – sdadsad