[英]CocoaPods not creating Pods.xcconfig on pod install
CocoaPods is no longer creating a Pods.xcconfig
file automatically on pod install
for my project. CocoaPods不再在我的项目的
pod install
上自动创建Pods.xcconfig
文件。 The file is shown in red font within the project workspace and is not in the Pods/
directory. 该文件在项目工作区内以红色字体显示,不在
Pods/
目录中。
My Podfile
looks like this: 我的
Podfile
看起来像这样:
platform :ios, '7.0'
target "ProjectName" do
# Team Created Pods - kept and versioned in private spec repo
pod 'ProjectImageObject', '0.1.0'
pod 'Image+Bundle+Name', '0.1.0'
# Team Forked Pods - kept and versioned in private spec Repo
pod 'MagicalRecord', '2.2.1-pn'
pod 'KeychainItemWrapper', '0.1.0'
pod 'DCRoundSwitch', '0.1.0'
pod 'JBSignatureController', '0.1.0'
pod 'MBProgressHUD', '0.5.1-pn'
pod 'PKRevealController', '1.1.0-pn'
pod 'SMCalloutView', '2.0'
pod 'SVPullToRefresh', '0.4.2-pn'
pod 'TimesSquare', '1.1.0-pn'
pod 'XMLReader', '0.1.0'
# Third-Party Pods
pod 'Reachability', '~> 3.1.1'
pod 'AFNetworking', '~> 2.1'
pod 'TTTAttributedLabel', '~>1.8'
pod 'TPKeyboardAvoiding', '~> 1.2.3'
end
target "ProjectNameTests" do
# Team Created Pods - kept and versioned in private spec rep
pod 'SharedTestCore'
# Third-Party Pods
pod 'OCHamcrest', '~> 3.0.1'
pod 'OCMockito', '~> 1.1.0'
end
When I run pod install
via Terminal, no error is thrown. 当我通过终端运行
pod install
,不会抛出任何错误。 Strangely enough, Pods-ProjectName.xcconfig
is created. 奇怪的是,创建了
Pods-ProjectName.xcconfig
。
What do I need to do to fix CocoaPods
to automatically create the Pods.xcconfig
file? 我需要做些什么来修复
CocoaPods
以自动创建Pods.xcconfig
文件?
What I've tried so far : 到目前为止我尝试过的:
pod install
again. pod install
。 Pods/
directory, Podfile.lock
, the project workspace
, and running pod install
Pods/
目录, Podfile.lock
,项目workspace
和运行pod install
search paths
are default values (CocoaPods help guide mentions this can cause problems otherwise?) search paths
都是默认值(CocoaPods帮助指南提到这可能会导致问题吗?) Originally, I didn't specify the target "ProjectName"
wrapper in my Podfile
. 最初,我没有在
Podfile
指定target "ProjectName"
包装器。 Instead, I simply had 相反,我只是
# Team Created Pods - kept and versioned in private spec repo
pod 'ProjectImageObject', '0.1.0'
pod 'Image+Bundle+Name', '0.1.0'
# Team Forked Pods - kept and versioned in private spec Repo
pod 'MagicalRecord', '2.2.1-pn'
# ... and so on ...
Hence, Pods.xcconfig
(for the universal
pod list) was created and libPods.a
was added to the Link binary with library
build stage of my ProjectName
target. 因此,
Pods.xcconfig
(用于universal
窗格列表),并将libPods.a
添加到Link binary with library
ProjectName
目标的Link binary with library
构建阶段的Link binary with library
。
Later, I wrapped said block in target "ProjectName" do
, ie 后来,我在
target "ProjectName" do
包裹了所述块,即
target "ProjectName" do
# Team Created Pods - kept and versioned in private spec repo
pod 'ProjectImageObject', '0.1.0'
pod 'Image+Bundle+Name', '0.1.0'
# Team Forked Pods - kept and versioned in private spec Repo
pod 'MagicalRecord', '2.2.1-pn'
# ... and so on...
end
This created a Pods-ProjectName.xcconfig
, but it did not create Pods.xcconfig
(as no files belonged to the default
pod list) or libPod.a
. 这创造了一个
Pods-ProjectName.xcconfig
,但它并没有创造Pods.xcconfig
(因为没有文件属于default
荚列表)或libPod.a
。
CocoaPods also did not remove libPods.a
from the Link binary with library
build stage or Pods.xcconfig
from the workspace. 的CocoaPods也没有删除
libPods.a
从Link binary with library
构建阶段或Pods.xcconfig
从工作区。
This resulted in linker errors to the effect of libPods.a can not be found
. 这导致链接器错误
libPods.a can not be found
的效果。
To fix it, I reverted to the original target-less pod
statements (my ProjectNameTest
target needs to see these pods too) and had to manually remove libPods.a
from the Link binary with library
build stage and Pods.xcconfig
from the workspace. 为了解决这个问题,我恢复了原来的目标少
pod
语句(我ProjectNameTest
目标需要看到这些荚太),并且必须手动删除libPods.a
从Link binary with library
构建阶段, Pods.xcconfig
从工作区。
Ideally, CocoaPods would take care of this clean up for you, and hopefully, this will be the case in the future (current version of CocoaPods as of this writing is 0.29, which requires this manual cleanup process). 理想情况下,CocoaPods将为您处理此类清理,并且希望将来会出现这种情况(截至撰写本文时,CocoaPods的当前版本为0.29,这需要此手动清理过程)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.