Closed Joyep closed 4 years ago
Please post your react-native environment with react-native info
Have you tried the solution I mentioned in https://github.com/poowf/react-native-argon2/issues/1 ?
Thank you, I'v tried clean project as issue #1, but still face the same error.
use_frameworks!
in Podfile, and after that, pod install
works well, but still occur other errors when compile.use_modular_headers!
in Podfile, pod install
works well, but still face compile errors.My react-native info is as below:
System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 527.96 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.4.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.0.1/12A7300 - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
in package.json
"react": "16.13.1",
"react-native": "0.63.2",
"react-native-argon2": "^1.0.0",
error:
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `RNArgon2` depends upon `React-Core`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
I'm wondering if this is because this is a swift implementation.
How does your Podfile look like?
Could you try the following:
yarn/npm install
node_modules
s.static_framework = true
I'm wondering if this is because this is a swift implementation.
How does your Podfile look like?
I tested installing react-native-argon2 in a brand new project of react-native version 0.36.2, it also show this error.
my Podfile:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'keybox' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'keyboxTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
Could you try the following:
yarn/npm install
- Go to the react-native-argon2 package in
node_modules
- Modiify the RNArgon2.podspec and remove
s.static_framework = true
- Go to ios folder and pod install
- Build your app.
remove s.static_framework = true
does not work for me.
Add this line in Podfile and pod install will success. but it could not be a good way.
pod 'React-Core', :modular_headers => true, :path => '../node_modules/react-native/'
Hmm. Let me reproduce it. You shouldn't need to add the React-Core pod
@Joyep Can you please try using version 0.1.0
of the package? I've published a version that should fix this issue.
Apparently this only happens with 0.63.2 and older
but from 0.63.3
, pegging the package to React-Core
is correct. Wonder why this was only a patch version bump for the react-native
package
It's ok by using version0.1.0
in react-native 0.63.2
. Thank you.
react-native 0.63
pod install return an error as below:
[!] The following Swift pods cannot yet be integrated as static libraries: The Swift pod
RNArgon2
depends uponReact-Core
, which does not define modules.