Apple ( AAPL - Get Report) collected favorable reviews from analysts and investors Wednesday after the company delivered strong iPhone and Mac sales in the June quarter.

Analysts pointed to Apple's iPhone sales momentum and the surprisingly wider profit margins as positive signs that the company is delivering hot products that defy a cold economy. Apple shares were up 4% Wednesday in the wake of Tuesday's earnings report.

"Apple continues to buck the trend," UBS analyst Maynard Um wrote in a research note Wednesday, referring to the company's ability to increase sales and profits despite an economic slowdown.

Mac sales reversed a slide in the March quarter by growing 4% by the end of June. And Apple told analysts on an earnings conference call that they were working with phone companies to expand the iPhone's reach.

Apple Tops Shopping Lists

The new iPhone 3GS and its older $99 3G helped boost sales, but Apple did not share any view on which phone was the better seller. On an earnings call with analysts, COO Tim Cook said that the company was having trouble supplying enough 3GS models to keep up with demand.

Cook also laid out his plans for the iPhone's world dominance. He said the company planned to be in China with a special version of the iPhone within a year.

And here in the U.S., though some iPhone customers have been vocal about the poor quality of their AT&T ( T - Get Report) network service, the company said that while it was "very happy" with its exclusive partnership with AT&T.

That agreement expires in the second quarter of next year, and there has been speculation that Apple could replace AT&T with Verizon ( VZ - Get Report).

Later in the call, Cook said the company was working to expand iPhone distribution. "We recognize there are some large markets that aren't covered," referring in part presumably to the other half of the U.S. market controlled by Verizon.

With the iPhone's contribution to the top line, Apple's gross margins widened to 36.3%, surpassing the 34.4% analysts were looking for. The current September quarter may be more of a drag on margins as Apple offers more back-to-school Mac discounts.

The Cupertino, Calif.-based gadget shop posted pro forma earnings of $1.35 a share, 13% above the adjusted profit of $1.19 a share in the year-ago quarter, and beating the $1.17 that analysts were looking. Sales for Apple's fiscal third quarter ended last month were $8.34 billion, 12% higher than the $7.45 billion level a year ago and better than the $8.2 billion that analysts had anticipated.

"We're making our most innovative products ever and our customers are responding," CEO Steve Jobs said in a press release.
Steve Jobs: The Man, the Myth, the Turtleneck

Mac sales hit 2.6 units and 4% volume growth in the quarter, but revenue from the computer division fell 8% from year-ago levels as people bought lower-priced machines.

Looking ahead, Apple forecast September earnings in a range between $1.18 a share to $1.23 a share on sales of $8.7 billion. Apple is known for its conservative guidance. Analysts were looking for earnings of $1.30 a share on $9.5 billion in sales for the September quarter.

Apple relieved some concerns among investors that the iPhone's popularity may be peaking at a time when new smartphones from Research In Motion ( RIMM, Motorola ( MOT and Palm ( PALM are invading the market.

Tech investors also worry that Apple is more reliant on consumer spending than peers like RIM or Hewlett-Packard ( HPQ - Get Report) and Dell ( DELL. Consumers facing rising unemployment and wage stagnation aren't all that financially confident these days.

Today, however, Apple is enjoying a victory lap, having outpaced the recession for now.