Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

'Indy/Indy.h' file not found #1

Closed
osancus opened this issue Jan 26, 2021 · 3 comments
Closed

'Indy/Indy.h' file not found #1

osancus opened this issue Jan 26, 2021 · 3 comments

Comments

@osancus
Copy link

osancus commented Jan 26, 2021

Compiling for iOS fails with 'Indy/Indy.h' file not found. I have faced the same problem with using rn-indy-sdk separately. I have also tried building my own Indy.framework with swift 5 and replace it but it's like Xcode just don't detect if Indy.framework exists.

This also didn't help. Any suggestion on how can I solve it.
AbsaOSS/rn-indy-sdk#20

Screenshot 2021-01-26 at 11 04 42 PM

@karimStekelenburg
Copy link
Member

Hi @osancus!

I've faced the same errors while working on this project. However, I just did a fresh clone of the repo and it works for me. I'll briefly summarise the steps I took to verify we're doing the same:

The steps I took

# clone and cd into the project directory
git clone https://github.com/animo/aries-mobile-agent-react-native
cd aries-mobile-agent-react-native

# install the JS dependencies
yarn

# install the native IOS dependencies
pod install --project-directory=ios/

# open the xcode workspace
open ./ios/AriesMobileAgentJavaScript.xcworkspace

After doing the above, you should be able to compile and run the project from within Xcode. Be aware that the Indy.framework will only work with a physical IOS device, as it wasn't built for the architecture required by the IOS simulator.

Still not working?

If this still doesn't work for you, I advice you to check the following:

1. Check if Indy.Framework is present in Xcode's 'build phases'

Open ./ios/AriesMobileAgentJavaScript.xcworkspace in Xcode, and make sure the Indy.framework is included in the Embedded Frameworks section of Xcode:

Screenshot 2021-01-27 at 19 59 16

If Indy.framework is not included in the Embedded Frameworks section, just add it manually by pressing the + button and select the framework located at ./ios/pods/Frameworks/Indy.framework. That being said, it should be there already.

2. Make sure the framework search paths are present

Open both ./ios/Pods/Target Support Files/rn-indy-sdk/rn-indy-sdk.debug.xcconfig and ./ios/Pods/Target Support Files/rn-indy-sdk/rn-indy-sdk.release.xcconfig and make sure the following line is present in both of those files: FRAMEWORK_SEARCH_PATHS = $(inherited) ${PODS_ROOT}/Frameworks .

The line should have been added to those files when you ran pod install because of this recently merged PR AbsaOSS/rn-indy-sdk#38. If that somehow isn't the case, my advise is to run the echo commands described here.

Version info

Lastly, I'll drop some info on the versions I've managed to get it to work with:

  • macOs v11.1
  • Xcode v12.4
  • Node v15.4.0

The device I'm using is an iPhone 11 running iOS 14.3.

I hope this helps! Please let us know if you need any more help or discovered what went wrong so I can update and improve the instructions in the readme 🙃

@osancus
Copy link
Author

osancus commented Jan 27, 2021

Thanks, @karimStekelenburg finally it builds successfully. Framework search paths were missing, they weren't added automatically at pod install. Adding FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Frameworks" to ./ios/Pods/Target Support Files/rn-indy-sdk/rn-indy-sdk.debug.xcconfig and ./ios/Pods/Target Support Files/rn-indy-sdk/rn-indy-sdk.release.xcconfig fixed the problem. Cheers!

@osancus osancus closed this as completed Jan 27, 2021
@TimoGlastra
Copy link
Member

The line should have been added to those files when you ran pod install because of this recently merged PR AbsaOSS/rn-indy-sdk#38. If that somehow isn't the case, my advise is to run the echo commands described here.

Seems like the change is merged and documented but not released yet.

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

No branches or pull requests

3 participants