If you use HomeKit you can use a Homekit automation to do geofencing along with Webhooks in IFTTT. I use geofencing to turn off my cameras in the house when someone arrives and back on when we leave. Here is a link to my post last year that explains how to accomplish this.