I think it's actually easier on macOS because you can just swap everything if necessary. For some reason I don't understand, iOS does not employ swap, so while it can kill background apps, it can't kill foreground app.
That is true. I'm not sure why iOS doesn't do that while macOS does. Maybe mobile storage isn't performant enough? At least when iOS was originally developed.