Apple said on Tuesday its computers were attacked by the same hackers that targeted Facebook.
The iPhone-maker said a small number of its machines were affected, but they were isolated from the main. There was "no evidence" of data theft.
Last week Facebook said it had traced a cyber attack back to China.
Apple said it would release a software update to protect customers against the software used in the attack.