Post

Replies

Boosts

Views

Activity

[Big Sur] /usr/lib/libobjc.A.dylib: Cannot load Swift type information
We are having a problem when we try to assign a nil value to a @objc dynamic lazy property ... The log shows this: /usr/lib/libobjc.A.dylib: Cannot load Swift type information; failed to initialize ClangImporter: error: invalid Darwin version number: macosx11.0.0 error: invalid version number in '--target = x86_64-apple-macosx11.0.0' It usually occurs when we try to assign a nil value to a @objc dynamic lazy property. (only in Big Sur beta 5 or higher) In our tearDown() logic, we manually clear references. ... // Clear strong references to objects in other MOC's result = nil // declared property that stores some coredata objects. @objc dynamic lazy var result: Result? = {[weak self] in I found this observation in the release notes: https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes Known Issues ... New in macOS Big Sur 11 beta, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen () the path, which will correctly check for the library in the cache. (62986286) ... This problem causes an application crash. Is this a mistake? Will it be available in future versions? Will it get replaced by an alternative? Thx in advance! P.s. Out of curiosity, I didn't find the /usr/lib/libobjc.A.dylib library available in Big Sur anymore, but it is present in Catalina.
2
1
4.5k
Jan ’23