Skip to content

Build Warnings In Xcode 26 #8817

@LowAmmo

Description

@LowAmmo

How frequently does the bug occur?

Always

Description

Just seeing some new warnings when building RealmSwift with Xcode 26.

Pods/Realm/Realm/RLMObjectStore.mm:95:90: warning: ISO C++ requires field designators to be specified in declaration order; field 'diff' will be initialized after field 'update' [-Wreorder-init-list]
   95 |     CreatePolicy createPolicy = {.create = true, .copy = false, .diff = false, .update = false};
      |                                                                                ~~~~~~~~~~^~~~~
Pods/Realm/Realm/RLMObjectStore.mm:95:73: note: previous initialization for field 'diff' is here
   95 |     CreatePolicy createPolicy = {.create = true, .copy = false, .diff = false, .update = false};
      |                                                                         ^~~~~


Pods/Realm/Realm/RLMObjectStore.mm:143:89: warning: ISO C++ requires field designators to be specified in declaration order; field 'diff' will be initialized after field 'update' [-Wreorder-init-list]
  143 |     CreatePolicy createPolicy = {.create = true, .copy = true, .diff = false, .update = false};
      |                                                                               ~~~~~~~~~~^~~~~
Pods/Realm/Realm/RLMObjectStore.mm:143:72: note: previous initialization for field 'diff' is here
  143 |     CreatePolicy createPolicy = {.create = true, .copy = true, .diff = false, .update = false};
      |                                                                        ^~~~~


Pods/RealmSwift/RealmSwift/ThreadSafeReference.swift:221:46: warning: conformance of 'RLMThreadSafeReference<Confined>' to protocol 'Sendable' was already stated in the type's module 'Realm'
extension RLMThreadSafeReference: @unchecked Sendable {
                                             ^
Build/Products/Debug-iphonesimulator/Realm/Realm.framework/Headers/RLMThreadSafeReference.h:71:12: note: 'RLMThreadSafeReference<Confined>' implicitly conforms to protocol 'Sendable' here
@interface RLMThreadSafeReference<__covariant Confined : id<RLMThreadConfined>> : NSObject
           ^

And this warning has been around for a few Xcode versions, when the library is consumed via cocoapods -

Realm: ld: warning: ignoring duplicate libraries: '-lc++'

Stacktrace & log output

n/a

Can you reproduce the bug?

Always

Reproduction Steps

Just build an app that consumes RealmSwift via cocoapods

Version

20.0.4

What Atlas Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Xcode 26,4

Build environment

Xcode version: 26.4
Dependency manager and version: cocoapods 1.16.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions