Apple Inc. proved Tuesday there is still demand for its venerable iPhone in the face of stiff competition, though it is running into trouble convincing consumers to buy its other gadgets.

Apple and its rivals have faced increasing concern that the consumer electronics industry's boom over the past few years has started to slow. That phenomenon was evident in Apple's latest quarter, when it sold 20% more iPhones than a year earlier,...