Apple said a global chip shortage that has bit into its ability to sell Macs and iPads will start to affect iPhone production too.