Closed arehman86 closed 1 month ago
Hi @arehman86,
We don't support Swift and Objc-C++ interoperability, my suggestion is to create a interop layer in your project. I also tried manually import Chime SDK into your project, I got the same errors. If you think you are able to get the manual import approach work, please share me the sample project.
@georgezy-amzn I fixed it by creating an umbrella header and include all the required headers in it and used where ever it was needed as Objective-C Modules are not enabled for my project and I don't want to enable it for some reason.
**#import <AVFAudio/AVFAudio.h>
Just a suggestion, if you want the SDK to be used for those projects which doesn't require Objective-C Modules to be enabled then you should add the following in AmazonChimeSDK-Swift.h
or the end user needs to include it by themselves.
**#if defined(OBJC)
@import AVFAudio; @import AVFoundation; @import AmazonChimeSDKMedia; @import CoreFoundation; @import CoreMedia; @import CoreVideo; @import Foundation; @import ObjectiveC; @import UIKit;
Thanks for sharing this! I'll mark this as feature request.
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.Note I created the issue before which was closed without any further help as I have provided a test project in which I was facing the issue. Is there any way that your sdk is supported for Objective-C++?
Related issue which I created is https://github.com/aws/amazon-chime-sdk-ios/issues/672
I am attaching a test project as well which includes AmazonChime SPM amazon-chime-sample 2.zip