Library doesn't work with the latest Swift 3.0 release which is shipped with Xcode 8 beta 6. Perhaps somebody knows how to fix it?
+1
I was able to make small changes in many places to update the syntax as needed, but I'm stumped on this last one. In SwiftyJSON.swift I have 10 errors that say something similar to:
Cannot invoke 'JSON.init' with an argument list of type '([AnyObject])'
Any ideas as to why the initializers aren't working?
@blwinters Changing AnyObject to Any should fix the problem.
Check here,
https://github.com/SwiftyJSON/SwiftyJSON/pull/594/commits/8971384559780e631b041ac91b16734a396d4c14
This fixed pretty much everything for me.
@rudenik @haginile That did the trick. Thanks!
I got 62 errors in Xcode8 beta 6, these are some of them:
SwiftyJSON.swift:772:35: Expected ',' joining parts of a multi-clause condition
SwiftyJSON.swift:70:59: Value of type 'Any' does not conform to specified type 'AnyObject'
SwiftyJSON.swift:110:14: Cannot invoke 'JSON.init' with an argument list of type '([AnyObject])'
SwiftyJSON.swift:144:29: Return expression of type '[AnyObject]' does not conform to 'AnyObject'
SwiftyJSON.swift:146:29: Return expression of type '[String : AnyObject]' does not conform to 'AnyObject'
SwiftyJSON.swift:148:29: Return expression of type 'String' does not conform to 'AnyObject'
SwiftyJSON.swift:233:27: Use of unresolved identifier 'rawArray'
...........
@itman85 Check my previous post. The link has the answers you are looking for.
@rudenik Thank you
this pull request may help.
I used @rudenik 's solution. Works great, thanks. Let's get this fix merged!
@picciano Same here
Carthage use this fork https://github.com/eggswift/SwiftyJSON
Swift3 and Swift2.3 support is here
Closing this one to cleanup the issue list, feel free to reopen this if needed.
Cheers
Most helpful comment
Check here,
https://github.com/SwiftyJSON/SwiftyJSON/pull/594/commits/8971384559780e631b041ac91b16734a396d4c14
This fixed pretty much everything for me.