<!--
{
  "availability" : [
    "Xcode: 16.3.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCUIAutomation",
  "identifier" : "/documentation/XCUIAutomation/XCUILocation/init(location:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "XCUIAutomation"
    ],
    "preciseIdentifier" : "c:objc(cs)XCUILocation(im)initWithLocation:"
  },
  "title" : "init(location:)"
}
-->

# init(location:)

Initializes a proxy that simulates latitude, longitude, and course information based on the location object you provide.

```
init(location: CLLocation)
```

## Parameters

`location`

The <doc://com.apple.documentation/documentation/CoreLocation/CLLocation> object that contains the latitude, longitude, and course information for this proxy.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)