Implementing setLocation for iOS