according to the widget documentation in Apple’s HIG the height and width of the three widget sizes (small, medium, large) vary greatly depending on the device’s screenSize.
- 414x896 pt devices are the XR, 11, 11 Pro Max
- 375x812 pt devices are the X, XS, 11 Pro
- 414x736 pt devices are the 6/7/8(S) Plus
- 375x667 pt devices are the 6/7/8(S) and SE (2nd Gen.)
- 320x568 pt devices is the SE (1st Gen.)
(Note: The iPhone 12, 12 Pro and 12 Pro Max, which have new base resolutions are still missing in the HIG.)
It would be great to have Scriptable provide the according widget height and width as numeric values. (@simonbs)
By that, it would be possible to accurately calculate the available remaining canvas given a set padding.
For example: On an iPhone 11 Pro Max the 169 pt width of a widget with 2x 16 pt padding (safe area) would result in 137 pt of remaining space.
On the 11 Pro (155 pt) this would just result in 123 pt.
Also, I am not sure about the iPad device sizes. The iPad Pro 12.9 seems to have a small widget width of 170 pt.
I assume the iPad Pro 11 is at 155pt.
Sure I could query for all those device types in my widget and derive various sizing scales from it, but I feel that those 30-40 lines of code should be part of the framework provided by Scriptable.
… unless, I have simply missed it in the docs.
Thanks a lot!