The Iranians detained some Americans who strayed into their waters. It was entirely appropriate for them to do so, provided that they treated those sailors with respect and proper care. It appears they did so, and the sailors were promptly returned to American jurisdiction through diplomatic means. This is what happens when a powerful nation acts like an adult and actually talks directly with another nation which it considers to be an "enemy."
This relationship with Iran and the opening of Cuba are, in my opinion, the only two things which Obama can properly claim as true successes of his time in office. John Kerry deserves high praise, more so than Obama actually, for the Iranian agreement.
One can only hope that the next administration will continue and build on these initiatives, but the rhetoric from both sides gives little hope that such will be the case.