# How to check if the Square Stand is connected in iOS programmatically?

**URL:** <https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972>\
**Category:** Questions\
**Tags:** square-reader, mobile-payments-sdk\
**Created:** [December 6, 2024, 12:09pm UTC](https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972 "2024-12-06T12:09:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ketanTOT](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@ketanTOT](https://developer.squareup.com/forums/u/ketanTOT)\
**Post date:** [December 6, 2024, 12:09pm UTC](https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972/1 "2024-12-06T12:09:19Z")

</div>

How to programmatically get the connected device specifically Square Stand using the Square Mobile Payments SDK on iOS.

Currently I’ve code added but it is not functioning. FYI: Square Stand is already connected via USB but in the app in code it is not showing connected through below code. See my code snippet.

```auto
let connectedReaders = [ReaderInfo] { MobilePaymentsSDK.shared.readerManager.readers }

if connectedReaders.count > 0 {
  if self.isReaderConnected{
    if reader.model == .stand {
      //We are opening `openCheckoutPage` from here.
    }  
  }
}

```

FYI: I’ve migrated to Mobile Payment SDK already and I’m using `2.0.0.beta3` version.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 6, 2024, 12:09pm UTC](https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972/2 "2024-12-06T12:09:45Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Configure the Reader SDK on iOS for Square Stand](https://developer.squareup.com/docs/reader-sdk/cookbook/square-stand)**
>
> Configure the Reader SDK on iOS to use Square Stand to swipe payments and to connect a Contactless and Chip Reader using USB.

> **[Square Developer Documentation](https://developer.squareup.com/docs/reader-sdk/build-on-ios)**
>
> Build with the Reader SDK on iOS to process in-person payments with Square hardware.

> **Additional Documentation**
>
> [Build on iOS: Point of Sale API](https://developer.squareup.com/docs/pos-api/build-on-ios)  
> [Connect a Contactless Reader](https://developer.squareup.com/docs/reader-sdk/cookbook/contactless-reader)  
> [Reader SDK Quickstart](https://developer.squareup.com/docs/reader-sdk/quick-start/start)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 6, 2024, 6:17pm UTC](https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972/3 "2024-12-06T18:17:28Z")

</div>

To detect if a [Square Stand](https://developer.squareup.com/docs/mobile-payments-sdk/ios/square-stand) is connected, you need to add specific key-value pairs to your Info.plist file. The Mobile Payments SDK on iOS automatically detects if a Square Stand is connected and uses it to accept swiped credit card payments. However, please note that other than Square Readers, the Mobile Payments SDK cannot interact with any printers, cash drawers, barcode scanners, or other peripherals connected through Square Stand.

_This answer was reviewed by @Bryan-Square._

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [December 6, 2024, 9:28pm UTC](https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972/4 "2024-12-06T21:28:40Z")

</div>

At what point in your code are you using this logic? Is it within a `ReaderObserver`? Or right before you call start payment? When do you take a payment currently, is the stand recognized and can you swipe/tap/dip on it? 🙂

---

<div class="post-metadata">

**Author:** ![ketanTOT](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@ketanTOT](https://developer.squareup.com/forums/u/ketanTOT)\
**Post date:** [December 9, 2024, 4:28am UTC](https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972/5 "2024-12-09T04:28:14Z")

</div>

I’ve added all the required key value pari in `info.plist` file.

---

<div class="post-metadata">

**Author:** ![ketanTOT](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@ketanTOT](https://developer.squareup.com/forums/u/ketanTOT)\
**Post date:** [December 9, 2024, 4:47am UTC](https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972/6 "2024-12-09T04:47:05Z")

</div>

We are checking it when payment starts. The stand is recognized. We can do the payment. It is only not getting appear on the `self.readers`.

Let me share a small video recording I’ve. FYI: Please check the top right corner the battery is charing because stand is connected via USB.

[See the screen recording](https://drive.google.com/file/d/1TCZJGSXfr1mvQS9-SYRlsUD46VMUeGUC/view?usp=sharing)

Please suggest me a good way to accomplish this. Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![ketanTOT](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@ketanTOT](https://developer.squareup.com/forums/u/ketanTOT)\
**Post date:** [December 9, 2024, 11:48am UTC](https://developer.squareup.com/forums/t/how-to-check-if-the-square-stand-is-connected-in-ios-programmatically/19972/7 "2024-12-09T11:48:59Z")

</div>

```auto
extension SquareReaderManager : ReaderObserver {

    func readerWasAdded(_ readerInfo: ReaderInfo) {
        if readerInfo.model == .stand {
            self.isSquareStandConnected = true
        }
    }

    func readerWasRemoved(_ readerInfo: ReaderInfo) {
        if readerInfo.model == .stand {
            self.isSquareStandConnected = false
        }
    }

}

```

So we have added our custom flag in the Observer, But the question is now that if the Square Stand is already connected then will this observer re-call once the app starts?
