aws-amplify/aws-sdk-ios

Getting named shadow doesn't work

duyenlv opened this issue · 5 comments

Describe the bug

  • I created a thing with classic shadow and named shadow (Limits)
  • I use AWSIoTDataManager to get both shadows.
    • App gets the classic shadow successful.
    • Failure to get "Limits" shadow with error: {"code":404,"message":"No shadow exists with name: 'Limits'","clientToken":"8F67BE93-86DC-4258-96D4-299D93B8A880-ios-1"}

I find out the topic string you are using in SDK is incorrect. See screenshots

To Reproduce

Observed Behavior

Expected Behavior

Stack Trace

Code Snippet

theAWSIoTDataManager.register(withShadow: "Limits", options: options) { [weak self] (name, operationType, status, clientToken, payload) in
            ...
}
        
DispatchQueue.main.asyncAfter(deadline: .now() + gettingShadowDelay) { [weak self] in
            theAWSIoTDataManager.getShadow("Limits");
}

Unique Configuration

Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?
IoT

Screenshots
Screenshot 2024-06-21 at 17 18 43
Screenshot 2024-06-21 at 17 19 29

Environment(please complete the following information):

  • SDK Version: 2.36.3
  • Dependency Manager: Cocoapods
  • Swift Version : 5
  • Xcode Version: 15.4

Device Information (please complete the following information):

  • Device: iPhones, Simulators
  • iOS Version: iOS
  • Specific to simulators:

Additional context

Relevant Console Output

Logs

Thanks for raising the issue. Our team will look into the issue and provide an update.

Hi @duyenlv! When the IoT SDK was implemented, only "classic" shadows existed, so named shadows are currently not supported.

We will mark this as a feature request and post further updates here.

@ruisebas Thank you, Looking forward these updates to be release soon

lyp commented

@ruisebas do you have an ETA on when this update will be available?

@lyp We currently don't have an ETA for it and the feature request has not been prioritized. But the team welcomes contributions towards its products, if this interests you, feel free to contribute and open a PR. The team would be happy to look at it.