Completion popup should display platform/version requirements for methods...

Number:rdar://FB12113546 Date Originated:4/12/2023
Status:Open Resolved:No
Product:Xcode Product Version:14.3
Classification:Developer Tools Reproducible:Yes
This is a “Developer Experience” suggestion for Xcode.

When the auto-completion popover is displayed while writing code in Xcode, it would be extremely helpful for the popover to display the platform/version requirements for the method(s) suggested when they are highlighted.

Currently, the method signature is displayed as well as a short description. But if the method you pick from the list won’t work with your project (for example, it is only supported in iOS 16.0+ and your project supports iOS 15.0+) you cannot tell this until you pick the method and wait for an error to appear.

It would be much more efficient if the platform/version requirements for each method were displayed for the selected method so that you can tell immediately if it won’t work.

Ideally, there should be some indication within the auto-completion popover itself that the method won’t work. Perhaps a short text string saying “Method is only available in iOS 16.0 or newer” or similar, in red. You might also consider displaying unsupported methods in the list in red (or some other indicator) so that I know that I will likely want to look at the other options first.

I have attached a screenshot of the auto-completion popover showing an example of a method that does not work in my project. I’ve also attached another screenshot, from Xcode’s documentation for a given method, showing the kind of information I’d like to see in the auto-completion popover.


Similar example (deprecation warnings)...

For a somewhat similar example, see what Xcode shows for deprecated methods:

  1. The deprecation warning details for the selected method.
  2. A small warning icon on the right side of the method.

I think my suggestion could be patterned after this: A small red icon in the listing indicating platform/version requirements prevent the method from being used (without a fallback), and show the requirements themselves under the description. Add red warning text as needed.

By jeffac1978 at April 12, 2023, 8:37 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!