ioscordova

No such module 'Stripe'


I'm new on iOS/Cordova, and facing error with Stripe. I imported Stripe.framework but Xcode says Stripe not found.

no such module stripe

How can I fix this?

Thanks in advance.


Solution

  • You need to create bridging file for use objective C code in swift.

    create a bridging header by following these procedures:

    1. Add a new header file to the Donate directory by right-clicking the project directory in the project navigator, followed by clicking “New File…”.

    2. Select iOS -> Source category, choose the “Header File” template and click Next.

    3. Name the class “Project_name-Bridging-Header.h”, then press continue to proceed and save the file.

    4. Next, go to “Build Settings”, and search for “Objective-C Bridging Header”. Set the value to “Project_name/Project_name-Bridging-Header.h”.// or simply drag file

    Once done, open the Project_name-Bridging-Header.h file and write the following code:

    #import <Stripe/Stripe.h>