I used to grow tomatoes on my deck. My problem wasn't the pets, it was the squirrels. As soon as the tomatoes started to turn color the tree-rats would pick the tomato. They then had the nerve to sit on the deck railing eating the tomato. I know this because they would leave the remains of the tomato sitting on the deck railing- just the stem. I had planted probably 6-8 plants of different varieties, cherry, beefsteak, yellow, heirloom, etc. I think all toll, we got maybe a half a dozen red tomatoes that summer. They never touched the yellow tomatoes though, don't know why. I learned my lesson, the next summer I only grew yellow tomatoes on the deck.
Don