Swift之cannot load underlying module for ‘***’

在使用Swift编程的工程中使用CocoaPods安装第三方框架会出现以下一些问题,

这个问题的出现是因为Podfile文件中没有写入  use_frameworks!

在pod file文件中写入这句话之后重新安装就能成功,但是,接下来在工程中导入第三方的头文件时,会报以下的错误:cannot load underlying module for ‘***’

这个问题出现的原因还是因为podfile文件,你需要在文件里再加上一句话  source 'https://github.com/CocoaPods/Specs.git'

所以,总共比起之前的习惯需要添加以上紫色的两句,

以下是一个成功的例子

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.0"
use_frameworks!

target "工程名" do
pod "SnapKit"
pod "Kingfisher"
pod "SVProgressHUD"
pod "FDFullscreenPopGesture", "~> 1.1"
pod "Alamofire"
pod "SwiftyJSON"
pod "MJRefresh"

end

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Up to date for iOS 13, Xcode 11 & Swift 5.1 With SwiftUI, you can define what your app’s UI should do with concise, declarative language, and say goodbye to tons of confusing UIKit code. Build modern, responsive UI and animations that look great on iOS, iPadOS, watchOS, tvOS or even macOS! Build fluid and engaging declarative UI for your apps — using less code — with SwiftUI! SwiftUI by Tutorials is designed to help you learn how to transition from the “old way” of building your app UI with UIKit, to the “new way” of building responsive UI with modern declarative syntax with SwiftUI. This book is for readers who are comfortable building Swift apps, and want to make the exciting leap into building their app UI with modern, declarative code. What is SwiftUI? SwiftUI lets you build better apps, faster, and with less code. It’s a developer’s dream come true! With SwiftUI, you can design your user interfaces in a declarative way; instead of developing app interfaces in an imperative way, by coding all of the application state logic before time, you can instead define what your app’s UI should do in a particular state and let the underlying OS figure out how to do it. What’s more is that SwiftUI lets you build modern, responsive UI and animations for all Apple devices — not just iOS. So whether you’re building apps for iOS, watchOS, tvOS or any other Apple platform, you can use the same concise, natural language to describe your UI and have it look stunning — no matter where your code runs. In addition, SwiftUI’s built-in automatic support for things such as dark mode, localization and accessibility, along with Xcode 11 support for drag-and-drop design and instant preview makes it easier to build apps than ever before.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值