amazon-archives / aws-mobile-community-discussion

MIT License
5 stars 11 forks source link

How to subscribe multiple topics in "AWSIoT" iOS SDK ? #4

Open amitvolansystech opened 5 years ago

amitvolansystech commented 5 years ago

Hi Team,

I am using AWSIoT iOS SDK (version 2.6.0) in my current application.

To subscribe the topic currently, we are using below method of SDK

- (BOOL) subscribeToTopic:(NSString *)topic
                      QoS:(AWSIoTMQTTQoS)qos
          extendedCallback:(AWSIoTMQTTExtendedNewMessageBlock)callback.

Can you please let me know how can we subscribe multiple topics with the single method call?

Thanks in advance.

frankmuellr commented 5 years ago

Hello @amitvolansystech,

Please open an issued directly in the AWS iOS SDK repo: https://github.com/aws-amplify/aws-sdk-ios

frankmuellr commented 5 years ago

Hi @amitvolansystech,

Right now, there's no API call to subscribe to multiple topics at once. You will have to call subscribeToTopic multiple times as documented here: https://aws-amplify.github.io/docs/ios/pubsub . If you wish you can you file a feature request in the AWS iOS SDK repo. https://github.com/aws-amplify/aws-sdk-ios