Default Text width in SwiftUI different for MacOS and iPadOS ?

I have an app that runs eitheir as MacOS or iPadOS.

After a few changes to adapt to API differences (PasteBoard notably), app runs OK on both.

But the layout of views is messy when running on iPad.

Reason seems to be that Text are not using the same default font size, or that the same system font size does not use the same space. Same issue when using segmented picker for instance.

Configuration:

  • Xcode 14.2
  • MacOS 12.6.6
  • Simulator: iPad Pro (12.9") - iOS 16.2

Is it a correct analysis ?

Is there a simple workaround, to avoid the need to redesign all views for iPadOS ?

Default Text width in SwiftUI different for MacOS and iPadOS ?
 
 
Q