文章目录

今天使用CocoaPods来添加第三方类库XMPPFramework时,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动:

原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少。加参数的命令如下:

1
2
$ pod install --verbose --no-repo-update
$ pod update --verbose --no-repo-update

或者

1
2
$ pod install --no-repo-update
$ pod update --no-repo-update

上面的报错是:

[!]无法满足下列要求:

XMPPFramework - ‘(~ > 3.7.0)’按`podfile` 您的规格的来源没有包含规格满足依赖关系:`xmppframework(~ > 3.7.0)`。

Podfile修改为

1
pod 'XMPPFramework'

之后,就好了。

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
huangsengolndeMacBook-Pro:ObjectiveCDemo160728 huangaengoln$ pod update --verbose --no-repo-update
Update all pods
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-ObjectiveCDemo160728`: (``)
Finding Podfile changes
A XMPPFramework
- AMap2DMap-NO-IDFA
- BaiduMapKit
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
A CocoaAsyncSocket
A CocoaLumberjack
A XMPPFramework
- AMap2DMap-NO-IDFA
- AMapFoundation-NO-IDFA
- BaiduMapKit
Downloading dependencies
-> Using AMap2DMap-NO-IDFA (4.3.0)
-> Using AMapFoundation-NO-IDFA (1.3.1)
-> Using BaiduMapKit (3.0.0)
-> Installing CocoaAsyncSocket (7.4.3)
> Git download
> Git download
$ /usr/local/bin/git clone https://github.com/robbiehanson/CocoaAsyncSocket.git
/var/folders/tk/hh4jwk2s1_df6sb50yhqx2cw0000gn/T/d20170518-9181-g9xhol --template=
--single-branch --depth 1 --branch 7.4.3
Cloning into '/var/folders/tk/hh4jwk2s1_df6sb50yhqx2cw0000gn/T/d20170518-9181-g9xhol'...
Note: checking out 'f34134f7d14125370caf54b45dcb32d77b3ce38c'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
> Copying CocoaAsyncSocket from
`/Users/huangaengoln/Library/Caches/CocoaPods/Pods/Release/CocoaAsyncSocket/7.4.3-a18c7` to
`Pods/CocoaAsyncSocket`
-> Installing CocoaLumberjack (1.9.2)
> Git download
> Git download
$ /usr/local/bin/git clone https://github.com/CocoaLumberjack/CocoaLumberjack.git
/var/folders/tk/hh4jwk2s1_df6sb50yhqx2cw0000gn/T/d20170518-9181-1inm2t5 --template=
--single-branch --depth 1 --branch 1.9.2
Cloning into '/var/folders/tk/hh4jwk2s1_df6sb50yhqx2cw0000gn/T/d20170518-9181-1inm2t5'...
Note: checking out '09b65ed376419c00a05cf60cbf13b0fa72124d60'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
> Copying CocoaLumberjack from
`/Users/huangaengoln/Library/Caches/CocoaPods/Pods/Release/CocoaLumberjack/1.9.2-628fc` to
`Pods/CocoaLumberjack`
-> Installing XMPPFramework (3.6.6)
> Git download
> Git download
$ /usr/local/bin/git clone https://github.com/processOne/XMPPFramework.git
/var/folders/tk/hh4jwk2s1_df6sb50yhqx2cw0000gn/T/d20170518-9181-mpkvh5 --template=
--single-branch --depth 1 --branch 3.6.6
Cloning into '/var/folders/tk/hh4jwk2s1_df6sb50yhqx2cw0000gn/T/d20170518-9181-mpkvh5'...
Note: checking out '06eb15d6284cc65577bbb2df6df94fd00c52d4b8'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
> Running prepare command
$ /bin/bash -c set -e echo '#import "XMPP.h"' > XMPPFramework.h grep '#define _XMPP_' -r
/Extensions \ | tr '-' '_' \ | perl -pe 's/Extensions\/([A-z0-9_]*)\/([A-z]*.h).*/\n#ifdef
HAVE_XMPP_SUBSPEC_\U\1\n\E#import "\2"\n#endif/' \ >> XMPPFramework.h
grep: /Extensions: No such file or directory
> Copying XMPPFramework from
`/Users/huangaengoln/Library/Caches/CocoaPods/Pods/Release/XMPPFramework/3.6.6-b06c2` to
`Pods/XMPPFramework`
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding libraries to Pods project
- Adding resources to Pods project
Ignoring RedCloth-4.2.9 because its extensions are not built. Try: gem pristine RedCloth --version 4.2.9
Ignoring fast-stemmer-1.0.2 because its extensions are not built. Try: gem pristine fast-stemmer --version 1.0.2
Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10
Ignoring posix-spawn-0.3.11 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.11
Ignoring rdiscount-2.1.8 because its extensions are not built. Try: gem pristine rdiscount --version 2.1.8
Ignoring rdiscount-2.1.7 because its extensions are not built. Try: gem pristine rdiscount --version 2.1.7
Ignoring redcarpet-3.3.3 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.3
Ignoring redcarpet-3.3.2 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.2
Ignoring yajl-ruby-1.2.1 because its extensions are not built. Try: gem pristine yajl-ruby --version 1.2.1
- Linking headers
- Installing targets
- Installing target `CocoaAsyncSocket` iOS 5.0
- Installing target `CocoaLumberjack` iOS 5.0
- Installing target `XMPPFramework` iOS 6.0
- Installing target `Pods-ObjectiveCDemo160728` iOS 7.0
- Running post install hooks
- Writing Xcode project file to `Pods/Pods.xcodeproj`
- Generating deterministic UUIDs
- Writing Lockfile in `Podfile.lock`
- Writing Manifest in `Pods/Manifest.lock`
Integrating client project
Integrating target `Pods-ObjectiveCDemo160728` (`ObjectiveCDemo160728.xcodeproj` project)
- Running post install hooks
- cocoapods-stats from
`/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-1.0.0/lib/cocoapods_plugin.rb`
Sending stats
- AMap2DMap-NO-IDFA, 4.3.0
- AMapFoundation-NO-IDFA, 1.3.1
- BaiduMapKit, 3.0.0
- CocoaAsyncSocket, 7.4.3
- CocoaLumberjack, 1.9.2
- XMPPFramework, 3.6.6
-> Pod installation complete! There are 3 dependencies from the Podfile and 6 total pods installed.
[!] Automatically assigning platform ios with version 7.0 on target ObjectiveCDemo160728 because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
huangsengolndeMacBook-Pro:ObjectiveCDemo160728 huangaengoln$
文章目录