Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

'Stripe/Stripe.h' file not found #11

Closed
ignivaankushrishi opened this issue Dec 17, 2016 · 53 comments
Closed

'Stripe/Stripe.h' file not found #11

ignivaankushrishi opened this issue Dec 17, 2016 · 53 comments
Labels

Comments

@ignivaankushrishi
Copy link

ignivaankushrishi commented Dec 17, 2016

Hi,

I am getting this error while building the application in xcode: 'Stripe/Stripe.h' file not found

I have integrated this package manually in xcode.

here is the screenshot:
screen shot 2016-12-17 at 12 30 23 pm

@isnifer
Copy link
Contributor

isnifer commented Dec 17, 2016

@ignivaankushrishi did you try react-native link command?

@itsmepetrov
Copy link
Contributor

itsmepetrov commented Dec 18, 2016

Hi, @ignivaankushrishi, thank you for your interest in our module!

It looks like you did not setup CocoaPods dependencies:

  • Setup your Podfile like the included example/ios/Podfile
  • Then run pod install in ios directory

But we recommend using react-native link tipsi-stripe command as a more reliable way to link this module.

@shyaniv7
Copy link

i am getting the same error and the suggestions above did not work

@densa
Copy link
Contributor

densa commented Dec 25, 2016

@ignivaankushrishi @shyaniv7 are you open xcworkspace not xcodeproj ?

@shyaniv7
Copy link

@densa i have using the xcodeproj file

@densa
Copy link
Contributor

densa commented Dec 25, 2016

@shyaniv7 you have to use workspace file because of pods

@cybergrind
Copy link
Member

@shyaniv7 I belive this issue was resolved, so closing it

@magneticz
Copy link

Hi, thank you guys for great work
Strangely, I am getting this error. I did everything according to the instructions, installed through npm and run react-native link. But it still gives me the same error

@itsmepetrov
Copy link
Contributor

Hi, @magneticz, which version of react-native do you use? Are you open .xcworkspace file to build application?

@magneticz
Copy link

hi @itsmepetrov, I am using react-native 0.41.2. I usually build with react-native run-ios, but in this case i tried to build through xcode using .xcworkspace, so yes, i used .xcworkspace

@itsmepetrov
Copy link
Contributor

itsmepetrov commented Feb 8, 2017

I noticed some problems with link on 0.41.2 version, could you show your ios/Podfile file, please?

@magneticz
Copy link

sure, here it is

platform :ios, '8.0'
target 'app' do
  use_frameworks!

  pod 'Firebase/Messaging'
  pod 'RSKImageCropper'
  pod 'QBImagePickerController'
  pod 'Firebase/Core'

  target 'appTests' do
    inherit! :search_paths
  end

end
pod 'Stripe', '~> 9.2.0'

@itsmepetrov
Copy link
Contributor

Could you move pod 'Stripe', '~> 9.2.0' under app target, right after pod 'Firebase/Core' and then install pods again: pod install in ios directory.

@magneticz
Copy link

not working, i moved and did pod install, it didn't work then i tried to do react-native link but it still didn't work, same file not found error. I looked into the header search path, to make sure paths in the readme are there and they are there, so i do not know why the file is still not found. And I am not good with ios development to dig deeper

@sergeyzhukov
Copy link
Contributor

Do you have folder Pods/Stripe folder inside ios folder? And try to change Podfile to be looking like this

platform :ios, '8.0'
target 'app' do
  use_frameworks!
  pod 'Stripe', '~> 9.2.0'
  pod 'Firebase/Messaging'
  pod 'RSKImageCropper'
  pod 'QBImagePickerController'
  pod 'Firebase/Core'
  inherit! :search_paths

  target 'appTests' do
    inherit! :search_paths
  end

end

And make sure you have correctly linked libpods like this (libPods-StripeTest.a, StripeTest is name of my target):

screen shot 2017-02-08 at 09 44 57

@magneticz
Copy link

magneticz commented Feb 9, 2017

I have Pods/Stripe folder and i tried changing podfile.
the libTPSStripe.a is also there, but i do not have libPods-StripeTest.a linked. I couldn't find any libPods file to link, maybe that's the problem, how can i add it?

@sergeyzhukov
Copy link
Contributor

You can try to add this lib by tapping on + and select libPods-StripeTest.a

screen shot 2017-02-09 at 06 18 07

Also please be sure that you are opening xcworkspace file (not project) and you have pods integrated in workspace like this

screen shot 2017-02-09 at 06 19 30

@ezos86
Copy link

ezos86 commented May 22, 2017

This issue is not resolved, this library has been a nightmare to work with, constant missing files, and cross generation dependencies that seem to sometimes appear and sometimes not.

@cybergrind
Copy link
Member

@ezos86 maybe we're missing something and you can point us that?

If you can provide us reproducible steps, eg. share repo where it isn't working it would be great and would help us fix it.
We already have CI tests that are doing everything from scratch so we can be sure that it works at least under some circumstances. With you help, we can find other cases and fix them too.

@mienaikoe
Copy link

In my case I can't use inherit! :search_paths because it causes an linking error in react-native-fcm. is there a workaround to using that directive?

@ignivaankushrishi
Copy link
Author

@cybergrind this issue still exists if we do not use pods. I want to add this library without using pods. So, this issue should not be closed like this. you should update your library so that it should work error free.

@GregTheGreek
Copy link

Solid library but it's riddled with bugs

@isnifer
Copy link
Contributor

isnifer commented Jun 8, 2017

@ignivaankushrishi you need to use pods, cause you need Stripe Pod.

you should update your library so that it should work error free.

You might help us, PRs welcome!

Nepherhotep added a commit that referenced this issue Jun 24, 2017
Fix framework search paths. Fixes (#11, #29)
@isnifer
Copy link
Contributor

isnifer commented Jun 24, 2017

@SamiChab
Copy link

Hey!
I'm using tispi-stripe@4.1.2
I used react-native link (so no PodFile) and I get the same error.
I tried to :

  • clean the build folder in XCode
  • link tipsi-stripe again
  • delete the node_modules folder ad run npm install again
  • build the app again

I still get the same error ('Stripe/Stripe.h' file not found) as I build this in XCode.
I think the issue should be re-opened, considering the amount of people in the same case than me.

@isnifer
Copy link
Contributor

isnifer commented Nov 17, 2017

@SamiChab Hey! Show me your Podfile and Podfile.lock. Also, please tell me how are building your app? Are you using workspace instead of project?

@SamiChab
Copy link

@isnifer thanks for your answer.
I was not using PodFile as I posted this message. It would be really cool if it worked with react-native link.

@isnifer
Copy link
Contributor

isnifer commented Nov 20, 2017

@SamiChab once again, you should use Podfile. it is created when you run react-native link

@SamiChab
Copy link

@isnifer

whilereact-native link
...?

@isnifer
Copy link
Contributor

isnifer commented Nov 20, 2017

@SamiChab please read https://github.com/tipsi/tipsi-stripe#ios-1

@SamiChab
Copy link

Okay, I understand now that I didn't had to choose between react-native link or CocoaPods or Manual, but do all of them. Sorry for the inconvenience

@isnifer
Copy link
Contributor

isnifer commented Nov 20, 2017

@SamiChab after linking tipsi-stripe use workspace instead of project to build an app

@SamiChab
Copy link

@isnifer You mean in XCode?

@isnifer
Copy link
Contributor

isnifer commented Nov 20, 2017

@SamiChab Yes

@cheema38
Copy link

I have to agree with above comments, this library is finicky and a pain to get set up. great potential for RN but with the difficulty installing and having to link and use .xcworkspace and install pods, im going back to the API and fetch :-(

@isnifer
Copy link
Contributor

isnifer commented Nov 21, 2017

So, @cheema38 all great libraries need to be linked if they are using native code

@GregTheGreek
Copy link

@cheema38 Linking shouldn't be an issue for most libraries. I can't comment anymore on this one since I haven't used it in a very long time (although I'm willing to give it another chance). For whatever reason, the old version was very buggy when I would try and install it. If you have problems linking any library, you most likely are doing something wrong with your ios setup or you aren't using .workspace post linking.

@isnifer Make sure to check versions of RN people are using, that usually solves a lot of issues, and you can probably close more that way.

@isnifer
Copy link
Contributor

isnifer commented Nov 21, 2017

@GregTheGreek we are planning to remove automatic linking for tipsi-stripe, cause manual linking much simpler than we are doing in scripts. Usually, people are using project file instead of workspace, that's why problem exists

@wkwyatt
Copy link

wkwyatt commented Apr 19, 2018

Has there been any resolution to this @isnifer that is consistent? I have tipsi-stripe installed and I'm getting the error:

node_modules/tipsi-stripe/ios/TPSStripe/TPSCardField.h:10:9: 'Stripe/Stripe.h' file not found

I am using react-native 0.48
installing with react-native link tipsi-stripe
and the Stripe version in my Podfile is pod 'Stripe', '~> 11.2.0'

@isnifer
Copy link
Contributor

isnifer commented Apr 19, 2018

@wkwyatt Hi! Did you start a workspace to run your app?

@wkwyatt
Copy link

wkwyatt commented Apr 19, 2018

@isnifer Yes, my Podfile looks like this:

I used react-native link to link the package

platform :ios, '10.0'

workspace 'myapp'

target 'myapp' do
  use_frameworks!
  inherit! :search_paths

  # Required for Tipsi-Stripe
  pod 'Stripe', '~> 11.2.0'

  # Required by RNFirebase
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'

  # Pods for AppCenter
  pod 'AppCenter/Crashes', '~> 1.5.0'
  pod 'AppCenter/Analytics', '~> 1.5.0'
  pod 'AppCenterReactNativeShared', '~> 1.4.0'
  platform :ios, '9.0'

end

@isnifer
Copy link
Contributor

isnifer commented Apr 19, 2018

@wkwyatt did you install pods after updating Podfile?

@wkwyatt
Copy link

wkwyatt commented Apr 19, 2018

Yes

@isnifer
Copy link
Contributor

isnifer commented Apr 19, 2018

@wkwyatt please, check this section — https://tipsi.github.io/tipsi-stripe/docs/linking.html#manual. And tell me — is everything OK?

@wkwyatt
Copy link

wkwyatt commented Apr 20, 2018

@isnifer I followed the steps exactly and I am still getting the same error. Am I missing something?

screen shot 2018-04-20 at 10 35 40 am

  • Add TPSStipe to the Libraries folder
    screen shot 2018-04-20 at 10 43 50 am

  • Link binary
    screen shot 2018-04-20 at 10 35 03 am

  • add Header Search Paths (I tried recursive and non-recursive)
    screen shot 2018-04-20 at 10 34 15 am

@isnifer
Copy link
Contributor

isnifer commented Apr 20, 2018

@wkwyatt show me log of pod install inside your ios folder

@wkwyatt
Copy link

wkwyatt commented Apr 20, 2018

@isnifer - is this what you meant by the log?

pi_img

@newah
Copy link

newah commented Apr 25, 2018

Had this problem.
Check your absolute Header Search Paths from TPSStripe. When definition was $(SRCROOT)/../../../React , mine was pointing in to the root folder of tipi-stripe, not to the example folder (which makes sense since TPSStripe project's actual path is from root folder).

In the end I:

  1. copied example project to a different location
  2. removed previous dependency from package.json
  3. npm i tipsi-stripe --save
  4. deleted previous linking of TPSStripe project from xcworkspace and relinked manually (though I guess this could be done with react-native link - after deleting the old TPSStripe of course)

@brilliantjc
Copy link
Contributor

brilliantjc commented May 25, 2018

@newah after copied the example file to a different location, command "npm i tipsi-stripe --save", error: Could not install from ".." as it does not contain a package.json file
what should I do? thank you for helping!

@isnifer
Copy link
Contributor

isnifer commented May 26, 2018

@brilliantjc just don't move it

@newah
Copy link

newah commented May 26, 2018

@brilliantjc you need the whole react-native project - with package.json . Then from project root, install npm dependency tipsi-stripe - just like you do in any other RN project :)

Maybe you only copied ios folder, or xcode file or something... But you need the whole RN example project :)

@ankitgauravapporio
Copy link

I am doing it by manual liking , followed each steps , still getting the error as 'Stripe/Stripe.h' file not found, can't afford to use pod , due to other dependencies.need you help / explanation

@vincent459
Copy link

In my case, downgrade pod 'Stripe', '~> 20.0.0' fixed the problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests