Iran's president apologises for “shortcomings” after the recent crackdown and calls for unity in the face of external threats.