The Mechaber rules, based on a Gemara in Brachos 58, that if someone sees a close friend for the first time in thirty days, a Shehechiyanu should be recited.
If the acquaintance had not been seen in over a year a Bracha of Mechayei Hamaisim should be recited. Mishna Berura explains the reason for this second Bracha. Every person is judged on Rosh Hashanah and Yom Kippur. If someone lived through a year, he was obviously granted life on the previous Yom Kippur. For this reason the Bracha is recited.
Although this may seem contradictory to the reasoning mentioned above, Reb Shlom Zalman points out that one who does not see a person that requires the recitation of this Bracha within a twelve month period, but Rosh Hashana did not pass between visits, should still recite the Bracha. This can happen in a leap year.
Reb Shlomo Zalman also writes that it is not clear exactly what type of joy one needs to feel in order to recite this Bracha. Because of this, one should only recite this Bracha when seeing close family.
The Stiepler writes that if the person is reachable in dire circumstances, the Bracha should not be said. We do not look it this as if the friend was not seen, rather we say the acquaintance was accessible, just there was no need for communication.

