Apple Inc. reported selling fewer iPhones than projected at year-end and said revenue in the current quarter might decline, sending its shares down sharply in after-hours trading.

The results highlighted new dynamics and intensifying competition in the smartphone market. Apple continues to target the market for high-end phones, even as demand accelerates for lower-cost models, particularly in emerging markets. But Apple is resisting...