sumup / sumup-ios-sdk

Other
46 stars 24 forks source link

Fill email or sms from code #74

Open rcourivaud opened 5 years ago

rcourivaud commented 5 years ago

It's possible to pre-fill email or phone number on Android SDK but the iOS one don't allow to do this.

kkizlaitis commented 5 years ago

That would be really appreciated in our project as well :)

oliverschaefer commented 1 year ago

@jadeburton-sumup are there any plans to bring receiptEMail and receiptSMS to iOS?

oliverschaefer commented 1 year ago

@vfoixcable any plans to bring receiptEMail and receiptSMS to iOS? They are part of the Android SDK.

jadeburton-sumup commented 1 year ago

Hi @oliverschaefer we're looking into making both SDKs have the same options, which means this may be added to the iOS SDK. However, we are not planning to have it in the upcoming iOS SDK version, 4.3.0.

oliverschaefer commented 1 year ago

@jadeburton-sumup Thanks for the clarification. If you need any help with the iOS part of the SDK please let me know. I'd volunteer :-D

oliverschaefer commented 1 year ago

@jadeburton-sumup After digging a little into the view hierarchy of the presented view controllers, I found a way to implement this in the current SDK:

guard let receiptViewController = viewController.children.first(where: { childViewController in String(describing: type(of: childViewController)) == "SMPPaymentReceiptRequestVC" }), let textFieldContainer = receiptViewController.view.subviews.last?.subviews.first as? UIStackView else { return } (textFieldContainer.arrangedSubviews.first as? UITextField)?.text = "support@sumup.de" (textFieldContainer.arrangedSubviews.last as? UITextField)?.text = "03030809902"