I have seen similar issues and solutions proposed. Thing is, it seems everthing is fine with me. I think the problem might be related to podfile. I have another dependency in my project which is react-native-charts-wrapper project. Now, that project has a podfile that has ios 9.0 as the platform version. This one has the platform version 8.0. I am trying to integrate both podfiles into a single one and specify 9.0 as the platform for this picker project also. Will it work or is this platform version is the source of my problem?
I am getting this error on ios simulator and real android device. On android simulator, it seems to work.
react-native run-android -> runs android simulator and picker works
npm start, then shake the device -> select reload. App loads and the picker won't work on real device with this.
I have below all in place:
import com.reactnative.ivpusic.imagepicker.PickerPackage;
new PickerPackage(),
implementation project(':react-native-image-crop-picker')
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
include ':react-native-image-crop-picker'
project(':react-native-image-crop-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-crop-picker/android')
Can anybody help me with this error, please? Do you think ios, '9.0' is causing the problem since picker seems to want 8.0?
Podfile for charts-wrapper project:
platform :ios, '9.0'
use_frameworks!
target 'MY_PROJECT' do
pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga/'
pod 'React', path: '../node_modules/react-native/', :subspecs => [
'Core',
'ART',
'RCTActionSheet',
'RCTAnimation',
'RCTLinkingIOS',
'RCTGeolocation',
'RCTImage',
'RCTNetwork',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'DevSupport',
'CxxBridge',
]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 'RNCharts', :path => '../node_modules/react-native-charts-wrapper' pre_install do |installer| installer.analysis_result.specifications.each do |s| s.swift_version = '5.0' unless s.swift_version end endend
My merged (chart-wrapper + crop-picker) podfile right now is this:
platform :ios, '9.0'
use_frameworks!
target 'MY_PROJECT' do
pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga/'
pod 'React', path: '../node_modules/react-native/', :subspecs => [
'Core',
'ART',
'RCTActionSheet',
'RCTAnimation',
'RCTLinkingIOS',
'RCTGeolocation',
'RCTImage',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'DevSupport',
'CxxBridge',
]
pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'
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 'RNCharts', :path => '../node_modules/react-native-charts-wrapper' pre_install do |installer| installer.analysis_result.specifications.each do |s| s.swift_version = '5.0' unless s.swift_version end endend
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
Pod install runs and output is like below:
Analyzing dependencies
Fetching podspec forDoubleConversionfrom../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
Fetching podspec forFollyfrom../node_modules/react-native/third-party-podspecs/Folly.podspec
Fetching podspec forRNChartsfrom../node_modules/react-native-charts-wrapper
Fetching podspec forRNImageCropPickerfrom../node_modules/react-native-image-crop-picker
Fetching podspec forReactfrom../node_modules/react-native/
Fetching podspec forglogfrom../node_modules/react-native/third-party-podspecs/glog.podspec
Fetching podspec foryogafrom../node_modules/react-native/ReactCommon/yoga/
Downloading dependencies
Installing Charts (3.3.0)
Installing DoubleConversion (1.1.6)
Installing Folly (2018.10.22.00)
Using QBImagePickerController (3.4.0)
Installing RNCharts (0.5.5)
Using RNImageCropPicker (0.24.1)
Using RSKImageCropper (2.2.1)
Installing React 0.59.4
Installing SwiftyJSON (5.0.0)
Installing boost-for-react-native (1.63.0)
Installing glog (0.3.5)
Using yoga (0.59.4.React)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 20 dependencies from the Podfile and 12 total pods installed.[!] [Xcodeproj] Generated duplicate UUIDs:
XCBuildConfiguration --
XCBuildConfiguration --
PBXBuildFile --
PBXBuildFile --
PBXBuildFile --
PBXBuildFile --
PBXBuildFile --
...
...
...
The wrong issue closed sorry. Re-opening.
If you are running it via react-native run-ios - atleast my error was that I needed to run it from xCode first, then react-native run-ios worked without that error.
Hope it helps!
If you are running it via react-native run-ios - atleast my error was that I needed to run it from xCode first, then react-native run-ios worked without that error.
Hope it helps!
Thanks @ipandz00 I did that too. Not working. I am installing another component in my project. So I am using a single podfile to install this crop-picker component and that "other" component.
The podfile of crop-picker suggests some post-install steps as below:
# very important to have, unless you removed React dependencies for Libraries
# and you rely on Cocoapods to manage it
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
But if I put this post-install steps in my podfile, then the installation of the other component seems to fail. Then I remove this post-install steps from my podfile and re-run pod install command. Now my other components works. Do you think removing the post install steps above causing this issue?
If so, how can I solve this problem. One crop-picker require this post-install steps, but other component won't work if I do so. What would be the solution for this? I am very alien when it comes to iOS and PODs.
Thanks @ivpusic
Note: I have seen this: https://github.com/ivpusic/react-native-image-crop-picker/issues/274
and this: https://github.com/ivpusic/react-native-image-crop-picker/issues/786
and this: https://github.com/ivpusic/react-native-image-crop-picker/issues/512
For anyone struggling with the same problem, I solved it as described here:
https://blog.csdn.net/junhuahouse/article/details/89574511
But I would still like to know why this had to be done manually although I followed all the installation steps one-by-one @ivpusic ?
I have the same issue on Android using RN 0.60.5 and solved this issue by running
react-native link react-native-image-crop-picker
I see in the MainApplication.java file that changes are added one line
import com.reactnative.ivpusic.imagepicker.PickerPackage;
Hope this helps
For me working fine in Android, I was facing the same issue in iPhone 11
could you please support for me in iOS
For anyone struggling with the same problem, I solved it as described here:
https://blog.csdn.net/junhuahouse/article/details/89574511But I would still like to know why this had to be done manually although I followed all the installation steps one-by-one @ivpusic ?
Hi, I did following the article. It runs perfectly. But when I upload to Testflight it said: "While processing your iOS app, errors occurred in the app thinning process, and your app couldn鈥檛 be thinned. If your app contains bitcode, bitcode processing may have failed. "
Did you encounter this issue?
I was running into this issue on iOS, and solved it simply by doing pod install in the ios directory and reloading the app.
I was running into this issue on iOS, and solved it simply by doing
pod installin the ios directory and reloading the app.
how can i do that in Windows ( for IOS and Android) ?
Most helpful comment
I have the same issue on Android using RN 0.60.5 and solved this issue by running
react-native link react-native-image-crop-pickerI see in the MainApplication.java file that changes are added one line
import com.reactnative.ivpusic.imagepicker.PickerPackage;Hope this helps