This post is from the WWDC26 CarPlay Q&A.
Is there any way to know the exact number of grid items that will fit across before you render your template? I'm currently delivering 7 items to accommodate the largest screen sizes, but on smaller screens 3 of these are wasted per row.
At present we do not have such API. Please file an enhancement request..
Generally it is not possible to determine at runtime but your feedback is greatly appreciated.