mattdonnelly / Swifter

[DEPRECATED] :bird: A Twitter framework for iOS & OS X written in Swift
MIT License
2.37k stars 387 forks source link

library swiftyJSON error after import swifter in viewcontroller #338

Closed stnwj closed 3 years ago

stnwj commented 3 years ago
gambar

after import swifter. my JSON error. I tried delete import swifter. my JSON back to normal

I think you can change your class JSON

Screen Shot 2020-12-21 at 11 24 30
meteochu commented 3 years ago

I am pretty sure this is due to the fact that SwiftyJSON also defines their own JSON class. You just have to refer to them based on Module name. i.e. SwiftyJSON.JSON or Swifter.JSON

You can also just do a global typealias if you prefer one over the other by doing:

typealias JSON = Swifter.JSON // or SwiftyJSON.JSON