<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/CommandLine/unsafeArgv",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s11CommandLineO10unsafeArgvSpySpys4Int8VGSgGvpZ"
  },
  "title" : "unsafeArgv"
}
-->

# unsafeArgv

Access to the raw argv value from C.

```
static var unsafeArgv: UnsafeMutablePointer<UnsafeMutablePointer<Int8>?> { get }
```

## Discussion

The value of this property is a `nil`-terminated C array. Including the
trailing `nil`, there are [`argc`](/documentation/Swift/CommandLine/argc) `+ 1` elements in the array.

> Note: Accessing the argument vector through this pointer is unsafe.
> Where possible, use ``doc://com.apple.Swift/documentation/Swift/CommandLine/arguments`` instead.

---

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)