indy-sdk-react-native
indy-sdk-react-native copied to clipboard
Running `pod install` causes issues
Hi, I am trying to do the new way of installing the framework. Currently running into errors where my computer is unable to find libevent ~> 2.1.12. Currently running on an M1 MacBook Pro.
trace:
ios λ pod install [main]
Auto-linking React Native modules for target `example`: RNFS, indy-sdk-react-native, and react-native-get-random-values
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`
[!] Unable to find a specification for `libevent (~> 2.1.12)`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Have you tried pod install --repo-update? It's also possible the M1 is causing issues here, but I hope not 😓
Have you tried
pod install --repo-update? It's also possible the M1 is causing issues here, but I hope not 😓
Yeah I did with no success sadly.
I'll see if I can get someone on my team with an M1 to recreate. Two followup questions--was Indy previously used in the project with the old method or is this a new project? Are you able to share your Podfile potentially?
My Podfile:
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")
require 'json'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
platform :ios, podfile_properties['ios.deploymentTarget'] || '13.0'
install! 'cocoapods',
:deterministic_uuids => false
target 'demowalletcheqd' do
use_expo_modules!
config = use_native_modules!
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => flags[:hermes_enabled] || podfile_properties['expo.jsEngine'] == 'hermes',
:fabric_enabled => flags[:fabric_enabled],
:app_path => "#{Dir.pwd}/.."
)
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
source 'https://github.com/hyperledger/indy-sdk-react-native'
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
end
The indy-sdk was only installed via the animo expo plugin.
@blu3beri adding source 'https://cdn.cocoapods.org' did the trick for me. I followed the instructions on the npm package and was getting the same error. Then I noticed that the Instructions in the repo were different.
Hope this helps.