NEW YORK ( TheStreet) -- AT&T ( T) narrowed its loss in the fourth quarter as Apple's ( AAPL) iPhone helping generate record smartphone sales. The telecom company posted a loss of 68 cents a share on a net loss of $3.9 billion, compared with a loss of $1.12 a share on a net loss of $6.7 billion a year earlier. Excluding the effect of charges related to benefit plans, its divested Advertising Solutions business and Hurricane Sandy, AT&T earned 44 cents a share, up from 40 cents a year earlier. Analysts surveyed by Yahoo! Finance were looking for earnings of 46 cents a share. During the fourth quarter, AT&T brought in revenue of $32.6 billion, an increase of 0.2% and above analysts' forecast of $32.22 billion. AT&T shares rose 0.4% to $33.9 in extended trading. Excluding revenue from Advertising Solutions and the impact from the hurricane in November, revenue increased 2.8%. "We had an excellent 2012," said AT&T CEO Randall Stephenson, in a statement released after the market close. "We grew revenues, increased adjusted earnings per share by 8.5% and generated cash from operations at record levels. We used this cash to invest aggressively in the future of our business and returned $23 billion to shareowners through dividends and share repurchases." The company's total wireless revenue, which includes equipment sales, rose 5.7% to $17.6 billion. AT&T added 1.1 million wireless subscribers during the quarter, bringing the total to 107 million. This included 780,000 postpaid net adds, AT&T's biggest gain in 12 quarters. The Dallas firm sold a record 10.2 million smartphones and activated a record 8.6 million iPhones. AT&T also had its best-ever sales quarter for Android phones, but confirmed that record smartphone sales hurt margins. Fourth-quarter wireless operating income margin was 14.5% compared with 15.5% a year earlier. AT&T's fourth-quarter wireline revenue was $14.9 billion, down 0.5% from a year earlier but up 0.7% sequentially. In 2013, AT&T expects revenue growth to exceed 2% and to deliver earnings per share growth in the upper-single digits or higher. Rival Verizon ( VZ) reported a wider fourth-quarter loss earlier this week, weighed down by pension and restructuring charges. -- Written by James Rogers in New York. Follow @jamesjrogers >To submit a news tip, send an email to: firstname.lastname@example.org.