Skip to content

[IOS]multiple dependencies with different sources for QBImagePickerController issue when install with @nstudio/nativescript-camera-plus #328

@luffyzc

Description

@luffyzc

Which platform(s) does your issue occur on?

  • iOS

Issue

Failed to build IOS 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 for QBImagePickerController
This is my 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

I would like to use both plugin, is there a way to solve this issue ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions