Search code examples
swiftuifocus

I was trying to test the FocusState and got the error that it is only available in iOS 15 or later. the iPhone 12 Pro simulator shows iOS 15.0


I downloaded the beta version of Xcode 13 and tried a build which failed with the following error. 'FocusState' is only available in iOS 15.0 or newer'

trying to figure out if I missed something and did not download everything.


Solution

  • It's due to the fact that the app template sets Target Deployment to iOS 14. To solve it, select the app target and select iOS 15.0 in the Deployment Info section. Visual description of the answer