nstudio / nativescript-camera-plus

MIT License
79 stars 50 forks source link

[IOS]multiple dependencies with different sources for `QBImagePickerController` issue when use with nativescript-imagepicker #132

Open luffyzc opened 4 years ago

luffyzc commented 4 years ago

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,

  1. create a new project
  2. install imagepicker tns plugin add nativescript-imagepicker 3 install camera-plus tns plugin add @nstudio/nativescript-camera-plus
  3. build ios target tns debug ios

How can we solve this ?

mhtsharma948 commented 4 years ago

This fix is released in V7.0.1? Because I'm still facing this issue.

shanxp commented 3 years ago

Hi there, We are facing the same here after upgrading to cli v7.0.1. Is there a fix/workaround there please?

Regards, Shan

kriefsacha commented 3 years ago

Someone resolved this ??

alexisconsuegra commented 3 years ago

Hi, any help is appreciated. I still have this issue.

alejandrovillen commented 3 years ago

Same error using v7.1. Any solution?

shanxp commented 3 years ago

@alejandrovillen the way we fixed the issue is by reverting iOS platform to "@nativescript/ios": "6.5.4"

alejandrovillen commented 3 years ago

@shanxp Thnks!!!

Steps that solve in my case.