EvanBacon / expo-quick-actions

Add home screen quick actions / shortcuts to your React Native app
MIT License
281 stars 7 forks source link

Fix isSupported check on iOS #7

Closed haikov closed 7 months ago

haikov commented 8 months ago

Quick actions should be universally available starting from iOS 13 and as I understand it's not necessary to check for forceTouchCapability. According to this doc:

On the Home screen of a device running iOS 13 or later, apps can display Home Screen quick actions ...

This check returns false on simulators, as mentioned in https://github.com/EvanBacon/expo-quick-actions/issues/4.

In this PR I changed the logic of isSupported to return true on iOS 13+ and fallback to old solution for previous versions, since forceTouchCapability is available from iOS 9.0.