The Iran deal was an amazing bit of negotiation, the US paid Iran their own money in exchange for getting UN inspectors on the ground.
Trump undermined it as part of his campaigning and one of his first acts in office was try and get it overturned (which he couldn't legally as Iran was complying with the terms).
If he'd worked with them in good faith who knows what would have happened, as it is Iran has had ten months to work on whatever they've been working on knowing that the deal was doomed.
Of course it wasn't perfect, the UN inspectors were frustrated that they didn't have the access that they needed, but having people on the ground and having people at the table talking to you is much better than embarking in a flame war on twitter.