The error message you received indicates that the authorization code has expired. The OAuth 2.0 specification requires that an authorization code can only be used once to redeem an access token. If you attempt to use the same authorization code multiple times, you will receive an error similar to the one you encountered. It's possible that the authorization code you received on the iOS app has already been used to redeem an access token, which is why it's no longer valid.
Additionally, the redirect URI configured in the iOS app may not match the one registered in the Azure portal, which could also cause the error. Make sure that the redirect URI configured in your iOS app matches the one registered in the Azure portal.
References: