Stripe-ios: Module 'Stripe' not found

Created on 10 Jul 2016  ยท  10Comments  ยท  Source: stripe/stripe-ios

I'm following the getting started information to add Stripe. When adding @import Stripe; in app delegate i get an error saying Module 'Stripe' not found.

Most helpful comment

Hey there โ€“ just noticed that you're using @import. We don't support module imports right now โ€“ can you try replacing @import Stripe; with #import <Stripe/Stripe.h>?

Let me know if you have any other questions!

All 10 comments

Hey there โ€“ what installation method are you using?

Hello I'm using cocoapods

Date: Mon, 11 Jul 2016 09:56:42 -0700
From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]
Subject: Re: [stripe/stripe-ios] Module 'Stripe' not found (#369)

Hey there โ€“ what installation method are you using?

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hello, same problem. Install with CocoaPods.

Hey there โ€“ just noticed that you're using @import. We don't support module imports right now โ€“ can you try replacing @import Stripe; with #import <Stripe/Stripe.h>?

Let me know if you have any other questions!

But accordig to the documentation @import Stripe should be used. I tried using #import it returns apple mach-o linker error.

Sent from my iPhone

On Jul 12, 2016, at 8:16 PM, Ben Guo [email protected] wrote:

Hey there โ€“ just noticed that you're using @import. We don't support module imports right now โ€“ can you try replacing @import Stripe; with #import ?

Let me know if you have any other questions!

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@mightyG โ€“ looked into this a bit more, and I believe @import Stripe; isn't working for you because cocoapods is integrating your dependencies as static libraries (more info). Can you try adding use_frameworks! to the top of your Podfile?

platform :ios, "8.0"
use_frameworks!
...

You should then be able to use @import Stripe; โ€“ if you encounter any issues after that, can you share the full error message here, as well as your Podfile?

Hello, you were right adding platform :ios, "8.0"
use_frameworks!made the thing work. But I had to clean my project and rebuild it.Thank you for your help.
Date: Tue, 12 Jul 2016 17:29:01 -0700
From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]
Subject: Re: [stripe/stripe-ios] Module 'Stripe' not found (#369)

@mightyG โ€“ looked into this a bit more, and I believe @import Stripe; isn't working for you because cocoapods is integrating your dependencies as static libraries (more info). Can you try adding use_frameworks! to the top of your Podfile?

platform :ios, "8.0"
use_frameworks!
...

You should then be able to use @import Stripe; โ€“ if you encounter any issues after that, can you share the full error message here, as well as your Podfile?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Thanks to both of you! you saved me a lot of time with your detailed responses.

If this wasn't fixed by uncommenting the Podfile line and reinstalling, are there any other tips of what to do?

Hey @surayashivji,

I recommend writing in to [email protected], as we have a full team that helps people with integration issues. They can help troubleshoot your local setup.

Brian

Was this page helpful?
0 / 5 - 0 ratings

Related issues

coolcool1994 picture coolcool1994  ยท  4Comments

provTheodoreNewell picture provTheodoreNewell  ยท  5Comments

levisbotio picture levisbotio  ยท  6Comments

imhugofonseca picture imhugofonseca  ยท  7Comments

ricsantos picture ricsantos  ยท  6Comments