ios - 如何通过 CocoaPods 使用本地项目

标签 ios objective-c xcode cocoapods podspec

我正在努力寻找一种方法来将我们创建的 Xcode 框架打包为仅在内部使用(不公开,不在 github 上)的 Pod。

如何修改 .podspec 以从我的开发机器上的本地 Xcode 项目构建 SDK?

最佳答案

本地 CocoaPods

[Dependency manager]

[Cocoapods with specyfic branch]

Git 示例: enter image description here

文字

播客文件

//Podfile pod supports:
//default(try to find .podcpec in centralised repo), path
//-remote    
    pod 'PodName'
//-local     
    //local_path can be absolute or relative
    pod 'PodName', :path => '<local_path>.podspec'

播客规范

//Podspec source supports:
//git, svn, hg, http
//-remote    
    s.source = { :git => "https://url_to.git", :tag => "git_tag" }
//-local     
    s.source = { :git => 'file:///path_to_git_folder', :tag => "git_tag" }
    //or, where path_to_git_folder can be relative
    s.source = { :git => '/path_to_git_folder', :tag => "git_tag" }

不要忘记事先提交您的更改。 git_tag 可以和分支名一样。

几个有用的命令:

更新:

Pod 文件:

pod update

检查 .podspec:

pod spec lint "<some_path>.podspec" --quick
pod spec lint "<some_path>.podspec" --verbose --allow-warnings

注册 session :

pod trunk register <email> '<name>' --description='<description>' 

发布:

pod trunk push <file>.podspec --verbose --allow-warnings

广告连播搜索 [About] :

pod search <pod_name>

[Local Carthage] [Local Swift Package Manager]

[Android Maven local]

关于ios - 如何通过 CocoaPods 使用本地项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53817633/

相关文章:

php - Apple Push 服务长时间无法连接。我这边什么都没有改变

ios - 是否可以在 nib 中使用 View Controller ?还是只是 UIViews?

objective-c - Paypal 状态待处理

xcode - 如何使用 qmake 和 QT 生成 xcode 项目

swift - UITabBar 在 "Back"按钮后消失

xcode - 在带有 Cordova 2.1 的 xcode 4.5 中启动图像不会更新

ios - 无法使用类型为 '[AnyObject]?' 的索引下标类型为 'UInt32' 的值

ios - UIApplication sharedApplication keyWindow - iOS App Widget

iphone - 尝试显示图像数组,代码将 iPhone 返回到主屏幕

ios - 如何在表格 View Controller 中的导航栏正下方添加自定义 View ?