nativescript-camera-plus
nativescript-camera-plus copied to clipboard
[IOS]multiple dependencies with different sources for `QBImagePickerController` issue when use with nativescript-imagepicker
Issue: failed to build after installing nativescript-camera-plus if already installed nativescript-imagepicker , this is the error:
[!] There are multiple dependencies with different sources for `QBImagePickerController` in `Podfile`:
- QBImagePickerController (from `https://github.com/flypapertech/QBImagePicker.git`, commit `47aa21d32f8e6db0df79b089ad64e43d498b5951`)
- QBImagePickerController (~> 3.4.0)
'pod install' command failed.
the issue is that imagepicker and camera-plus have different version of dependency version of QBImagePickerController
THis is the generated Podfile (platform/ios/podfile)
# Begin Podfile - /Users/chizhang/Program/knotes-mobile/node_modules/@nstudio/nativescript-camera-plus/platforms/ios/Podfile
pod 'SwiftyCam', :git => 'https://github.com/NathanWalker/SwiftyCam.git', :branch => 'feature/swift-4.2'
pod "QBImagePickerController", :git => 'https://github.com/flypapertech/QBImagePicker.git', :commit => '47aa21d32f8e6db0df79b089ad64e43d498b5951'
def post_install_nstudio_nativescript_camera_plus_0 (installer)
installer.pods_project.targets.each do |target|
if target.name == 'SwiftyCam'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
end
# End Podfile
......
......
# Begin Podfile - /Users/chizhang/Program/knotes-mobile/node_modules/nativescript-imagepicker/platforms/ios/Podfile
pod 'QBImagePickerController', '~> 3.4.0'
# End Podfile
end
Step to reproduce,
- create a new project
- install imagepicker
tns plugin add nativescript-imagepicker
3 install camera-plustns plugin add @nstudio/nativescript-camera-plus
- build ios target
tns debug ios
How can we solve this ?
This fix is released in V7.0.1? Because I'm still facing this issue.
Hi there, We are facing the same here after upgrading to cli v7.0.1. Is there a fix/workaround there please?
Regards, Shan
Someone resolved this ??
Hi, any help is appreciated. I still have this issue.
Same error using v7.1. Any solution?
@alejandrovillen the way we fixed the issue is by reverting iOS platform to "@nativescript/ios": "6.5.4"
@shanxp Thnks!!!
Steps that solve in my case.
- Deleted dependence from package.json -> "nativescript-imagepicker": "7.1.0",
- Change "@nativescript/ios": "7.1.0 to "@nativescript/ios": "6.5.4"
- Change from your code all imports: // import * as imagepicker from "nativescript-imagepicker"; import * as imagepicker from "@nativescript/imagepicker";