问题
I have a string declared as var searchString = ""
I am trying to do parse query as shown below: query?.whereKey("username", containedIn: searchString)
What is the issue?
This is in Xcode 6.3 updated and also Swift 1.2.
回答1:
The function expects an array of AnyObjects, you supply a String. Simply wrap the string in an array...
query?.whereKey("username", containedIn: [searchString])
来源:https://stackoverflow.com/questions/29874174/string-not-convertible-to-anyobject