Test access and lost connections
Test the locks as carefully as the buttons. Use two test people and a signed-out session, with made-up information.
Show that forbidden access fails and interrupted saves do not lose or duplicate work.
Allow extra time for two-account testing. Do not skip it because the screen looks correct.
Let’s do this
- 1On your iPhone
Make two distinct test users
Use two separate Apple Accounts on test devices, A and B, plus a signed-out session. Save a private record as A. Check that B and the signed-out session cannot see it. For shared records, also test an invited member and an uninvited person.
- 2In Codex
Test the actual online requests
Ask Codex to run access tests against your test project using normal user sessions and the public key. Try reading A’s record by its exact ID as B, then editing, deleting, changing its owner and joining a group without an invitation. Every forbidden request must fail.
- 3On your iPhone
Test a lost connection
Turn on Airplane Mode before and during a save. The app should keep the draft and explain whether it is saved or waiting. Reconnect and retry. Check that one tap sequence produces one saved item, including after reopening the app.
- 4On your iPhone
Test switching people
Sign out and sign in as the other user on the same device. Check the previous user’s records and cached screens are gone. Test an expired session. Write down the build, database rules and results before marking the checks passed.
View largerA message for Codex
Test my first iPhone app against its actual Supabase RLS rules with user A, user B, a signed-out session and any shared-group roles. Use ordinary user credentials and the public key, never admin credentials for the access assertions. Attempt forbidden reads, inserts, edits, deletes, owner changes and self-enrolment in groups. Also test offline saves, reconnect/retry duplicates, expired sessions and cached data after sign-out. Report failures and fix the rules before family testing.
What you should see
Permitted actions work; forbidden requests fail at the service; lost connections preserve a clear, recoverable state.
If you get stuck
Checked 7 September 2026. Screens can change; the official guides below have the latest steps.
Control access to Supabase recordsConnect a Swift app to Supabase