Here's what a member of my Western Cascades Fruit Society swears by:
You might try “Plantskydd” to repel squirrels. It would not work on raccoons. It is a blood cell preparation that comes either pre mixed or as a dry powder. It works well to repel rabbits and deer. The only caution is to not use it directly on the fruit that you would eat. Once it dries on the plant it seems to last several months. The pre mixed preparation settles out and is very hard to re-mix. And you need to freeze what you do not use or it will rot. The powder can be mixed in small quantities according what you might use at the time. I mix mine with an egg beater and then strain the mix through an old nylon sock or apple maggot sock into my sprayer to avoid chunks that will plug the sprayer nozzle.