Mohanraj
Mohanraj

Reputation: 597

pod installs swift 2.3 frameworks instead of swift 3 code

hi i am trying to install some frameworks using cocoapods and when i run 'pod install' it installs swift 2.3 frameworks which are not supported in swift 3

For Example

# platform :ios, '9.0'

pod 'BarcodeScanner'
target 'WhiskyBazar' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
 use_frameworks!


 # Pods for WhiskyBazar

 target 'WhiskyBazarTests' do
  inherit! :search_paths
  # Pods for testing
 end

 target 'WhiskyBazarUITests' do
  inherit! :search_paths
  # Pods for testing
end
end

when i run the above, it always installs barcode scanner version 1.0.0 which is supported in swift 2.3. But the latest version of barcode scanner is barcode scanner 2.0.0 which supports swift 3. please advice what changes i have to make in my project to install the latest version of the pod which supports swift 3.0

Upvotes: 0

Views: 171

Answers (2)

user7567632
user7567632

Reputation:

In the pod file,

# platform :ios, '9.0'

target 'WhiskyBazar' do
      # Comment this line if you're not using Swift and don't want to use dynamic frameworks
     use_frameworks!

   pod 'BarcodeScanner','~>2.0'

     # Pods for WhiskyBazar

     target 'WhiskyBazarTests' do
      inherit! :search_paths
      # Pods for testing
     end

    target 'WhiskyBazarUITests' do
      inherit! :search_paths
      # Pods for testing
    end
end

& give path of podfile on terminal,

cd path/->

pod install

Upvotes: 0

Nikunj Damani
Nikunj Damani

Reputation: 753

you should try

pod 'BarcodeScanner', '~> 2.0'

Upvotes: 1

Related Questions