If I wrote programs for Mac, this is one of the things that would really piss me off. Then, I'd write to ~/Library because I'm not gonna spend the time to figure out how to make it work with codesigning, if at all possible.
But like... why? If you wrote for Mac, you'd also probably follow the news and updates from Apple, which didn't exactly hide the direction they've been pushing things in.
You also _should_ write to a third party folder, preferably `~/Library/Application\ Support`. It's what it's for, after all.