azure-sdk-for-ios icon indicating copy to clipboard operation
azure-sdk-for-ios copied to clipboard

[FEATURE REQ] AzureCommunicationCalling - Swift 5.7 support

Open jpamarohorta opened this issue 2 years ago • 19 comments

Is your feature request related to a problem? Please describe. We are unable to use the SDK with the most recent Xcode (14.1) and Swift 5.7.

Describe the solution you'd like A version of the SDK that would be compatible with Swift 5.7.

Describe alternatives you've considered We tried to change the toolchain used in this project by Xcode to Swift 5.6 however it caused issues with other dependencies on our app.

Additional context The error we are receiving when building with Swift 5.7 is: Failed to build module 'AzureCommunicationCalling'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)', while this compiler is 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)'). Please select a toolchain which matches the SDK.

Information Checklist

  • [x] Description Added
  • [x] Expected solution specified

jpamarohorta avatar Nov 23 '22 16:11 jpamarohorta

Hi @jpamarohorta thanks for the report! @raosanat can you comment on here when you expect a compatible version of Calling to be released?

tjprescott avatar Nov 24 '22 17:11 tjprescott

Hi @jpamarohorta, Thanks for the report, how are you installing the SDK, and what version of SDK are you trying to install?

lucianopa-msft avatar Nov 28 '22 21:11 lucianopa-msft

i had the same error on Mac Mini M1, using Xcode in rosetta mode fixed the issue

andycancado avatar Dec 14 '22 16:12 andycancado

Hello @lucianopa-msft , I'm installing via cocoapods and it was version 2.2.1

jpamarohorta avatar Dec 15 '22 17:12 jpamarohorta

@jpamarohorta how does your Podfile look like ? Can you send it here ?

raosanat avatar Dec 15 '22 19:12 raosanat

@jpamarohorta You are probably in a M1 Mac and trying to target a simulator right? The issue here is we indeed need to add support for arm simulator as right now we only ship ios-x86_64-simulator and iOS-arm64 in our xcframework. For now to unblock you, you can either build targeting a physical device or make Xcode run on rosetta(as @andycancado mentioned), which forces simulators to run as x86 simulators which ship a binary for. But we will work on shipping support for arm simulators in a future release.

lucianopa-msft avatar Dec 15 '22 20:12 lucianopa-msft

i couldn't use version 2.2.2 (and 2.3.0-beta.4). Even with Rosetta mode enabled or just with a physical device. Will the frameworks be build with BUILD_LIBRARY_FOR_DISTRIBUTION set to YES? This will make the framework less dependent on specific swift version

rbuiten avatar Feb 06 '23 10:02 rbuiten

i couldn't use version 2.2.2 (and 2.3.0-beta.4). Even with Rosetta mode enabled or just with a physical device.

What are the errors you were seeing?

Will the frameworks be build with BUILD_LIBRARY_FOR_DISTRIBUTION set to YES? This will make the framework less dependent on specific swift version

Yes

lucianopa-msft avatar Feb 06 '23 13:02 lucianopa-msft

sorry for the late response, but the error is the same as above

error: compiling for iOS 12.0, but module 'AzureCommunicationCommon' has a minimum deployment target of iOS 13.0: /Users/rbuiten/Library/Developer/Xcode/DerivedData/project-cuvhuaakbyehnodmsutkqpqtyckv/Build/Products/NL_ACC-iphoneos/AzureCommunicationCommon/AzureCommunicationCommon.framework/Modules/AzureCommunicationCommon.swiftmodule/arm64-apple-ios.swiftmodule

../CommunicationIdentifierExtension.swift:9:8: error: failed to build module 'AzureCommunicationCalling'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)', while this compiler is 'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)'). Please select a toolchain which matches the SDK.

rbuiten avatar Feb 21 '23 13:02 rbuiten

Hi @rbuiten, the main error seems to be related to target error: compiling for iOS 12.0, but module 'AzureCommunicationCommon' has a minimum deployment target of iOS 13.0 can you check you minimum development targets?

lucianopa-msft avatar Feb 21 '23 14:02 lucianopa-msft

hmm ok. I did update the minimum deployment target to 13. So, it's strange. But when I update the pod and set the deployment target to 12 it will work.

rbuiten avatar Feb 21 '23 18:02 rbuiten

Hello, I'm currently having the same issue but now with Xcode 14.3 and Swift 5.8. I get the following error: 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.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)'). Please select a toolchain which matches the SDK.

Is there a solution for this type of issues or do we need to wait for a new release compatible with the latest swift? I'm using the latest pod 2.4.0.

jpamarohorta avatar May 31 '23 10:05 jpamarohorta

Hello, I'm currently having the same issue but now with Xcode 14.3 and Swift 5.8. I get the following error: 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.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)'). Please select a toolchain which matches the SDK.

Is there a solution for this type of issues or do we need to wait for a new release compatible with the latest swift? I'm using the latest pod 2.4.0.

Did 2.3.0 version worked? We ship with BUILD_LIBRARY_FOR_DISTRIBUTION so versions of the compiler shouldn't matter in that case. Are you trying to build targeting a simulator or a device? This message can also happen because we don't support M1 simulators yet.

lucianopa-msft avatar May 31 '23 15:05 lucianopa-msft

@lucianopa-msft I'm facing the issue on my M1 computer and using a physical phone device:

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.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)'). Please select a toolchain which matches the SDK.

ashfaqadib avatar Jan 17 '24 20:01 ashfaqadib

Hi @ashfaqadib, Which version of Calling SDK are you using? As well as Xcode and Swift versions you are using Can you also share installation details, such as how are you installing the binary?

lucianopa-msft avatar Jan 19 '24 18:01 lucianopa-msft

Also if you are trying to build targeting simulator or device arch?

lucianopa-msft avatar Jan 22 '24 16:01 lucianopa-msft

Hi @lucianopa-msft,

I'm currently using AzureCommunicationCalling (1.0.1) following the Voice Calling Quickstart guide. I'm on XCode Version 14.3.1 and Swift version 5.8.1. I'm trying to build on my physical device with iOS 12. I haven't still figured out a fix for the issue.

ashfaqadib avatar Feb 12 '24 15:02 ashfaqadib

Can you try with the latest version? 2.8.0? We still support iOS 12 in our latest releases so it would not be an issue

lucianopa-msft avatar Feb 15 '24 21:02 lucianopa-msft

If that doesn't work, can you submit a sample minimized project zip that repros this? This message may happen for a variety of reasons which some of them are not actually compiler version mismatch.

lucianopa-msft avatar Feb 15 '24 21:02 lucianopa-msft