Suddenly I'v started getting run time error as,
fatal error: NSArray element failed to match the Swift Array Element type
I'v declared my array as,
var myArray : [CUSTOM_CLASS] = [CUSTOM_CLASS]()
Now, in my server response success block I have,
self.myArray = dicResponse["data"]! as Array
println(self.myArray) // FATAL ERROR HERE
Which was working perfect before upgrading to Xcode6 Beta6
FYI : dicResponse["data"]! // is verified as valid
(Sorry to pointing wrong place before!)
SOLVED :
Dont know but I'd made some changes and it works,
var myArray = [AnyObject]()
self.myArray = dicResponse["data"]! as [AnyObject]
If you are working with Cocoa APIs you always receive a
NSArray, which is not typified.So, you need to cast that array to a Typified Swift Array.
You should be able to compile this code:
This way, each array element is casted to a
CUSTOM_CLASSobject.