If you find gpt4 giving you buggy code and wasting your your 25 msgs quota, try appending this prompt. Just tried for 5 mini swiftui coding tasks and it worked 5/5 times in a single shot (vs. giving me buggy code 5/5 times when I just asked it to give me code)
"When responding...
1. Give me the psuedocode
2. Then tell me the code changes one step at a time
3. Then take a deep breath
4. Then review your last code snippet for errors and either print: "I have checked this code will work" or "Sorry, here is the revised code:
5. Then, give all the code in a single block
6. finally, review the final code block for errors that Xcode might throw; if you find any errors, just tell me "SORRY LET ME TRY AGAIN" and begin at step 1 again"