Friend: companion, soul mate, intimate, confidante, confidant, familiar, alter ego, second self, playmate, playfellow, classmate, schoolmate, workmate; ally, associate; sister, brother; best friend, kindred spirit, bosom buddy, bosom friend; informal pal, chum, sidekick, crony, main man, mate, buddy, bud, amigo, compadre, homeboy, homegirl, homie;
Phone: telephone, cell phone, cell, car phone, cordless phone, speakerphone; extension; informal blower, horn.
Lonely: isolated, alone, lonesome, friendless, with no one to turn to, forsaken, abandoned, rejected, unloved, unwanted, outcast; gloomy, sad, depressed, desolate, forlorn, cheerless, down, blue. ANTONYMS popular.
So, no, my iPhone is not my friend. It's a nice device, I like it as a device, but I have no emotional connection to it nor it to me.