"Boycott Apple until such time as they give that information," Trump said at a campaign event in Pawleys Island, South Carolina.
"It just occurred to me."
Trump made the off-the-cuff comment at a town hall-style event at a country club in Pawleys Island, a day before that state's Republican presidential nominating contest.
Trump's spokeswoman said the real estate mogul does not use an iPhone.
"I use both iPhone & Samsung. If Apple doesn't give info to authorities on the terrorists I'll only be using Samsung until they give info," Trump wrote on Twitter on Friday.
His latest comments came as the US Department of Justice filed a motion seeking to force Apple to comply with a judge's order for the company to unlock the iPhone belonging to one of the San Bernardino shooters, portraying the tech company's refusal as a "marketing strategy."
The filing increased tension in a showdown between the Obama administration and Silicon Valley over security and privacy.
The government has said the couple were sympathisers of Islamic State militants and wanted to open the
phone to find out more about possible connections and contacts.
While he was still speaking, Trump's campaign posted on his Twitter handle (@real Donald Trump) from an iPhone, with the timestamp labeled "via Twitter for iPhone."
Trump later posted on Twitter that he used both an iPhone and a Samsung.
"If Apple doesn't give the information to the authorities on the radical Islamic terrorists, I'll only be using a Samsung - until such time as they give the information," Trump tweeted.
"Hopefully others will follow suit. Our country needs and should demand security. It is time to get tough and be smart!"
Trump has been a frequent critic of Apple and called on the company to make more products in the US.
It was not the first time Trump has cried "boycott!" In November, he called for a Starbucks boycott because the coffee company's red holiday cups lacked Christmas-related decorations.
He has repeatedly urged people not to shop at Macy's after the department store dropped his signature business clothing line because of comments he made insulting Mexicans.