Apple reported stronger-than-anticipated iPhone sales on Thursday, beating Wall Street’s low expectations for the second quarter.