Despite facing stiff competition from Samsung and cheap smartphone makers, Apple finally inks a deal to sell the iPhone in China.