Cocoapods Podspec源HTTP身份验证支持 [英] Cocoapods Podspec Source HTTP Authentication Support

查看:175
本文介绍了Cocoapods Podspec源HTTP身份验证支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究建立一个私有仓库,该仓库允许通过Cocoapods分发二进制 .framework 文件(因此没有源代码)。

I am looking into setting up a private repo that allows distributing binary .framework files (so no source code) via Cocoapods.

实际的存储库将托管在Git服务器上,就像Cocoapods页面建议的那样,实际的 .framework 文件将托管在其他服务器上将允许通过HTTP访问 .framework 文件。

The actual repo will be hosted on a Git server, just like the Cocoapods page suggests and the actual .framework files will be hosted on a different server that would allow accessing the .framework files via HTTPs.

假设我将其添加到.podspec文件中: / p>

Let's say I add this in the .podspec file:

spec.source           = { :http => 'https://myhostserver.com/Releases/v1.0.0/MyLibrary.framework.zip' }

通过阅读文档,我不清楚Cocoapods支持哪种身份验证,以通过HTTP引用 .framework 文件。

From reading the documentation it's not clear to me what kind of authentication does Cocoapods support for referencing the .framework file via HTTPs.

我都看过

http://guides.cocoapods.org/making/private-cocoapods.html
https://guides.cocoapods.org/syntax/podspec.html#source

推荐答案

CocoaPods的下载器正在使用CURL在后台下载文件。如果要使用HTTP,则可以在〜/ .netrc 文件中设置身份验证凭据。

CocoaPods' Downloader is using CURL for downloading files under the hood. If you want to use HTTP, you can setup your authentication credentials in the ~/.netrc file.

这篇关于Cocoapods Podspec源HTTP身份验证支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆