
Save how your app is right now. Later, put it back with one tap. So you can test the same spot again and again.
Add this call beside UseBuoy in your app setup.
Builder calls must come before builder.Build().
They use using Buoy.Maui;.
Keep Buoy code in Debug guards.
builder.UseBuoyTimeMachine();
builder.UseBuoyTimeMachine();
Each part of your app it can save is a source.
Buoy never saves its own keys. So a restore point never holds another one.
Each source has a switch in the list. Turn one off, and Time Machine leaves it alone. It is not saved, and it is not put back.
Type a name and tap Capture. With no name, Buoy names it for you. It uses the screen and the time.
Restore points stay saved after the app closes. The free plan keeps 1 restore point. Pro keeps as many as you want.
Tap Restore on a row. Your data comes back. The app also goes back to the saved screen. Then the tool gets out of the way.
If a source could not come back, a card tells you why.
Swipe a row to see more:
Tap a row to see what would change. Each source shows how many items differ. Open one to see each item, old and new. Tap an item to see the full change.
Uncheck an item to leave it alone. Buoy saves your choice on the restore point. So every later restore skips it too.
You can also rename the point here. And you can turn off the trip back to its screen.
Tap Action bar at the top. A small bar floats over your app. It holds one restore point.
The arrow also has a switch. Turn it on to reload the app after each restore. Use it for screens that read saved data only once.
Wipe All App State deletes your app's saved keys. Then the app reloads, like a fresh install. Your restore points stay.
Reload app builds your main page again.
Your saved data shows up fresh.
Data in your own objects does not reset.
To change what a reload does, set Reload.
builder.UseBuoyTimeMachine(options =>
options.Reload = () => RestartMyAppAsync());
builder.UseBuoyTimeMachine(options =>
options.Reload = () => RestartMyAppAsync());
Data that only lives in memory needs its own source.
Make a class with IStateSnapshotSource.
It saves your data as JSON and puts it back.
Then add it once, when the app starts.
using Buoy.Core.TimeMachine;
StateSnapshotRegistry.Register(new CartSource());
using Buoy.Core.TimeMachine;
StateSnapshotRegistry.Register(new CartSource());
Your source shows up in the list like the others.
See all MAUI tools.