Yes, but Erdogan was/is Obama’s bestest buddy.
And they are (were?) a NATO ally.
They both wanted the caliphate. They just haven’t decided which of them should be the caliph.