Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virgilCrypto-swift.h not found. #18

Closed
mahesh-saal opened this issue Nov 4, 2019 · 12 comments
Closed

virgilCrypto-swift.h not found. #18

mahesh-saal opened this issue Nov 4, 2019 · 12 comments
Assignees

Comments

@mahesh-saal
Copy link

Hi, I am facing this issue while building ios app. React-native-virgil-cryto successfully worked for android, now I am tying for ios. I tried with cocoapods & carthage both. Still I am facing this issue. I have react & react-native versions "16.8.3" & "0.59.9" respectively. And for React-native-virgil-cryto "^0.3.2" & tried with latest version also.

@vadimavdeev
Copy link
Contributor

Hi! What is the error that you're getting? Did you follow the instructions in README? Please see the section beginning with RN<60 if you use CocoaPods.
To recap, you need:

npm i react-native-virgil-crypto
react-native link react-native-virgil-crypto

Then, add the following lines into ios/Podfile:

target 'YOUR_APP_NAME' do
  use_frameworks!
  
  # your existing pods

  pod 'VirgilCrypto', '~> 5.2.0'
  pod 'VirgilCryptoFoundation', '~> 0.11.0'
  pod 'VirgilCryptoPythia', '~> 0.11.0'

And finally, run pod install in the ios directory.

If you tried both CocoaPods and Carthage, make sure you clean up (i.e. undo everything you did) before trying again. Also, please see this issue, it might be related.

@mahesh-saal
Copy link
Author

Hi,
Pods did not work for me , carthage worked after reconfiguring project.

@vadimavdeev
Copy link
Contributor

It seems like the issue is resolved, so I'm closing this. Feel free to reopen if the problem appears again.

@tian-chaiyaporn
Copy link

@vadimavdeev

Hi, so I have a similar problem but with VirgilCrypto version 5.2.0

My error is this: "VirgilCrypto.h" file not found

I managed to track down the problem to the fact that react-native-virgil-crypto is importing this file that exists in virgil-crypto-x version 3.2.3 but not in version 5.2.0

Can you please check if this is the case.

@tian-chaiyaporn
Copy link

Hi @snanovskyi any progress on this? Just wanted to know if it's being worked on, so I can find alternative solutions if otherwise - thank you

@snanovskyi
Copy link
Contributor

Hi @tian-chaiyaporn 👋

I'm currently working on update for the library which will be hopefully released later today. It will contain pre-configured projects that can be used as reference for your own projects (for React Native 0.59.x and 0.61.x).

Imho, it's better to use only one dependency manager(for React Native it is CocoaPods). Using Carthage and manual configuration is a workaround for 0.60.x due to compatibility issue with use_frameworks!. Also it is quite tricky in my opinion.
If this is your case, I highly suggest you to avoid 0.60.x and to upgrade to 0.61.x.

I'll let you know when new version of the library will be available.

@tian-chaiyaporn
Copy link

@snanovskyi ok, thanks you, and for the advice too. I appreciate it. I'm sort of stuck in RN 0.59 due to another library the app is depended on, but I will try it either way, and update it to 0.61 if all else fails.

Thanks again

@snanovskyi
Copy link
Contributor

@tian-chaiyaporn we published new version of the library 🚀

Here is our 0.59.x example. Also have a look at this article. It might help.

Let me know if you need some help 🙂

@tian-chaiyaporn
Copy link

Perfect. Thanks so much @snanovskyi

@Beaudinn
Copy link

Beaudinn commented Feb 12, 2020

Hi!,

I have the same issue using react native version 0.61.4 and react-native-virgil-crypto add version 0.5.0.
My error is this: "VirgilCrypto.h" file not found
I've looked at 0.61.x example I think I have everything set up properly.

@snanovskyi
Copy link
Contributor

snanovskyi commented Feb 12, 2020

Hi @Beaudinn !

'VirgilCrypto/VirgilCrypto-Swift.h' file not found
'VirgilCryptoFoundation/VirgilCryptoFoundation-Swift.h' file not found
'VirgilCryptoPythia/VirgilCryptoPythia-Swift.h' file not found

These errors mean that you don't have use_frameworks! in your Podfile.
You need to add use_frameworks! and then run pod install.
You also might need to remove Pods, Podfile.lock and build in your /ios directory before you do pod install.

@snanovskyi
Copy link
Contributor

If you still need help setting up your project you can jour our Slack community and get in touch with our team there.

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

No branches or pull requests

6 participants