When Recep Tayyip Erdogan, the Turkish president, sought to fend off a coup attempt two years ago, he appealed to his supporters via FaceTime, the Apple video chat app.

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.