question

MunagaUdayKiran-8962 avatar image
0 Votes"
MunagaUdayKiran-8962 asked asergaz commented

Consuming Provision client from IOS swift

Hi,
First time I am trying to consume DPS to register devices in IoT HUB. I saw azure C SDK. Not sure how to add Provisiong device Client in the iOS project.

pod 'AzureIoTHubClient'

On adding the above line in the podfile, AzureIoTHubClient, AzureIoTUtility, AzureMQTT related classes got added.
Can you guide me on how I can access azure_prov_client?
Didn't find any docs explaining this or samples that show how to consume provision client from Objective C/Swift language.

azure-iot-sdkazure-iot-dps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

asergaz avatar image
1 Vote"
asergaz answered asergaz commented

Hello @MunagaUdayKiran-8962 see here the list of CocoaPods for Microsoft Azure IoT

Did you try adding AzureIoTHubServiceClient ?

Check some samples here: https://github.com/Azure-Samples/azure-iot-samples-ios

Thanks


· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am facing the below error when I try to add AzureIoTHubServiceClient. And are you sure that Provision device-related functionality present in HUbService client


CocoaPods could not find compatible versions for pod "AzureIoTHubServiceClient":
In Podfile:
AzureIoTHubServiceClient

There are only pre-release versions available satisfying the following requirements:
'AzureIoTHubServiceClient', '>= 0'

You should explicitly specify the version in order to install a pre-release version
CocoaPods could not find compatible versions for pod "AzureIoTUtility":
In snapshot (Podfile.lock):
AzureIoTUtility (= 1.5.0)

In Podfile:
AzureIoTHubClient was resolved to 1.5.0, which depends on. AzureIoTUtility (= 1.5.0)

AzureIoTHubServiceClient was resolved to 1.0.0, which depends on AzureIoTUtility (= 1.1.3)

1 Vote 1 ·
asergaz avatar image asergaz MunagaUdayKiran-8962 ·

are you sure that Provision device-related functionality present in HUbService client

Please allow me to reach out to Product Team to confirm that for you as I don't have a way to test it.

Thanks!



0 Votes 0 ·

@asergaz Sure. To give more info what I am looking for -
if I add AzureIoTHubClient to my project via cocoapods, I am assuming I will be able to register/provision my device with IoTHUb. But didn't find a way how to add provision device client SDK in iOS

1 Vote 1 ·

@asergaz Have you got any reply from Product team

0 Votes 0 ·
Show more comments