Generated Objective-C interfaces for types in intent definition files cause build warnings

Originator:daniel
Number:rdar://FB9567186 Date Originated:2021-08-26
Status:Open Resolved:
Product:Xcode Product Version:13.0 beta 5 (13A5212g)
Classification: Reproducible:always
 
In a target that mixes Swift and Objective-C code, defines custom intents in a .intentdefinition file, and imports the Swift interface header (SWIFT_OBJC_INTERFACE_HEADER_NAME) in one of the Objective-C files, I'm seeing a couple of build warnings on the interface header (see below).

This can generate hundreds or thousands of warnings in a bigger project if the header is imported in many places or if there are many custom intents. It also doesn't seem to be fixable on the app developer's end.


Please list the steps you took to reproduce the issue:

Open and build the attached sample project, or follow these steps:

1. Create a new Swift iOS app project
2. Add a new SiriKit Intent Definition file
3. Add a new intent to the .intentdefinition file
4. Add an Objective-C class to the project
5. Import the "ProjectNameGoesHere-Swift.h" header (as defined in SWIFT_OBJC_INTERFACE_HEADER_NAME) in the .m file
6. Build


What did you expect to happen?

There should be no build warnings in this case.


What actually happened?

I'm seeing the following warnings (multiple times):

warning: block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]

warning: multiple declarations of method 'handleSomeIntent:completion:' found and ignored [-Wduplicate-method-match]

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!