Azure-Samples / azure-iot-samples-ios

azure-iot-samples-ios provides a set of easy-to-understand, continuously-tested samples for using Azure IoT Hub via Azure/azure-iot-sdk-c.
MIT License
13 stars 8 forks source link

AzureIoTHubClient wrapper framework could not build module #18

Open jvigneshcs opened 3 years ago

jvigneshcs commented 3 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Step 1: Create a framework project using Xcode (I used Xcode 12.4) Step 2: Set up cocoapods Step 3: Add Azure IoT related pods in the pod file Step 4: Do pod install Step 5: Add podspec for the project with Azure IoT dependency Step 6: Create a Swift file and import AzureIoTHubClient Step 7: Create an iPhone application project Step 8: Setup cocoapods Step 9: Add the above framework pod in the pod file Step 10: Do pod install Step 11: Build the iPhone application project

Any log messages given by the failure

Could not build Objective-C module 'AzureIoTHubClient' Header 'agenttypesystem.h' not found Skipping 'agenttypesystem.h' because module declaration of 'AzureIoTHubClient' lacks the 'framework' qualifier

Expected/desired behavior

Framework and iPhone application project should build successfully

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) Catalina

Versions

10.15.7

Mention any other details that might be useful

Please refer this SO question which I have posted.


Thanks! We'll be in touch soon.

asergaz commented 3 years ago

Same question in StackOverflow: https://stackoverflow.com/questions/66495504/azureiothubclient-wrapper-framework-could-not-build-module

asergaz commented 3 years ago

@ericwol-msft can you please take a look at this request? Thanks

johndelong commented 3 years ago

With the lack of support for SPM, we've also been stuck on this for some time now. Our application is comprised from multiple projects/frameworks/swift packages. As a result, we do not use cocoapods as a dependency manager. We also tried building this AzureIoT SDK with cocoapods in an attempt to build a wrapper framework that we could then import manually into our project. We too are getting the same error and we'd love some help in getting this resolved. Thank you!

jvigneshcs commented 3 years ago

There was a recommendation to drop the own module map or update it to include the framework keyword in their module maps.

Reference: Link