“We’ve seen your tweets and would like to be friends rather than foes,” wrote Scott Fischer, the company’s chief executive. “After all, we believe in connecting the dots.”

Mr. Fischer also offered to send the White House free Dippin’ Dots, saying the company could “afford to treat the White House and press corps to an ice cream social” and promising that all their favorite flavors could be amply provided.

All joking aside, Mr. Trump has used his large social media platform — more than 21 million followers on his personal Twitter account — to bash corporations, including an attack on Boeing in December that sent its stock price down roughly 1 percent.

Perhaps with that in mind, Mr. Fischer also took pains to emphasize that Dippin’ Dots was a successful and growing company based in the United States.

“As you may or may not know, Dippin’ Dots are made in Kentucky by hundreds of hardworking Americans in the heartland of our great country,” he wrote. “That means we’re creating jobs and opportunities. We hear that’s on your agenda, too.”

Billie Stuber, a spokeswoman for the company, said it responded because “it’s certainly easy to get pulled into the wrong conversation, inadvertently.”

Ms. Stuber said the company wanted “to remain transparent and authentic with our message” in response to Mr. Spicer’s online negativity.