is only available in iOS 17.0 or newer – Working solution

Hello, in this article I have come up with a solution to is only available in iOS 17.0 or newer type of errors.

I know you have landed on this page because your device is compatible with that specific iOS version but despite that, you are facing the issue.

This morning I tried to use .sensoryFeedbackbut got an error like sensoryFeedback(_:trigger:)' is only available in iOS 17.0 or newer.

But I was trying to run that on my physical iPhone (iOS 17.0.3)

Note: I have another MacBook Air and the model is pretty old. Due to that, my MacOS version is 12.7 and not getting updates. Thus I can’t update to the latest Xcode either. If you are not using the latest Xcode at this time, you probably won’t be able to use codes that are only supported to iOS 17.0 or later. That’s the reason I have bought the latest iMac just to run the latest codes. But still facing the error is only available in iOS 17.0 or newer and I somehow managed to figure out and solve that error.

So I had no clue why I am still facing that error. I checked my XCode version which is the latest. Then I tried running the code on the iPhone 15 pro simulator but got the same error.

is only available in iOS 17.0 or newer

If your device is not compatible with newer version of iOS then at first try updating your MacOS and then update the Xcode from App store. If you are using Physical iPhone, then update the iPhone too. After updating all the things, if you are still getting the error, then follow the below step:

Solution: is only available in iOS 17.0 or newer

You can simply navigate to your app target section and go to build settings.

There you will find an option to choose an app deployment target. Select the version as per your requirement and then try to run your project.

It will be running properly.

If you are still confused follow the below image screenshot:

is only available in iOS 17.0 or newer

You can also find it in the general tab instead of the build settings.

App deployment version swiftui

You can change the minimum deployment version from here.

Also read: How to find info.plist file in Xcode 13 and 14 in SwiftUI project

Leave a Reply

Your email address will not be published. Required fields are marked *