-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCocoaPods-Documentation
88 lines (45 loc) · 2 KB
/
CocoaPods-Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Cocoa Pods Installation:
Do steps 1-4 if Cocoapods is not installed in your MAC Machine
1. sudo gem update --system
(to install Ruby)
2. ruby -v
(to check ruby version)
Note: If ruby version is less then use following commands
rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable
3. (Install cocoa pods before installing pods)
sudo gem install cocoapods -V
or
sudo gem install -n /usr/local/bin cocoapods
(This is becauase of SIP in new MAC OSX)
4. pod setup
(after cocoapods is installed. This process will likely take a while as this command clones the CocoaPods Specs repository into ~/.cocoapods/ on your computer.)
Do steps from 5 if Cocoapods is already installed in your MAC Machine
5. Go to your project directory and run
pod init
This will generate a file "PodFile"
6. Go to your project directory and run
pod install
7. Now open new new file created "YourProjectName.xcworkspace". Don't use "YourProjectName.xcodeproj" from now.
8. To add a GitHub library write below example in "PodFile"
pod 'Reachability'
And run pod install in terminal
—————————————————————-----------------------
For updating cocoa pods installed on your system, execute below line
sudo gem install cocoapods
-------------------------------------------
Cocoa Pods Uninstallation:
Step 1) To check which versions of the cocoapds are installed on the local machine
sudo gem list --local | grep cocoapods
It will show somthing like this:
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.3)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.1.2)
cocoapods-try (1.1.0)
Step 2) To uninstall each version we have to run the following commands
It will uninstall the very first cocoa pods installed in the system:
sudo gem uninstall cocoapods-deintegrate
Similarly we have to repeat this process for each and every cocoa pods installed in the local system.