The point of a gun is that it's a simple machine that works when you need it. Geofenced microcontroller safeties somewhat compete with this and would not be a popular idea.
I’ve seen plenty of sci-fi that leads me to believe that the future of this is some sort of finger print reader on the trigger that only allows the designated shooter to shoot.