react-native-photo-editor giving Linking error while run the project
arjundalal opened this issue · 39 comments
+1 same issue! is there any way to install library on IOS with cocoapods ?
I'm using RN 0.60.
If we have to link library manual, please tell me know exact steps? the instruction seem not work for me :(
Thanks all !
i'm able to get throw this error by adding :
pod 'RNPhotoEditor', :path => '../node_modules/react-native-photo-editor/ios'
use_frameworks!
pod 'iOSPhotoEditor', :git => 'https://github.com/prscX/photo-editor', :branch => 'master'
to Podfile, then run pod update
(if u get error when run app, its because libraris conflict when use_frameworks! ==> Add s.static_framework = true to podspec to get throw this error)
When APP builded, im going to edit image, but nothing happend, log from xcode show that :
and now, i'm stuck here.
help !
- Double check your Pod file and make sure you have removed the "#" sign before "use_frameworks!"
- make sure you have added the below code to your pod file.
use_native_modules!
pod 'RNPhotoEditor', :path => '../node_modules/react-native-photo-editor/ios'
use_frameworks!
pod 'iOSPhotoEditor', :git => 'https://github.com/prscX/photo-editor', :branch => 'master'
- run
pod update
- in case of getting error like
The 'Pods-xxxxx' target has transitive dependencies that include statically linked binaries:
So you can easily fix it by adding the code below to yourxxxxx
target in your pod file
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
Thanks @arjundalal for raising the issue.
I have updated installation steps, could you please try this with RN61, since it has better support for use_frameworks!
.
Thanks
</ Pranav >
okay, i fixed it by doing:
- if you getting stuck at Google's Libraries like GMap, Firebase, ... just add it manually,
- you can replace use_frameworks! by use_modular_headers!
- If you can't replace it with use_modular_headers!, then add code bellow right after use_frameworks!
$dynamic_frameworks = ['RxCocoa', 'RxSwift']
pre_install do |installer|
installer.pod_targets.each do |pod|
if !$dynamic_frameworks.include?(pod.name)
puts "Overriding the static_framework? method for #{pod.name}"
def pod.build_type;
Pod::Target::BuildType.static_library
end
end
end
end
Hi Team Still i am getting error can you help me to resolve it. Regards, Arjun Dalal
…
On Sun, 1 Dec 2019 at 10:33, Arjun Dalal @.> wrote: Hiii Pranav and all Till i am getting the same issue can any one help me to solve this issue. Regards, Arjun Dalal. On Sun, 1 Dec 2019, 10:22 am Pranav Raj Singh Chauhan, < @.> wrote: > Thanks @arjundalal https://github.com/arjundalal for raising the issue. > > I have updated installation steps, could you please try this with RN61, > since it has better support for use_frameworks!. > > Thanks > </ Pranav > > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <#93?email_source=notifications&email_token=AM57WLG53ILRPCY6DP7JDQDQWM7JNA5CNFSM4JMATKHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFQ4J6A#issuecomment-560055544>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AM57WLCE6QTEHSKTZHOC5RLQWM7JNANCNFSM4JMATKHA > . >
@arjundalal: Could you please share your app software stack.
Thanks
</ Pranav >
Use xcode 10 instead of xcode 11 please.
Add the swift path to libraries search path in your target
okay, i fixed it by doing:
1. if you getting stuck at Google's Libraries like GMap, Firebase, ... just add it manually, 2. you can replace use_frameworks! by use_modular_headers! 3. If you can't replace it with use_modular_headers!, then add code bellow right after use_frameworks!
$dynamic_frameworks = ['RxCocoa', 'RxSwift'] pre_install do |installer| installer.pod_targets.each do |pod| if !$dynamic_frameworks.include?(pod.name) puts "Overriding the static_framework? method for #{pod.name}" def pod.build_type; Pod::Target::BuildType.static_library end end end end
Hi Team Still i am getting error can you help me to resolve it. Regards, Arjun Dalal
…
On Sun, 1 Dec 2019 at 10:33, Arjun Dalal @.> wrote: Hiii Pranav and all Till i am getting the same issue can any one help me to solve this issue. Regards, Arjun Dalal. On Sun, 1 Dec 2019, 10:22 am Pranav Raj Singh Chauhan, < _@**.**_> wrote: > Thanks @arjundalal https://github.com/arjundalal for raising the issue. > > I have updated installation steps, could you please try this with RN61, > since it has better support for use_frameworks!. > > Thanks > </ Pranav > > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <#93?email_source=notifications&email_token=AM57WLG53ILRPCY6DP7JDQDQWM7JNA5CNFSM4JMATKHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFQ4J6A#issuecomment-560055544>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AM57WLCE6QTEHSKTZHOC5RLQWM7JNANCNFSM4JMATKHA > . >
Hi guys,
I also got it to work on Android, but iOS gets me from error to error. After following these steps I get a 100 'undefined symbol' errors. I'm an iOS newby, so can't really make sense of it.
My stack:
- react-native = 0.60
- Xcode = 11.2.1
- Podfile =
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'SIWI' do
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for SIWI
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Required by RSKImageCropper
pod 'RSKImageCropper', :git => 'https://github.com/trivetechnology/RSKImageCropper.git'
pod 'RNFastImage', :path => '../node_modules/react-native-fast-image'
pod 'react-native-contacts', :path => '../node_modules/react-native-contacts'
# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
target 'SIWI-tvOSTests' do
inherit! :search_paths
# Pods for testing
pod 'RNFastImage', :path => '../node_modules/react-native-fast-image'
end
target 'SIWITests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
pod 'RNPhotoEditor', :path => '../node_modules/react-native-photo-editor/ios'
use_frameworks!
$dynamic_frameworks = ['RxCocoa', 'RxSwift']
pre_install do |installer|
installer.pod_targets.each do |pod|
if !$dynamic_frameworks.include?(pod.name)
puts "Overriding the static_framework? method for #{pod.name}"
def pod.build_type;
Pod::Target::BuildType.static_library
end
end
end
end
pod 'iOSPhotoEditor', :git => 'https://github.com/prscX/photo-editor', :branch => 'master'
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name.include?('iOSPhotoEditor')
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5'
end
end
end
end
end
I fixed the above errors by adding an empty swift file to my project, based on this thread:
https://stackoverflow.com/a/56176956
Hello Team,
How can i resolve above error.
please help
Hello, @arjundalal
Could you share Podfile if you solve this problem?
Thanks
My stack:
- RN: 0.61.5
- Xcode: 11.1
- Cocoapod: 1.8.4
I have checked all above things, but failed to build iOS project.
Please help me!
yes sure
My pod file is as follows:
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNSketchCanvas', :path => '../node_modules/@terrylinla/react-native-sketch-canvas'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'Firebase/Messaging'
pod 'Firebase/Core'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
use_native_modules!
pod 'RNPhotoEditor', :path => '../node_modules/react-native-photo-editor/ios'
use_frameworks!
pod 'iOSPhotoEditor', :git => 'https://github.com/prscX/photo-editor', :branch => 'master'
pod 'react-native-apple-authentication', :path => '../node_modules/react-native-apple-authentication'
post_install do |installer|
rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
rnfirebase.build_configurations.each do |config|
config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ${PODS_ROOT}/Headers/Public/**'
end
installer.pods_project.targets.each do |target|
if target.name.include?('iOSPhotoEditor')
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5'
end
end
end
end
please check my pod file data
Thanks for your reply.
[!] The 'Pods-PikadishApp' target has transitive dependencies that include statically linked binaries: (FirebaseAuth, FirebaseCore, FirebaseCoreDiagnostics, GoogleDataTransportCCTSupport, GoogleDataTransport, FirebaseInstanceID, and FirebaseFirestore)
I got this error during pod install.
have you install this pod manually
Yes.
According to installation document, I edited Podfile and run pod install
.
I copy/paste below code on Podfile from your Podfile, and got above issue.
post_install do |installer|
rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
rnfirebase.build_configurations.each do |config|
config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ${PODS_ROOT}/Headers/Public/**'
end
installer.pods_project.targets.each do |target|
if target.name.include?('iOSPhotoEditor')
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5'
end
end
end
i think this is pod installation issue.
please delete pod folder and re-install it.
in react 0.61.5 pod link automatically by running command pod install
actually i use firebase so i write code like this.
post_install do |installer|
rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
rnfirebase.build_configurations.each do |config|
config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ${PODS_ROOT}/Headers/Public/**'
end
installer.pods_project.targets.each do |target|
if target.name.include?('iOSPhotoEditor')
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5'
end
end
end
if you dont use firebase than use only this code
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name.include?('iOSPhotoEditor')
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5'
end
end
end
I also use firebase.
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
target 'PikadishAppTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
pod 'RNPhotoEditor', :path => '../node_modules/react-native-photo-editor/ios'
use_frameworks!
pod 'iOSPhotoEditor', :git => 'https://github.com/prscX/photo-editor', :branch => 'master'
post_install do |installer|
rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
rnfirebase.build_configurations.each do |config|
config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ${PODS_ROOT}/Headers/Public/**'
end
installer.pods_project.targets.each do |target|
if target.name.include?('iOSPhotoEditor')
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5'
end
end
end
end
This is my Podfile
than what the issue
Error during pod install
.
[!] The 'Pods-PikadishApp' target has transitive dependencies that include statically linked binaries: (FirebaseAuth, FirebaseCore, FirebaseCoreDiagnostics, GoogleDataTransportCCTSupport, GoogleDataTransport, FirebaseInstanceID, and FirebaseFirestore)
please follow this documentation for firebase. i think the issue is of firebase
https://rnfirebase.io/docs/v5.x.x/installation/initial-setup
Sorry. It's same error after I followed firebase installation.
@prscX is there a standard approach for setting up on iOS?
Use xcode 10 instead of xcode 11 please.
Add the swift path to libraries search path in your target
Please can you be clearer here? A little more details
I fixed the above errors by adding an empty swift file to my project, based on this thread:
https://stackoverflow.com/a/56176956
Please how what did you do in the context of this package? It would help if you specified the steps here
I fixed the above errors by adding an empty swift file to my project, based on this thread:
https://stackoverflow.com/a/56176956
you saved my day buddy. i was looking for a solution for a week.