Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift – "No such module 'Stripe3DS2'" after updating Stripe to 21.0.1

I've updated the Stripe SDK to the latest version 21.0.1 via CocoaPods.

When I'm building the project I'm always getting the following error:

No such module 'Stripe3DS2' in the STP3DS2AuthenticateResponse.swift file.

enter image description here

like image 786
Jonas Ester Avatar asked Nov 21 '20 22:11

Jonas Ester


2 Answers

Okay, I just fixed it by updating CocoaPods itself from 1.9 to 1.10

sudo gem install cocoapods
like image 171
Jonas Ester Avatar answered Sep 21 '22 19:09

Jonas Ester


In addition to updating CocoaPods, I also had to start using Swift Packages in Xcode to import Stripe into my project. Steps are:

Remove this line from Podfile:

pod 'Stripe'

Re-install pods:

pod install

Then, add Stripe as a Swift Package by selecting the Project in Xcode, then selecting the 'Swift Packages' tab, then the plus button, and entering the link to the Stripe iOS repo:

https://github.com/stripe/stripe-ios

After all this, I could build and run. I'm using SwiftUI in my project.

like image 35
Mark Mckelvie Avatar answered Sep 21 '22 19:09

Mark Mckelvie