Apple CEO Tim Cook said trade tensions between the U.S. and China have improved since late December, giving the tech giant "some optimism."

"Of course you don't know what will continue, but I would also point out that seems to map to trade tension as well, that there is a bit more optimism in the air in January, or certainly I feel that anyways," he told CNBC on Tuesday. "I'm encouraged by the comments coming out of both countries."

Apple reported profits of $4.18 a share for its December quarter, a penny above the average analyst forecast as tracked by Refinitiv. Revenue of $84.3 billion also slightly beat expectations. But projections for the second quarter are lower than anticipated, particularly in sales of iPhones.