RealmSwift 0.10.34 install with SPM, building compiling error: Converting non-sendable function value to '@Sendable (UInt, UInt) -> Bool' may introduce data races

  • RealmSwift 0.10.34 install with SPM, building compiling error:
    • Converting non-sendable function value to ‘@Sendable (UInt, UInt) → Bool’ may introduce data races
      • swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
        Target: x86_64-apple-macosx13.0
      • Xcode Version 14.0.1 (14A400)

I am facing same issue with Cocoapods as well, any work aroud? Thanks.

I just now created two brand new projects (macOS) using SPM and Cocoapods and it work correctly with both.

I followed the instructions here Install Realm

I tried it on both Monterey (12.6.2) and Ventura.

@perlasivakrishna_N_A Can you include your podfile, version of Cocoapods and OS? Current version is 1.11.3 (pod --version in terminal)

OP, i noted the question title say RealmSwift 0.10.34 - the current realm version is actually 10.34.0 so perhaps that’s an issue?

Also, the current version of XCode is 14.2 - I don’t think that is part of it but just adding it for clarity.

I’m facing the same issue with Realm 10.34.0. My pod version is 1.11.2 on Monterey (12.6.2) .

@Negar_Haghbin can you please verify your version of Xcode and also include your podfile? Also check your build settings for your projects to ensure it meets the minimum OS level as well.

v10.34.0 Swift 5.5 is no longer supported. Swift 5.6 (Xcode 13.3) is now the minimum supported version

Hey Jay,
Thank you for your response. My Xcode version was 14.0. I upgraded it to 14.1 and now it works! :slight_smile: