Declining iPhone sales make dent in Apple profits