By Benjamin Pimentel, MarketWatch

SAN FRANCISCO (MarketWatch) -- Apple and Twitter shares rallied to give the technology sector a boost Tuesday, even as the group was weighed down by slumping shares of Microsoft and Google.

Apple (AAPL) rose 1.3% to $637.01, a day after the iPhone maker unwrapped new software initiatives at its developer conference in San Francisco.

Susquehanna analyst Chris Caso raised his price target for Apple to $725 from $650, and said the company's software announcements are "mostly evolutionary changes that continue to strengthen the Apple ecosystem."

Twitter (TWTR) gained 2.4% to $32.53, as the social network's stock turned positive for the week. Twitter is still down nearly 50% year-to-date.

Chip stocks also were mostly up, with shares of Broadcom Corp. (BRCM) gaining nearly 2% and Intel Corp. (INTC) up a fraction. The Philadelphia Semiconductor Index (SOX) edged higher by 1%.

But the Nasdaq Composite Index (RIXF) was mostly flat, last down 2 points, at 4,235. Among the notable decliners were Google Inc.(GOOGL) and Microsoft Corp.(MSFT), each down 1%.

More must-read stories from MarketWatch:

Apple rolls our a more combative CEO

In Silicon Valley, even the young turn to cosmetic surgery to looks smart

Subscribe to WSJ: http://online.wsj.com?mod=djnwires