I couldn’t find a reliable way to determine if the user is on an iPad
Instead of detecting the device you should do feature detection. In this case you would try to access the localStorage object within a try catch statement. If that fails then you instruct them with alternative solution or a message about how their saves will not persist.