SwiftUI preview doesn't match simulator or device for NSLocalizedStrings
Originator: | andy.warwick | ||
Number: | rdar://FB7595129 | Date Originated: | Feb 22, 2020 |
Status: | Open | Resolved: | No |
Product: | Xcode | Product Version: | |
Classification: | Incorrect/Unexpected Behavior | Reproducible: | Yes |
SwiftUI previews for different localeIdentifiers don’t match what is expected, nor what is displayed on simulators and devices. 1. Open and run attached sample project. 2. Check text displayed in TextFields for localised text, across three languages, using two different Text field initializers; not what is expected. 3. Run each scheme in project (one for each language) on simulator and/or device, and compare to SwiftUi previews. They don’t match. 4. See comments in ContentView.swift for more details. Sample Project: https://drive.google.com/file/d/1Hvdqfu1UBIOM2DuR0xpb2IgYbfYk1923/view?usp=sharing
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!