---
title: XCTIssueReference
framework: xctest
role: symbol
role_heading: Class
path: xctest/xctissuereference
---

# XCTIssueReference

An object that represents a test failure, and includes source code call stacks for test reporting and investigation.

## Declaration

```swift
class XCTIssueReference
```

## Overview

Overview In Swift, XCTIssueReference bridges to the Objective-C class XCTIssue. When you need reference semantics in your Swift test handling, use XCTIssueReference; otherwise, use the Swift value semantic XCTIssue. In Objective-C, XCTIssue supports bridging to Swift with XCTIssueReference.

## Topics

### Initializers

- [init(type:compactDescription:)](xctest/xctissuereference/init(type:compactdescription:).md)
- [init(type:compactDescription:detailedDescription:sourceCodeContext:associatedError:attachments:)](xctest/xctissuereference/init(type:compactdescription:detaileddescription:sourcecodecontext:associatederror:attachments:).md)
- [init(type:compactDescription:detailedDescription:sourceCodeContext:associatedError:attachments:severity:)](xctest/xctissuereference/init(type:compactdescription:detaileddescription:sourcecodecontext:associatederror:attachments:severity:).md)
- [init(type:compactDescription:severity:)](xctest/xctissuereference/init(type:compactdescription:severity:).md)

### Issue Types

- [XCTIssueReference.IssueType](xctest/xctissuereference/issuetype.md)

### Issue Details

- [type](xctest/xctissuereference/type.md)
- [compactDescription](xctest/xctissuereference/compactdescription.md)
- [detailedDescription](xctest/xctissuereference/detaileddescription.md)
- [sourceCodeContext](xctest/xctissuereference/sourcecodecontext.md)
- [associatedError](xctest/xctissuereference/associatederror.md)
- [attachments](xctest/xctissuereference/attachments.md)

### Instance Properties

- [isFailure](xctest/xctissuereference/isfailure.md)
- [severity](xctest/xctissuereference/severity-swift.property.md)

### Enumerations

- [XCTIssueReference.Severity](xctest/xctissuereference/severity-swift.enum.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [XCTMutableIssue](xctest/xctmutableissue.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSMutableCopying](foundation/nsmutablecopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Test Failures

- [XCTIssue](xctest/xctissue-swift.struct.md)
- [XCTMutableIssue](xctest/xctmutableissue.md)
- [XCTSourceCodeContext](xctest/xctsourcecodecontext.md)
- [XCTSourceCodeFrame](xctest/xctsourcecodeframe.md)
- [XCTSourceCodeLocation](xctest/xctsourcecodelocation.md)
- [XCTSourceCodeSymbolInfo](xctest/xctsourcecodesymbolinfo.md)
