Cocoapods Podspec Source HTTP Authentication Support

白昼怎懂夜的黑 提交于 2019-12-06 10:40:18

问题


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

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.

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

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

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

I had a look at both

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


回答1:


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.



来源:https://stackoverflow.com/questions/36045520/cocoapods-podspec-source-http-authentication-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!