A man has been arrested and charged after he attempted to track his ex-girlfriend's whereabouts via an Apple AirTag.