This change adds analytics to the IDV sheet. Specifically, we're logging the following events:
- `stripeios.idprod.verification_sheet.presented` - the sheet is presented to the end-user
- `stripeios.idprod.verification_sheet.closed` - the sheet is closed by the end-user. Also contains a `session_result` to indicate whether the user successfully completed the IDV flow or closed the sheet to cancel out of the flow.
- `stripeios.idprod.verification_sheet.failed` - the sheet failed to open. Also contains an `error_dictionary` containing the error code, domain, and userInfo dictionary for the error that caused the sheet to fail to open.
Added IdentityVerificationSheet to the Stripe SDK.
Note that Identity-specific classes have been marked as only available for iOS 14.3+. This is because WKWebView can only access the camera on iOS 14.3 and higher.
* Add revolut iDEAL bank, remove moneyou
* Refactor Intent paymentMethodTypes
* Actually properly handle all save-related scenarios
* Turn on bancontact, sofort
* Fix test
* Add pay w/ setup mode to playground
* Improve PaymentSheetTest
* Dont show PM types that require returnURL on the Add screen if configuration.returnURL is not set, since they can never succeed.
* disable sofort, bancontact
* Renamed SaveMode cases
Created a new `pod_tools.rb` script which has the following commands:
- `push`: Pushes all podspecs to `trunk` in order by dependencies.
- `add-all-owners POD`: Adds all the owners of the `Stripe` pod as owners of `POD`.
- `add-owner OWNER-EMAIL`: Adds the registered user specified with `OWNER-EMAIL` as an owner of all pods in this repo. _(Used for onboarding)_
- `remove-owner OWNER-EMAIL`: Removes the user specified with `OWNER-EMAIL` from being owner of all pods in this repo. _(Used for offboarding)_
- Migrated `NSError.stp_unexpectedErrorMessage()` from `Stripe` -> `StripeCore`
- Went through Localization process
- Fixed test snapshots that contained updated localization for zh-Hans
- `StripeCoreTestingUtils` now uses `StripeiOS-Debug.xcconfig` and `StripeiOS-Release.xcconfig` for its build settings.
- Now including `StripeCoreTestingUtils` in `StripeCoreTests` by Linking with Binary instead of Dependencies.
Adds the ability to put localized strings in `StripeCore` and sets up infrastructure for any new module to contain localized strings. Now each module will have...
- Its own version of `STPLocalizedString`
- Its own set of `Resources/Localizations/*.lproj/Localizable.strings` files
- Remove abstraction for SPI-public protocols and instead tell Jazzy to ignore them using `:nodoc:` notation.
- Added comment notes linking to https://github.com/realm/jazzy/issues/1262
* Change colors when disabled.
* Split out DropdownTextField, add disabled color
* Add some haptics, scroll to selected pm type cell
* Refactor out ValidationState, only TextField needs it.
Make TextFieldView text red if invalid
* SectionView forwards touch events to the appropriate subview
* Improve placeholder -> label
* Auto-advance
* error
* Update mandate text
* Refactor out the FloatingPlaceholderTextFieldView and make TextFieldView and DropdownFieldView use it
* Accessibility
* Dont always show save checkbox, make formelement factory a bit nicer
* Update localization
* Fix test
* DRY up FormElement factory, fix guest mode
* Rename CheckboxElement -> SaveCheckboxElement, fix tests
* Fix params convenience init
StripeCore tests:
- Migrated tests specific to classes in `StripeCore` to `StripeCoreTests`
- Created a `StripeCoreTestUtils` target to contain `MockAnalyticsClient` so the mock can be included in test targets for multiple SDKs
- Added StripeCore tests to `Fastfile` & `circleci/config.yml` so they'll run on our CI
- Updated the [Configure Tests](https://confluence.corp.stripe.com/display/~mludowise/%5BWIP%5D+iOS+SDK+Runbook%3A+Adding+a+new+module#id-[WIP]iOSSDKRunbook:Addinganewmodule-ConfigureTests) portion of our runbook for adding a new module to match the steps taken in this PR
Cleanup:
- Renamed `main_tests` and `standard-tests` to `stripeios-tests` in the Fastfile & circle yml so our test names match the module they're testing
- Added `DEFAULT_TEST_DEVICE` and `DEFAULT_TEST_VERSION` consts to our Fastfile to help ensure consistent testing platforms across our tests as we add more modules
- Migrated `STPAnalyticsClient` & dependent classes into `StripeCore`
- Exposed internally available analytics code with to spi-public using the `STP` namespace so it could be used from other Stripe modules
- Migrated `STPAPIClient.sharedUrlSessionConfiguration` -> `StripeAPIConfiguration.sharedUrlSessionConfiguration` so it can be shared across modules
- Dependency injected the public key from `STPAPIClient` into `STPAnalyticsClient` via a new `PublishableKeyProvider` protocol
- Created wrappers for protocols declared SPI-public inside `StripeCore` to avoid displaying SPI-public conformance in our docs
- Updated `build_documentation.sh` to clean the pod cache for all Stripe pods
- Add a dependency on `StripeCore` for the StripeiOS target, Carthage, SPM, and Cocoapods
- Update `StripeCore.podspec` to use a tag instead of a branch
- Shared `StripeCore.xcscheme` so Carthage builds StripeCore
- Modified `build_documentation.sh` to pass a temporary local podspec repo so it can find `StripeCore`