If we use an API for adding a feature, which is compatible only in iOS10 (For example Siri API), should I change my app compatibility to iOS10 or do I have a choice to inform the end user that, this feature is available only in iOS 10, but the app works normally in prior version.
thank you,
You should build against the iOS 10 SDK, set your deployment target to iOS 9, then use some Swift like this:
if #available(iOS 10, *) {
// use SFSpeechRecognizer
} else {
// show message to user
}
Clearly Apple won't be terribly happy with you in app review if it's a really critical feature that isn't available, but as long as it's not central to the app's purpose and you're clear with the user, I think the above is the best solution.
I wrote a tutorial on Swift availability checking that you might find useful.