无法访问github,pod无法添加三方库,此时gitlab上有这个三方库并且可以访问。
以FMDB为例子
本地路径:/Users/用户名/.cocoapods/repos/trunk/Specs/f/4/e/FMDB/2.7.5

修改podspec.json内source
github | gitlab |
"source": { "git": "https://github.com/ccgus/fmdb.git", "tag": "2.7.5" } | "source": { "git": "http://pods.pajk-ent.com/ccgus/fmdb.git", "tag": "2.7.5" } |
{ "name": "FMDB", "version": "2.7.5", "summary": "A Cocoa / Objective-C wrapper around SQLite.", "homepage": "https://github.com/ccgus/fmdb", "license": "MIT", "authors": { "August Mueller": "gus@flyingmeat.com" }, "source": { "git": "http://pods.pajk-ent.com/ccgus/fmdb.git", "tag": "2.7.5" }, "requires_arc": true, "default_subspecs": "standard", "platforms": { "osx": null, "ios": null, "tvos": null, "watchos": null }, "subspecs": [ { "name": "standard", "libraries": "sqlite3", "source_files": "src/fmdb/FM*.{h,m}", "exclude_files": "src/fmdb.m" }, { "name": "FTS", "source_files": "src/extra/fts3/*.{h,m}", "dependencies": { "FMDB/standard": [
] } }, { "name": "standalone", "xcconfig": { "OTHER_CFLAGS": "$(inherited) -DFMDB_SQLITE_STANDALONE" }, "dependencies": { "sqlite3": [
] }, "source_files": "src/fmdb/FM*.{h,m}", "exclude_files": "src/fmdb.m" }, { "name": "standalone-fts", "xcconfig": { "OTHER_CFLAGS": "$(inherited) -DFMDB_SQLITE_STANDALONE" }, "source_files": [ "src/fmdb/FM*.{h,m}", "src/extra/fts3/*.{h,m}" ], "exclude_files": "src/fmdb.m", "dependencies": { "sqlite3/fts": [
] } }, { "name": "SQLCipher", "dependencies": { "SQLCipher": [
] }, "source_files": "src/fmdb/FM*.{h,m}", "exclude_files": "src/fmdb.m", "xcconfig": { "OTHER_CFLAGS": "$(inherited) -DSQLITE_HAS_CODEC -DHAVE_USLEEP=1", "HEADER_SEARCH_PATHS": "SQLCipher" } } ] } |