Using SwiftyJSON with Swift3

前端 未结 3 699
猫巷女王i
猫巷女王i 2020-12-30 07:06

How do I use SwiftyJSON with Swift3? I\'ve installed the pod.

pod \'SwiftyJSON\', :git => \'https://github.com/SwiftyJSON/SwiftyJSON.git\', :branch =>          


        
相关标签:
3条回答
  • 2020-12-30 07:21

    SwiftyJSON now supports Swift 3.

    pod 'SwiftyJSON', '3.0.0'

    0 讨论(0)
  • 2020-12-30 07:40

    Update: as Marcus notes, SwiftyJSON now supports Swift 3. In order to get bug fixes, I recommend not pinning yourself to 3.0.0, but rather:

    pod 'SwiftyJSON', '>= 3.0.0'
    

    …or if you don’t want to accidentally pick up whatever API-breaking changes may arrive in 4.x:

    pod 'SwiftyJSON', '~> 3.0'
    

    [Old answer] There is an actively maintained fork that works:

    pod 'SwiftyJSON', git: 'https://github.com/BaiduHiDeviOS/SwiftyJSON.git', branch: 'swift3'
    

    Hopefully the project maintainers merge it. Until then, you can just use the fork.

    0 讨论(0)
  • 2020-12-30 07:46

    Please try this. I had a trouble for days. And this solve the issue for me.

    pod 'SwiftyJSON', '3.1.4'
    
    0 讨论(0)
提交回复
热议问题