OGeek|极客世界-中国程序员成长平台

标题: ios - 如何在 iOS App Swift 中更新 Pod [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 22:54
标题: ios - 如何在 iOS App Swift 中更新 Pod

我有一个如下的 pod 文件 -

#取消注释这行以为你的项目定义一个全局平台

平台 :ios, '8.0'

source 'https://github.com/CocoaPods/Specs.git'

target 'OSLMobile' 做

pod 'AFNetworking'

pod 'libPhoneNumber-iOS', '~> 0.8'

结束

target 'OSLMobileTests' 做

pod 'AFNetworking'

pod 'libPhoneNumber-iOS', '~> 0.8'

结束

我想更新库“libPhoneNumber-iOS”。为此,我将进入我的项目目录并输入 pod 更新 libPhoneNumber-iOS

但这给了我错误-

[!] 无法使用 url 添加源 https://github.com/CocoaPods/Specs.git 命名主人。 您可以尝试在 ~/.cocoapods/repos 或通过 pod repo add 手动添加。

能否请教我如何更新 libPhoneNumber-iOS

其他细节 - XCode 8.0、Swift 2.3

谢谢。



Best Answer-推荐答案


运行 pod 初始化

如果你得到 [!] Existing Podfile found in Directory

转到 ~/.cocoapods/repos 并运行 git clone https://github.com/CocoaPods/Specs.git master

然后运行你的

pod 更新 libPhoneNumber-iOS

Reference

关于ios - 如何在 iOS App Swift 中更新 Pod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40713457/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4