SwiftyJSON not working / Swift 1.2 SwiftyJSON file

When I added my SwiftyJSON file to my project, it had 45 errors when about 44 of them changed asto as!. Now I am stuck in the latter on line 238 before I go. The error says:

Cannot set value of type "AnyObject" to value of type "AnyObject!"

and the code is as follows:

    set {
            if self.type == .Array {
                var array_: AnyObject = self.object as![AnyObject]
                if array_.count > index {
                    array_[index] = newValue.object
                    self.object = array_
                }
            }
        }

The error is on line c array_[index] = newValue.object.

Please help me sort this out, thanks in advance.

+4
source share
1 answer

"xcode6.3", . Cocoapods, Podfile, :

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

+4

All Articles