aws/amazon-chime-sdk-ios

Compilation Errors when using Amazon SDK SPM

arehman86 opened this issue · 7 comments

Describe the bug
I have an objective-c project which I am working on right now. Previously I have downloaded xcframeworks and used it manually but now I have to use SPM. So I removed xcframeworks from the project and used SPM with video. When compiling the code I am getting compilation errors. I am importing the header like this #import <AmazonChimeSDK/AmazonChimeSDK-Swift.h> but getting compilation errors in this header.

To Reproduce
Add Amazon chime sdk spm to the project and import the header AmazonChimeSDK/AmazonChimeSDK-Swift.h and try to compile. It will give compilation errors.

Screenshots
image

Hi @arehman86, did you import AVFoundation? #import <AVFoundation/AVFoundation.h>

@georgezy-amzn yes I have done that but it didnt work. There are other errors along with the errors of AVFoundation. Do you want me to prepare a sample project and share it with you guys?

Screenshot 2024-05-23 at 12 17 28 PM

Yes, please share us a sample project.

@georgezy-amzn
There is a ViewController.mm file in which I added #import <AmazonChimeSDK/AmazonChimeSDK-Swift.h>. I think it is due to Objective-C++ because when I use simply with ViewController.m then it works fine. But in our case we need to use it with Objective-C++. Code sample is attached.

amazon-chime-sample.zip

@georgezy-amzn any update on this one?

@georgezy-amzn Can you please update me on the sample project which I shared with you? Is there anything we need to do on our side to fix the issue?

Your project is using .mm files, which is for c++, please use .m.