Apple just hit a $4 trillion market value for the first time as strong iPhone 17 sales propel its stock to new highs.