Here are details of the solution that applied in my specific case.
I took a look at the output in the Report Navigator ⌘9 (right-most icon at the top of the Navigator pane, which is at the left edge of Xcode). I clicked on the most recent failed build shown in the list, and that produced a detailed list of modules and files that were compiled in the build.
I was able to narrow down the problem to a source file in third-party code which was using a symbol that is not yet available to me for my macOS target requiring macOS 11.3. The errant symbol (AttributedString) was found within a conditional compilation block similar to this:
#if compiler(>=5.5)
@available (iOS 15, macOS12, tvOS 15, watchOS 8, *)
extension AttributedString { ... }
#end if
Fortunately, the maintainers of the third-party code were quick to remedy the problem by further refining the conditional compilation as follows:
#if compiler(>=5.5) && !os(macOS) && !targetEnvironment(macCatalyst)
@available (iOS 15, macOS12, tvOS 15, watchOS 8, *)
extension AttributedString { ... }
#end if
So before the fix, I got the error that is the subject of this post:
warning: Could not read serialized diagnostics file: error("Invalid diagnostics signature")
Also before the fix, the accompanying type error was:
Cannot find type 'AttributedString' in scope
After the fix, these errors went away since the offending symbol was not compiled.
So there’s a type (such as CLLocation in the original post) that isn’t available in the current framework set, but it is being encountered somewhere in source code where maybe it should be conditionally not compiled at all.
In my case, the third-party code was being used via Swift Package Manager, so I had to right-click on the package in the Project Navigator ⌘1 and choose «Update Package».
Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
- [x ] I have read the wiki page and cheat sheet, but there is no information I need.
- [ x] I have searched in existing issues, but did not find a same one.
- [x ] I want to report a problem instead of asking a question. It’d better to use kingfisher tag in Stack Overflow to ask a question.
Issue Description
What
Swift UI Projects no longer building with Kingfisher
[Tell us about the issue]
Unable to build SWift UI projects with KIngfisher Could not read serialized diagnostics file: error(«Invalid diagnostics signature») (in target ‘Quiz’ from project ‘Quiz’)
Command CompileSwift failed with a nonzero exit code
Reproduce
[The steps to reproduce this issue. What is the url you were trying to load, where did you put your code, etc.]
Install King Fisher using Package manager or cocapods
Try to build — get this error: Could not read serialized diagnostics file: error(«Invalid diagnostics signature») (in target ‘Quiz’ from project ‘Quiz’)
Command CompileSwift failed with a nonzero exit code
+3
- Helper
- 2 replies
I have an independent watch app on the store as part of a family of apps. The watch app is part of a single project with the iOS app. After I upgraded Xcode, my app will no longer recognize the Purchases(now RevenueCat) package. I am using a single class that manages the purchases. If I have it as part of the watch extension it throws errors. If I only target the iOS app, the errors go away. The errors all essentially amount to:
‘PurchaserInfo’ is not a member type of class ‘RevenueCat.Purchases’
I am also showing an error of
Watch Extension.build/Objects-normal/arm64_32/Settings.dia:1:1: warning: Could not read serialized diagnostics file: error(«Invalid diagnostics signature») (in target ‘Watch Extension’…
Steps I have done:
- Make sure that the package is linked to the extension
- cleared the derived data, cleaned the project and restarted.
I can find no setting that seems to be a problem. Any help would be appreciated.
How frequently does the bug occur?
All the time
Description
I using cocoapod to install realm 10.22, and I got many compile error from realm-swift.
Stacktrace & log output
Intermediates.noindex/Pods.build/Debug-iphoneos/RealmSwift-iOS.build/Objects-normal/arm64/Aliases.dia:1:1: warning: Could not read serialized diagnostics file: error("Invalid diagnostics signature") (in target 'RealmSwift-iOS' from project 'Pods') Command CompileSwift failed with a nonzero exit code === public enum override final func isEmbedded() -> Bool { //<-- show error: Expected '{' in enum === try await withCheckedThrowingContinuation { continuation in //<-- show error: Generic parameter 'T' could not be inferred many many.
Can you reproduce the bug?
Yes, always
Reproduction Steps
- add pod ‘RealmSwift’, ‘~>10’ to Podfile
- pod install
- build project from xcode.
Version
10.22
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
iOS 15, iOS 14
Build environment
Xcode version: 13.2.1
Dependency manager and version: Cocoapods 1.10.2