<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cocopods &#8211; 编程技术记录</title>
	<atom:link href="https://blog.z6z8.cn/tag/cocopods/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.z6z8.cn</link>
	<description>世界你好!</description>
	<lastBuildDate>Mon, 29 Mar 2021 08:36:52 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>CocoaPod 指定动态或者静态链接framework</title>
		<link>https://blog.z6z8.cn/2021/03/29/cocoapod-%e6%8c%87%e5%ae%9a%e5%8a%a8%e6%80%81%e6%88%96%e8%80%85%e9%9d%99%e6%80%81%e9%93%be%e6%8e%a5framework/</link>
		
		<dc:creator><![CDATA[holdsky]]></dc:creator>
		<pubDate>Mon, 29 Mar 2021 08:36:52 +0000</pubDate>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[cocopods]]></category>
		<guid isPermaLink="false">http://blog.z6z8.cn/?p=977</guid>

					<description><![CDATA[当在podfile文件中使用use_frameworks!指令时，CocoaPod在安装Pod时，会用fram [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>当在<code>podfile</code>文件中使用<code>use_frameworks!</code>指令时，CocoaPod在安装Pod时，会用framework方式组织资源（默认使用lib方式），同时该指令还提供扩展选项，指定动态framework或者静态framework</p>
<pre><code>use_frameworks!  #使用默认值，根据pod类型自行设置static或者dynamic
use_frameworks! :linkage => :static # 使用静态链接
use_frameworks! :linkage => :dynamic #使用动态链接</code></pre>
<p>如果在<code>podfile</code>中设置<code>use_frameworks! </code>，又没有指定<code>linkage =&gt; :static</code>或<code>linkage =&gt; :dynamic</code>时，则会根据<code>podspec</code>文件中的根配置<code>static_framework = true/false</code>来设置。</p>
<p>另外，<code>linkage =&gt; :static</code>或<code>linkage =&gt; :dynamic</code>只对源码Pod有效，对已经是framework的pod不起作用。而且，如果pod中的framework是动态库，那么在<code>pod install</code>后，会在相应的target的<code>Build Phases</code>设置中添加<code>[cp] Embed Pods Frameworks</code>脚本，以动态库的方式将framework输出到最终产物中。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>引入私有CocoaPod编译报错include of non-modular header inside framework module</title>
		<link>https://blog.z6z8.cn/2021/01/27/%e5%bc%95%e5%85%a5%e7%a7%81%e6%9c%89cocoapod%e7%bc%96%e8%af%91%e6%8a%a5%e9%94%99include-of-non-modular-header-inside-framework-module/</link>
		
		<dc:creator><![CDATA[holdsky]]></dc:creator>
		<pubDate>Wed, 27 Jan 2021 14:10:28 +0000</pubDate>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[cocopods]]></category>
		<guid isPermaLink="false">http://blog.z6z8.cn/?p=967</guid>

					<description><![CDATA[原因是引入的CocoaPod仓库，编译后缺少module.modulemap文件；通常是因为私有CocoaPo [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>原因是引入的CocoaPod仓库，编译后缺少<code>module.modulemap</code>文件；通常是因为私有CocoaPod仓库只有声明文件，没有定义实现文件-----只有<code>.h </code>文件，没有<code>.m</code> <code>.mm</code>等文件。<br />
简单的解决办法是在私有仓库添加一个空的<code>.m</code>文件，例如添加<code>cocoapod.m</code>文件(名字随意)</p>
<pre><code class="language-objc">/// cocoapod.m
#import <Foundation/Foundation.h></code></pre>
<p>然后在<code>podspec</code>文件中，将这个文件添加到<code>source_files</code>属性里</p>
<pre><code class="language-ruby">s.public_header_files = '公开的头文件'
s.source_files = '已有的源文件','cocoapod.m'   #也可使用通配符写法 ，如 **/*.{h,m}</code></pre>
<p>再次<code>pod install</code>即可生成<code>module.modulemap</code>文件</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>安装指定版本的CocoaPods</title>
		<link>https://blog.z6z8.cn/2019/10/31/%e5%ae%89%e8%a3%85%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e7%9a%84cocoapods/</link>
					<comments>https://blog.z6z8.cn/2019/10/31/%e5%ae%89%e8%a3%85%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e7%9a%84cocoapods/#respond</comments>
		
		<dc:creator><![CDATA[holdsky]]></dc:creator>
		<pubDate>Thu, 31 Oct 2019 09:41:11 +0000</pubDate>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[安全运维]]></category>
		<category><![CDATA[cocopods]]></category>
		<guid isPermaLink="false">http://blog.z6z8.cn/?p=540</guid>

					<description><![CDATA[因为一些编译构建问题，我需要降级CocoaPods 过程如下: 卸载当前版本的CocoaPods sudo g [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>因为一些编译构建问题，我需要降级CocoaPods<br />
过程如下:</p>
<h1>卸载当前版本的CocoaPods</h1>
<pre><code class="language-shell">sudo gem uninstall cocoapods</code></pre>
<h1>下载指定版本的CocoaPods，编译gem包</h1>
<p>下载地址https://github.com/CocoaPods/CocoaPods/releases<br />
将源码下载后解压，进入源码目录，编译gem包</p>
<pre><code class="language-shell">gem build cocopods.gemspec</code></pre>
<p>编译产物是 cocopods-版本号.gem</p>
<h1>使用本地gem包安装CocoaPods</h1>
<pre><code class="language-shell">sudo gem install cocopods-版本号.gem</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.z6z8.cn/2019/10/31/%e5%ae%89%e8%a3%85%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e7%9a%84cocoapods/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
