Search code examples
iosjsonswiftalamofirejson-deserialization

Cannot import ObjectMapper in Swift


I need to deserialize JSON to objects and I thought using the ObjectMapper would be great.

Unfortunately the object mapper can't be imported. I get the message:

No such module 'ObjectMapper'

Here is my 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

I even tried the Git import and it doesn't work


Solution

  • I used that and XCode was showing me same error on import statement but if you build your project it will build just fine. It seems that XCode take some time to cache new changes because on next import it won't show any error.