当我使用CocoaPods时,“没有这样的模块”

编程入门 行业动态 更新时间:2024-10-19 19:30:18
本文介绍了当我使用CocoaPods时,“没有这样的模块”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以这是我的程序。我在项目目录中创建了一个新的 Podfile ,然后我添加了以下内容

So here's my procedure. I create a new Podfile in the project directory, then I added the following

platform :ios, '9.0' use_frameworks! target 'CPod' do pod 'AFNetworking', '~> 2.5' pod 'ORStackView', '~> 2.0' pod 'SwiftyJSON', '~> 2.1' end

我解雇 pod install ,一切顺利,打开 xcworkspace 。然后我转到 ViewController.swift 如果我尝试导入一个pod我得到没有这样的模块'SwiftyJSON' ,如果我要做导入SwiftyJSON 。任何想法?

I fire off pod install, and everything goes well, open up the xcworkspace. I then go over to ViewController.swift and if I try to import a pod I get No such module 'SwiftyJSON', if I were to do import SwiftyJSON. Any ideas?

编辑:SwiftyJSON是一个基于Swift的模块,而不是Obj-C

SwiftyJSON is a Swift based module, not Obj-C

推荐答案

尝试将 Pods 框架添加到构建方案并构建框架。构建之后,构建/运行项目。

Try adding the Pods framework to your build scheme and building the framework. After you've built it, build/run your project.

步骤:

  • Scheme菜单> Manage Schemes> check Pods > Close(图片1 ,图片2 )
  • 选择 Pod 。
  • 构建 Pods 。
  • 从同一菜单中选择您的项目,然后构建/运行它。
  • Scheme menu > Manage Schemes > check Pods > Close (Image 1, Image 2)
  • Select Pods from the scheme menu.
  • Build Pods.
  • Select your project from the same menu, then build/run it.
  • 更多推荐

    当我使用CocoaPods时,“没有这样的模块”

    本文发布于:2023-11-26 06:52:10,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1633083.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:当我   模块   CocoaPods

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!