在Swift SDK中获得Device Twin -Azure IoT中心
有没有一种方法可以使用azure sdk从Azure Iot-Hub中获取设备的Twin Twin?
据我所知,我能够使用nodejs的Azure SDK来获得设备的双胞胎,也可以使用C和其他设备。
In the documentation it says that the swift sdk is a part of the C sdk. But i didnt know how to get the device twin into swift. I tested with the given code example in the docs but its only how to send messages to the device.Is there a way to get the device twin of a device from Azure IoT-Hub, using Azure SDK for Swift
?
As far as I know, I am able to get the device twin using the Azure SDK for NodeJS and also its possible for C and others.
In the documentation it says that the swift sdk is a part of the C sdk. But i didnt know how to get the device twin into swift. I tested with the given code example in the docs but its only how to send messages to the device.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据此开放,问题,到目前为止,到目前为止,
iothubdevicetwin_gettwin
使用azure SDK用于Swift,没有可用的示例。另外,如罗马,您可以使用 REST API 。
对于Swift,您可以使用 asynchttpclient 1.6.4.4 https://learn.microsoft.com/en-us/azure/ozure/iot-hub/iot-hub-dev-guide-sas?tabs=node“ rel =“ nofollow noreferrer”> sas token 用于授权标题并使用。
As per this open issue, as of now, there is no sample available for
IoTHubDeviceTwin_GetTwin
using Azure SDK for Swift.Alternatively, as suggested by Roman, you can get the device twin using REST API.
For Swift, you can use AsyncHttpClient 1.6.4, SAS token for authorization header and create it using Device Explorer.