折腾:
[已解决]Mac中尝试安装pod结果出错:-bash: pod: command not found
期间,在安装了cocoapods之后,去顺带去看看已有的和pod相关的东西。
之前已有项目的Podfile:
# Uncomment this line to define a global platform for your project # Uncomment this line if you’re using Swift platform :ios, ‘8.0’ use_frameworks! inhibit_all_warnings! source ‘https://github.com/CocoaPods/Specs.git’ target "INQuzhou" do pod ‘AFNetworking’, ‘~> 2.0’ pod ‘MBProgressHUD’, ‘~> 0.9.1’ pod ‘SDWebImage’, ‘~> 3.7’ pod ‘UMengAnalytics’ pod ‘YYModel’, ‘1.0.3’ pod ‘MJRefresh’, ‘3.1.0’ pod ‘Realm’, ‘~>0.98.8’ pod ‘RaptureXML@Gilt’, ‘1.0.11’ end target "INQuzhouTests" do end target "INQuzhouUITests" do end |
以及:
Podfile.lock
PODS: – AFNetworking (2.6.3): – AFNetworking/NSURLConnection (= 2.6.3) – AFNetworking/NSURLSession (= 2.6.3) – AFNetworking/Reachability (= 2.6.3) – AFNetworking/Security (= 2.6.3) – AFNetworking/Serialization (= 2.6.3) – AFNetworking/UIKit (= 2.6.3) – AFNetworking/NSURLConnection (2.6.3): – AFNetworking/Reachability – AFNetworking/Security – AFNetworking/Serialization – AFNetworking/NSURLSession (2.6.3): – AFNetworking/Reachability – AFNetworking/Security – AFNetworking/Serialization – AFNetworking/Reachability (2.6.3) – AFNetworking/Security (2.6.3) – AFNetworking/Serialization (2.6.3) – AFNetworking/UIKit (2.6.3): – AFNetworking/NSURLConnection – AFNetworking/NSURLSession – MBProgressHUD (0.9.2) – MJRefresh (3.1.0) – RaptureXML@Gilt (1.0.11) – Realm (0.98.8): – Realm/Headers (= 0.98.8) – Realm/Headers (0.98.8) – SDWebImage (3.7.5): – SDWebImage/Core (= 3.7.5) – SDWebImage/Core (3.7.5) – UMengAnalytics (3.6.6) – YYModel (1.0.3) DEPENDENCIES: – AFNetworking (~> 2.0) – MBProgressHUD (~> 0.9.1) – MJRefresh (= 3.1.0) – RaptureXML@Gilt (= 1.0.11) – Realm (~> 0.98.8) – SDWebImage (~> 3.7) – UMengAnalytics – YYModel (= 1.0.3) SPEC CHECKSUMS: AFNetworking: cb8d14a848e831097108418f5d49217339d4eb60 MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1 MJRefresh: 743e6404967d1c2c688472ea3ecfde247d872db4 RaptureXML@Gilt: 4b6271a68aa150413726523835dbec367d94c9b1 Realm: 0e293bb62999730599efc3048896bbd4f2e43bcd SDWebImage: 69c6303e3348fba97e03f65d65d4fbc26740f461 UMengAnalytics: 4bf831415146b9c57cb10be65fbd43462ef8cf65 YYModel: 63142c2f07c5c8c9d1c261689cf3827ea6ab2886 COCOAPODS: 0.39.0 |
是指定了版本。
以及下载下来的Pods文件夹下面的对应的库:
以及.xcworkspace文件:
其中内容是:
<?xml version="1.0" encoding="UTF-8"?> <Workspace version = "1.0"> <FileRef location = "group:INQuzhou.xcodeproj"> </FileRef> <FileRef location = "group:Pods/Pods.xcodeproj"> </FileRef> </Workspace> |
对应的运行的是:
Pods下面的:
Pods.xcodeproj
然后发现内部是包含导入了各个库的各个文件:
-》
这样运行:xcworkspace文件是
-》内部调用Pods/Pods.xcodeproj
-》内部自动导入了对应的各种第三方的库
-》就起到了iOS第三方库的管理的工作了。