Dhanesh Dhanesh - 3 months ago 12
Ruby Question

what is the difference between single quote ( ' ) and double quote ( " ) in cocoapod?

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 ?

Answer

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
Comments