Auto-generated Intents code contains thousands of warnings in Xcode 13 beta

My project has auto-generated Swift code for Intents in my "ProjectName-Swift.h" file. In Xcode 12, this file had zero warnings, but in Xcode 13 it is filled with thousands of warnings.

About half of them are Block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) - the other half are Multiple declarations of method 'handleIntent:completion:' found and ignored.

I have tried cleaning my project and deleting the Derived Data folder so far, but still getting the same errors.

Since these are auto-generated files, I can't go in and fix the errors myself. Has anyone else seen this on the Xcode 13 beta? Or have any idea how to fix it?

  • Filed as FB9452624.

  • I too am seeing this. But only in one of the projects I work on. I'm hoping this gets resolved soon.

  • I just realized this isn't happening solely with Intents-related code. I had added a little Swift file so that my Obj-C code could call out to the new Swift-only AppStore class that lets you open the subscription management screen in-app - the auto-generated Swift bridge has a bunch of nullability warnings for that code as well.

Replies

Still happening with Xcode 13.4

Still happening with Xcode 13.4.

I "fixed" the multiple declarations issue by doing this.

#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wduplicate-method-match" #import "AppName-Swift.h" #pragma clang diagnostic pop

  • Where did you put this?

  • Anywhere in your obj-c files that the auto-generated "AppName-swift.h" is imported.

  • This is fantastic tedrog36, I used your 'fix' and created a wrapper header, that only imports the auto-generated "AppName-swift.h", with your clang diagnostic statements, and then I can just import that wrapper header in all the places I was previously importing the auto-generated one.

Add a Comment