# iOS: Swift: MobilePaymentsSDK: Payments screen would not get presented for card reader swipe

**URL:** <https://developer.squareup.com/forums/t/ios-swift-mobilepaymentssdk-payments-screen-would-not-get-presented-for-card-reader-swipe/22625>\
**Category:** Questions\
**Tags:** sdk, mobile-payments-sdk\
**Created:** [June 3, 2025, 5:38am UTC](https://developer.squareup.com/forums/t/ios-swift-mobilepaymentssdk-payments-screen-would-not-get-presented-for-card-reader-swipe/22625 "2025-06-03T05:38:26Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![iamchandra](https://avatars.discourse-cdn.com/v4/letter/i/46a35a/32.png) [@iamchandra](https://developer.squareup.com/forums/u/iamchandra)\
**Post date:** [June 4, 2025, 6:53pm UTC](https://developer.squareup.com/forums/t/ios-swift-mobilepaymentssdk-payments-screen-would-not-get-presented-for-card-reader-swipe/22625/5 "2025-06-04T18:53:15Z")

</div>

Thank you for your reply @Bryan-Square

The suggested usage of the methods from SDK might have changed because I get the below errors. Could you please check?

* * *

### Compilation Error - 1

> [@Bryan-Square](#):
>
> ```auto
> // Verify SDK initialization
> guard MobilePaymentsSDK.shared.isInitialized else {
> print("Square SDK not initialized")
> return
> }
> 
> ```

![image](https://global.discourse-cdn.com/square/optimized/2X/7/769858036e8258056b07427c9feda9a2d5a900af_2_690x45.png)

* * *

### Compilation Error - 2

> [@Bryan-Square](#):
>
> ```auto
> do {
> try MobilePaymentsSDK.shared.initialize(applicationLaunchOptions: nil)
> print("Square SDK initialized successfully")
> } catch {
> print("Failed to initialize Square SDK: \(error)")
> }
> 
> ```

 ![image](https://global.discourse-cdn.com/square/original/2X/9/95ebeed08f8035ea74691dfe3c0f6fe7bc6dbb28.png)

[quote=“Bryan-Square, post:4, topic:22625”]

* * *

### Compilation Error - 3

This error occurs when I add the `block` to the `startPayment` method that has check for the `result`.

> [@](#):
>
> ```auto
> // Start payment with completion handler
> DispatchQueue.main.async {
> MobilePaymentsSDK.shared.paymentManager.startPayment(
> paymentParams,
> promptParameters: paymentPromptParameters,
> from: viewController,
> delegate: vc
> ) { result in
> switch result {
> case .success:
> print("Payment screen presented successfully")
> case .failure(let error):
> print("Failed to present payment screen: \(error)")
> }
> }
> }
> 
> ```

 ![image](https://global.discourse-cdn.com/square/original/2X/9/980db568bf8b9b024f62eb7923fd3f42326f5875.png)

* * *

I am able to add “Near Field Communication Tag Reading” capability. But not “Payment Processing” as such capability is not listed when I searched.

> [@Bryan-Square](#):
>
> 1. **Add Required Capabilities** In Xcode:
> 
> - Enable “Near Field Communication Tag Reading” capability
> - Enable “Payment Processing” capability

 ![image](https://global.discourse-cdn.com/square/original/2X/a/a356c0a0ab7b847f6a878176f067f535b73c9e80.png)

Thank you much

---

_[View the full topic](https://developer.squareup.com/forums/t/ios-swift-mobilepaymentssdk-payments-screen-would-not-get-presented-for-card-reader-swipe/22625)._
