<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INCancelRideIntent/init(rideIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INCancelRideIntent(im)initWithRideIdentifier:"
  },
  "title" : "init(rideIdentifier:)"
}
-->

# init(rideIdentifier:)

Initializes the intent object with the specified ride identifier.

```
init(rideIdentifier: String)
```

## Parameters

`rideIdentifier`

The unique string that you use to identify the ride.

## Return Value

An initialized intent object or `nil` if the object could not be created.

## Discussion

Normally, you do not create instances of this class yourself. Instead, SiriKit creates instances when the user tries to cancel a ride. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.

---

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)