6

I am have to external libraries I am using in an iOS project

pod 'SQLite.swift', '~> 0.10.1'
pod 'ObjectMapper', '~> 1.3'

In a class, I am trying to use both:

import Foundation
import SQLite
import ObjectMapper

class SqlLiteDataManager
{
   init()
   {
      let insert = experiences.insert(json <- jsonValue, isPublicExpr <- isPublic)
   }
}

The "<-" now throws an error since it is defined in both libraries .. The error thrown is Ambiguous operator declaration found for operator

So .. besides creating a separate file, is there a way to solve this with the same class / file?

andyvn22
  • 14,696
  • 1
  • 52
  • 74
Scott Ross
  • 123
  • 1
  • 7
  • 1
    Disambiguating things is currently problematic. Do type hints help? That would look like `experiences.insert((json <- jsonValue) as Setter, (isPublicExpr <- isPublic) as Setter)`. – zneak Jul 13 '16 at 01:29
  • You could only import the stuff you need from one framework (e.g. `import protocol ObjectMapper.Mappable`), then this frameworks operator isn't available. – Kametrixom Jul 13 '16 at 02:11
  • 1
    Thank you for the help.. i broke this up to two different classes – Scott Ross Jul 18 '16 at 19:29

0 Answers0