On Tuesday, though, he turned against Apple, delivering a nationalist broadside in calling for a boycott of American electronics products, the latest salvo in a widening dispute between Washington and Ankara.
The tension between the two countries initially centered on the detention of Andrew Brunson, an American pastor, but it has since expanded considerably, heightening trade tensions and raising fears about the possible effects on other emerging markets.
The clash has coincided with a worsening economic crisis in Turkey. The country's currency, the lira, has fallen sharply, dropping more than 25 percent in the past week to a record low, though it recovered somewhat on Tuesday. Inflation, meanwhile, is accelerating and investors — fearful of mismanagement as Mr. Erdogan takes an increasingly active role in the economy — have sold off Turkish debt.
Undeterred, the Turkish leader has railed against the United States and blamed foreigners for the dire state of the economy.
''Every product that we buy in foreign currency from outside, we will produce them here and sell abroad,'' Mr. Erdogan said during a speech in Ankara, drawing applause and cheers. ''We will boycott the electronics products of the U.S.''
''If they have the iPhone, there is Samsung'' as an alternative, he continued, referring to Apple's principal rival in the smartphone business.
More from The New York Times:
How a Fake Group on Facebook Created Real Protests
Uber Picks N.S.A. Veteran to Fix Troubled Security Team
For Online Daters, Women Peak at 18 While Men Peak at 50, Study Finds. Oy.
The comments by the Turkish leader were particularly remarkable given that he and several of his top ministers are frequently seen with iPhones. In mid-2016, as he battled the coup attempt, Mr. Erdogan used FaceTime to call for his supporters to take to the streets.
His speech on Tuesday nevertheless largely reiterated many of the nationalist remarks he has made in recent days, seeking to rally support against American sanctions and other pressure.
''The Turkish nation has many times shown that if its independence and its future was at risk, it would put forward its life, its property and all its wealth,'' Mr. Erdogan said. ''We will stand against the dollar, currency rates, inflation, interest rates. I believe in my nation.''
He then repeated his call for Turks to trade in their dollars for lira, to help shore up the currency. ''Exchanging the dollar immediately to protect the honor of the Turkish lira, this would be the best answer,'' he said.
Though Turkey is a relatively small economy in the global context, investors have been fearful of the wider consequences of an economic crisis there. Analysts have voiced concern that worsening conditions in the country could force traders to pull money from emerging markets and noted that European banks have investments in Turkey that could be at risk.
Mr. Erdogan's heavy involvement in managing the country's economy, which has resulted in the appointment of a relative as a key minister and the erosion of the independence of the central bank, has added to the concerns.
Many in Turkey, however, have stood by him.
One barber shop in the northern Turkish province of Ordu responded to United States sanctions imposed over the detention of the American pastor by refusing to carry out haircuts that residents associate with the United States.
''We do not do American shaves,'' a sign outside the hair salon read, referring to a common hairstyle in Turkey in which the neck is trimmed closely, but hair at the top of the head is kept longer.