Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
luffyzc opened this issue Jul 6, 2020 · 7 comments

Comments

@luffyzc
Copy link

luffyzc commented Jul 6, 2020

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
Copy link

mhtsharma948 commented Sep 10, 2020

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

@shanxp
Copy link

shanxp commented Oct 29, 2020

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
Copy link

Someone resolved this ??

@alexisconsuegra
Copy link

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

@alejandrovillen
Copy link

Same error using v7.1. Any solution?

@shanxp
Copy link

shanxp commented May 25, 2021

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

@alejandrovillen
Copy link

@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";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants