Well, surely there are sentences in which you have a direct object and an indirect object, then the indirect object takes Dative.
So "him" is the indirect object here (the receiver of the action of giving) and "a phone" is the direct object (the received thing).
Now, my understanding is that in English an indirect object can only exist if there's also a direct object, and that's not the only situation in Polish where we use Dative. So to say that "indirect object = Dative" is a bit of a simplification, cause there will be other situations, like the verb "pomagać" (to help). Basically... think of "Dative -> receiver of an action".