当前位置:  开发笔记 > 前端 > 正文

无法在Swift中导入ObjectMapper

如何解决《无法在Swift中导入ObjectMapper》经验,为你挑选了1个好方法。

我需要将JSON反序列化为对象,我认为使用ObjectMapper会很棒.

遗憾的是,无法导入对象映射器.我收到消息:

No such module 'ObjectMapper'

这是我的podfile

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!



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

pod 'Alamofire', '~> 3.0'
use_frameworks!
pod "EVReflection", '~> 2.6'
use_frameworks!
pod 'ObjectMapper', '~> 1.0'            
end

我甚至尝试过Git导入,但它不起作用



1> sanjana..:

我用过那个,XCode在import语句中显示了同样的错误但是如果你构建你的项目它会构建得很好.似乎XCode需要一些时间来缓存新的更改,因为在下次导入时它不会显示任何错误.

推荐阅读
谢谢巷议
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有