Apple, of course, is uncertain, as Project Titan has vacillated over the years. As a Tesla shareholder, I consider Apple the biggest threat IF/WHEN they deliver an EV smartcar. While I have my doubts about their program, I am not willing to rule them out yet.
Also, IMO, there remains the possibility of some kind of partnership/merger between Apple and Tesla, however unpopular this maybe (not a fan of this, but just pointing out the possibility -- I mean, if I was TIm Cook, I would seriously be considering it. Of course, Musk may have zero interest in this, but who knows; he would likely have to be made CEO). Apple has bid for Tesla in the past I believe, and now, as Tesla appears to be righting its ship and perched for significant growth, it is quite possible that Apple maybe taking a glance in its direction once again.
The other side of the coin is that Apple has almost always developed in house expertise rather than buy from outside, and Tesla would be a very large, almost too difficult, organization to integrate into Apple.
One thing for sure, if Apple did come out with a car, that would be some crazy competition. In the desktop or smartphone space, Apple was always viewed as the cool, slick, and fun products, while Windows and Android was more the nerdy, boring, or 9to5, suit and tie products. And this defined the competitive dynamics of the marketplace. But imagine if you had two Apple like companies competing against each other in desktops and smartphones. What would that be like?