ios - 如何访问 cocoa pod 库并向其添加模块?

标签 ios swift xcode cocoapods

我正在使用 macincloud 做一些 xcode 工作,我有一个 xcode 包,它在制作它的计算机上运行良好,但在 macincloud 中我得到一个无模块错误。我如何检查我的 pod 库,它是计算机的一部分还是我的代码的一部分?

我读过关于打开终端并输入不同的命令来安装 pod 但没有任何效果

这是我的 Podfile 中的内容:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'WallpaperBoard' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

    pod 'IQKeyboardManagerSwift'
    pod 'Google-Mobile-Ads-SDK'
    pod 'DBImageColorPicker'
    pod 'SSUIViewMiniMe'
  # Pods for WallpaperBoard

end

最佳答案

Cocoapods 是一个依赖管理器。在终端上运行 pod install 命令,它会下载所有 Pod 作为外部依赖项并为您的项目创建一个 .xcworkspace

它需要在您运行项目的每台不同计算机上运行一次。

在云中的 Mac 上:

  1. 打开终端
  2. 导航到 Podfile 所在的项目文件夹。通常您可以使用 cd 命令进行导航。示例:
cd  /Users/user_name/Desktop/project_folder 
  1. 运行命令以安装 Pod:
pod install
  1. 打开生成的.xcworkspace文件

关于ios - 如何访问 cocoa pod 库并向其添加模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58325770/

相关文章:

ios - 需要解释 Apple 配置文件的这些检查属性

ios - 如何杀死 "Unknown attribute ' flatten' ignored"警告?

swift - dyld : Library not loaded. .. 原因:找不到合适的图像

当应用程序进入后台时,AppDelegate 上的 IOS Vars 会被释放吗?

ios - Shinobi Donut 图表标签重叠

ios - 如何检测自定义 tableview 单元格何时离开屏幕?

ios - 提交到 AppStore : Found an unexpected Mach-O header code: 0x72613c21

ios - 单个 View Controller 中的两个 TableView : Show the View first before Loading Data

ios - 在 FSCalendar 中添加自定义假期

ios - 在 swift3 中加载 webview 时后退按钮卡住了?