1

As i am very familiar with Cocoapod library to integrate 3rd party iOS library in our project with very easy steps and versioning also in managed way and very easy to upgrade version of any 3rd party library.

Generally we are using below command for any 3rd party library in POD file to get in our project.

POD '<Library Name>'

One more we are using was

POD "<Library Name>"

so may i know what is the logical difference between both of this command ?

Avi
  • 7,469
  • 2
  • 21
  • 22
CodeChanger
  • 7,953
  • 5
  • 49
  • 80
  • i think this must be in a syntax to include cocoa pods to any project ..or [have a look](http://stackoverflow.com/a/16601500/4003548) – vaibhav Aug 17 '16 at 06:15

2 Answers2

3

Single quotes are used for just strings.

Where as Double quotes are used for both strings and string interpolation.

Example:

name = 'User Name' //User Name

welcome_note_using_sigle_qoute = 'Welcome #{name}' //Welcome /#{name}
welcome_note_using_double_qoute = "Welcome #{name}"  //Welcome User Name
0

I believe that a podfile is essentially a Ruby source code file, therefore what applies is the difference between ' and " and Ruby:

Double vs single quotes

(single quotes make the string to be interpreted literally, without string interpolation and ignoring character escaping).

Taking an example from CocoaPods Podfile Documentation:

post_install do |installer|
  installer.pods_project.targets.each do |target|
     puts "#{target.name}"
  end
end

The string interpolation #{...} wouldn't be possible with single quotes.

The question what you should use is probably subjective and depends on the usage.

Community
  • 1
  • 1
Sulthan
  • 128,090
  • 22
  • 218
  • 270