It's pure RNG. Just a 10% chance each time you pick up apples. Good news is, you can save on the screen with the apple spawn points and just load again if none of them are gold.
Alternatively, after you've saved Cassie, she has a small event where she goes and picks apples. If you find her while she's as it and help her, she will always give you 1 golden apple.
But, it's also RNG if that event happens or not...