stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.08k stars 976 forks source link

[BUG] SwiftUI PaymentSheet seems to require camera althoug is not enable resulting on invalid binary on the AppStore #1944

Open unxavi opened 2 years ago

unxavi commented 2 years ago

Summary

We are integrating Stripe SDK to collect payments on our app for services consumed outside of the app. The app is develop on SwiftUI and we are using the build-in UI PaymentSheet.

We are receiving the following message from the AppStore Connect:

ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSCameraUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

Best regards,

The App Store Team

According to the readme of Stripe:

PaymentSheet offers built-in card scanning. To enable card scanning, you'll need to set NSCameraUsageDescription in your application's plist, and provide a reason for accessing the camera (e.g. "To scan cards"). Card scanning is supported on devices with iOS 13 or higher.

We are not interested on card scanning, so we are no setting up the description. But that only seems to work to hide the scanning button, the AppStore connect rejects the build and marks it as invalid binary with the reason described above.

Code to reproduce

N/A

iOS version

We are build for iOS > 14.0

Installation method

SPM

SDK version

21.13.0

Other information

N/A

davidme-stripe commented 2 years ago

Hello @unxavi, very sorry for the inconvenience! We're working on separating this code into an optional module to prevent this App Store notification from happening in the future. For now, setting an NSCameraUsageDescription in your Info.plist (and a localized version in your InfoPlist.strings) should not have any other impact on your app, and usage of the camera will not appear on your App Store listing.

If you'd like a way to disable the "scan card" button in PaymentSheet, let us know — we can look into adding this as a configuration option.

unxavi commented 2 years ago

Hi @davidme-stripe

Thanks for your answer. Is not an issue to have active the feature to scan cards in our app at this moment. We wanted to simplify the interaction of our users with Stripe at the moment and not have it, but seeing that it got rejected we went ahead an enable it.

Maybe as a first step it should be documented that is needed, because the way the docs are written it seems like is an optional feature, there is bug on the SDK and it's not optional, and the shock comes when you upload the app to the AppStore after passing all the QA checks.

Thanks a lot again for your time.

randeep-ot commented 2 years ago

@davidme-stripe Do you have a timeframe of when the separation might get implemented so that we don't need to add the permission?