Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Errors when using Amazon SDK SPM #672

Closed
arehman86 opened this issue May 14, 2024 · 7 comments
Closed

Compilation Errors when using Amazon SDK SPM #672

arehman86 opened this issue May 14, 2024 · 7 comments

Comments

@arehman86
Copy link

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

@georgezy-amzn
Copy link
Collaborator

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

@arehman86
Copy link
Author

@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

@georgezy-amzn
Copy link
Collaborator

Yes, please share us a sample project.

@arehman86
Copy link
Author

@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

@arehman86
Copy link
Author

@georgezy-amzn any update on this one?

@arehman86
Copy link
Author

@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?

@georgezy-amzn
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants