Set location on an iOS Simulator and full-reset before/after each test case

Could you share the code that you use to set location to none and then custom? I know the custom location, but not none. Thanks!