iOS AUv3 size negotiation

Remember that in an AUv3, setSize has no effect on the host; it is just telling JUCE what your drawing surface is going to be, but the host is going to do whatever it wants. When the host changes its window size, resized() is called, and you can ask for the size there and in the top of paint().

For the full screen to work, your resizeLimits have to contain the possible aspect ratios that the host can throw, but the host doesn’t really care about your hopes and dreams otherwise. For instance, in Quanta, here’s my resizer setup, in entirety:

addAndMakeVisible (resizer = new ResizableCornerComponent (this, &resizeLimits));
resizeLimits.setSizeLimits (450, 279, 1800, 1116); // Smallest X/Y , largest X/Y
resizeLimits.setFixedAspectRatio(1.61290323);
this->setConstrainer(&resizeLimits);

If you follow through the sizing mechanism in the AUv3 wrapper, you’ll see that the iOS part doesn’t ever ask what your size is; rather, it throws the available sizes at the constrainer, and if they fit within the possible bounds (and note they ignore the fixedAspectRatio), it returns true for those sizes to the host. Realistically, there are only two: the 3:1 ratio and the 5:3 ratio (those numbers are estimates, but I just woke up.) There is a third one that is common, and that’s one where the keyboard is showing in GarageBand on a 12.9" iPad Pro, but the mod and pitch wheels are not. This one is like 4:1. I believe this one is also possible on an iPhone X.

You still have to have a setSize, of course. But this is more for JUCE than iOS. At the top of your resized(), you figure out what the host has handed you, and draw accordingly.

Hope this helps.