Detention Sphere enters the battlefield, exiling Barren Glory.
Cast Apocalypse by paying ({2} magic symbol) ({R} magic symbol) ({R} magic symbol) ({R} magic symbol) , exiling all permanents and causing you to discard your hand.
Detention Sphere triggers, returning Barren Glory to the battlefield.
Proceed to your next turn.
At the beginning of your upkeep, Barren Glory triggers, causing you to win the game.