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

[FEATURE REQ] Swift Package Manager (SPM) support for AzureCommunicationCalling #1637

Open
2 tasks done
Svantulden opened this issue Oct 16, 2023 · 5 comments
Open
2 tasks done
Assignees
Labels
Communication customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@Svantulden
Copy link

Svantulden commented Oct 16, 2023

Is your feature request related to a problem? Please describe.
We are using Swift Package Manager for our dependency management and would like to use AzureCommunicationCalling like this as well. This would help us avoid CocoaPods bloat and make it simple to add the library to our project. Swift Package Manager is also the new leading standard in including libraries on iOS.

I incorrectly assumed that SPM is already supported for this library, due to it being mentioned on this page.

Describe the solution you'd like
Adding the AzureCommunicationCalling library to an iOS project via Swift Package Manager.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Description Added
  • Expected solution specified
@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Oct 16, 2023
@tjprescott
Copy link
Member

Hi @Svantulden we are already tracking SPM support for Calling here: #828

@raosanat is there a reason the link provided claims SPM support?
https://azure.github.io/azure-sdk/releases/latest/ios.html

@tjprescott tjprescott added Communication and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Oct 16, 2023
@github-actions github-actions bot added the needs-team-attention This issue needs attention from Azure service team or SDK team label Oct 16, 2023
@Svantulden
Copy link
Author

Thanks for linking that issue @tjprescott, I had searched the issues for 'SPM' and 'Swift Package', but not 'SwiftPM'.

It seems like the library won't support SPM for some time, due to the issues with linking Objective-C (binary) & Swift dependencies for the package. So it's dependent on transitioning the Calling library to Swift or new insights/features in the Swift package system.

To prevent having to use CocoaPods for the library, we also tried using the direct approach as a workaround and include the release as .xcframework in our project (from the link that is in the binary CocoaPods podspec) and linking the Common library via SPM.

However this has two issues:

  • The XCFramework provided doesn't seem to have Module Stability so I'm getting a Failed to build module 'AzureCommunicationCalling'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)'). Please select a toolchain which matches the SDK. error
  • Probably the same issue will occur here as in getting SPM support implemented, where the Objective-C headers for the SwiftPM Common library won't be found

Do you have any ideas for a short(er) term solution?

@lucianopa-msft
Copy link
Contributor

lucianopa-msft commented Oct 19, 2023

Hi @Svantulden,

Unfortunately using calling as .xcframework and installing common using SPM is not going to work AzureCommunicationCalling because it is an Objective-C framework and Swift Package Manager deliberately do not support Swift ObjC interface headers by design(see more here) which means is not possible to work together because AzureCommunicationCommon would not emit objc files required for calling to interop with AzureCommunicationCalling if installed using Swift Package Manager.

So common would have to be installed using another dependency manager either Pods or another approach.
That is a bit of a hack but since AzureCommunicationCommon is open source but it doesn't distribute a .xcframework, to make it work would be possible to build an xcframework from source and import both AzureCommunicationCalling and AzureCommunicationCommon as .xcframework.

@pa-akiya-ozawa
Copy link

@lucianopa-msft

Is there a repository for AzureCommunicationCalling that I can install the dependency via SPM?
I confirm that there are repos for AzureCommunicationCommon and AzureCommunicationChat but not AzureCommunicationCalling.

Thanks in advance.

@lucianopa-msft
Copy link
Contributor

Hi @pa-akiya-ozawa,
Unfortunately there isn't, as mentioned before we still don't have support for SPM on AzureCommunicationCalling since we are still an ObjC binary framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Communication customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants