<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TipKit",
  "identifier" : "/documentation/TipKit/Tips/hideTipsForTesting(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "TipKit"
    ],
    "preciseIdentifier" : "s:6TipKit4TipsO04hideC10ForTestingyySayAA0A0_pXpGFZ"
  },
  "title" : "hideTipsForTesting(_:)"
}
-->

# hideTipsForTesting(_:)

Hide specified tips regardless of their display rule eligibility for UI testing without certain tips.

```
static func hideTipsForTesting(_ tips: [any Tip.Type])
```

## Parameters

`tips`

Array of tips to hide regardless of their display rule eligibility.

## Overview

This function can also be called with the launch argument `-com.apple.TipKit.HideTips FindTrailheadTip,SlopeProfileTip`.

TipKit’s display override testing functions have the following precedence:

|Priority|Testing function                                                            |
|--------|----------------------------------------------------------------------------|
|First   |``doc://com.apple.TipKit/documentation/TipKit/Tips/showTipsForTesting(_:)`` |
|Second  |``doc://com.apple.TipKit/documentation/TipKit/Tips/hideTipsForTesting(_:)`` |
|Third   |``doc://com.apple.TipKit/documentation/TipKit/Tips/showAllTipsForTesting()``|
|Fourth  |``doc://com.apple.TipKit/documentation/TipKit/Tips/hideAllTipsForTesting()``|

```swift
import SwiftUI
import TipKit

@main
struct LandmarkTips: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }

    init() {
        setupTips()
    }

    // Configure tips in the app.
    func setupTips() {
        do {
            #if DEBUG
            Tips.hideTipsForTesting([FindTrailheadTip.self, SlopeProfileTip.self])
            #endif

            try Tips.configure()
        }
        catch {
            print("Error initializing TipKit \(error.localizedDescription)")
        }
    }
}
```

---

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)