Cocoapods Podspec Source HTTP Authentication Suppo

2020-07-24 06: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条回答
叼着烟拽天下
2楼-- · 2020-07-24 07:21

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.

查看更多
登录 后发表回答