String not convertible to [AnyObject]

user1406716

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.

enter image description here

Matthias Bauch

The function expects an array of AnyObjects, you supply a String. Simply wrap the string in an array...

query?.whereKey("username", containedIn: [searchString])

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

'(String, AnyObject)' is not convertible to '[String : AnyObject]'

From Dev

'(NSObject, AnyObject)' is not convertible to 'String'

From Dev

AnyObject is not convertible to String

From Dev

PFFile? is not convertible to 'StringLiteralConvertible' 'AnyObject' is not convertible to 'String'

From Dev

Swift (String:AnyObject) is not convertible to [String:AnyObject]

From Dev

Swift AnyObject is not convertible to String/Int

From Dev

AnyObject is not convertible to String using swift

From Dev

AnyObject (from JSONObjectWithData) is not convertible to [String : Any]

From Dev

Alamofire Parameters - NSDictionary is not convertible to [String : AnyObject]

From Dev

String is not convertible from Dictionary<String,AnyObject> Error in Swift

From Dev

UITableViewController not populating data in swift. AnyObject is not convertible to String

From Dev

IOS - AnyObject is not convertible to String when loading core data into a table view?

From Dev

UITableViewController not populating data in swift. AnyObject is not convertible to String

From Dev

'AnyObject' is not convertible to ABRecordRef

From Dev

"[AnyObject]? is not convertible to 'NSArray'

From Dev

'Anyobject' is not convertible to 'UICollectionViewCell'

From Dev

'Anyobject' is not convertible to 'UICollectionViewCell'

From Dev

'NSString' is not convertible to 'DictionaryIndex<NSObject, AnyObject>'

From Dev

'anyObject' is not convertible to 'Dictionary<key, value>]'

From Dev

Swift 2: AnyObject? is not convertible to NSString

From Dev

'NSString' is not convertible to 'DictionaryIndex<NSObject, AnyObject>'

From Dev

'anyObject' is not convertible to 'Dictionary<key, value>]'

From Dev

'[AnyObject]?' is not convertible to 'NSArray'(xcode,swift)

From Dev

(_, _, _) -> Void' is not convertible to 'Response<AnyObject, NSError> -> Void'

From Dev

Error: 'String' is not convertible to 'String!'

From Dev

'(String) -> String' is not convertible to 'SQLHandler'

From Dev

'String" is not convertible to '[(String)]'

From Dev

String is not convertible to NSMutableString

From Dev

'String' is not convertible to 'Int' in Swift

Related Related

  1. 1

    '(String, AnyObject)' is not convertible to '[String : AnyObject]'

  2. 2

    '(NSObject, AnyObject)' is not convertible to 'String'

  3. 3

    AnyObject is not convertible to String

  4. 4

    PFFile? is not convertible to 'StringLiteralConvertible' 'AnyObject' is not convertible to 'String'

  5. 5

    Swift (String:AnyObject) is not convertible to [String:AnyObject]

  6. 6

    Swift AnyObject is not convertible to String/Int

  7. 7

    AnyObject is not convertible to String using swift

  8. 8

    AnyObject (from JSONObjectWithData) is not convertible to [String : Any]

  9. 9

    Alamofire Parameters - NSDictionary is not convertible to [String : AnyObject]

  10. 10

    String is not convertible from Dictionary<String,AnyObject> Error in Swift

  11. 11

    UITableViewController not populating data in swift. AnyObject is not convertible to String

  12. 12

    IOS - AnyObject is not convertible to String when loading core data into a table view?

  13. 13

    UITableViewController not populating data in swift. AnyObject is not convertible to String

  14. 14

    'AnyObject' is not convertible to ABRecordRef

  15. 15

    "[AnyObject]? is not convertible to 'NSArray'

  16. 16

    'Anyobject' is not convertible to 'UICollectionViewCell'

  17. 17

    'Anyobject' is not convertible to 'UICollectionViewCell'

  18. 18

    'NSString' is not convertible to 'DictionaryIndex<NSObject, AnyObject>'

  19. 19

    'anyObject' is not convertible to 'Dictionary<key, value>]'

  20. 20

    Swift 2: AnyObject? is not convertible to NSString

  21. 21

    'NSString' is not convertible to 'DictionaryIndex<NSObject, AnyObject>'

  22. 22

    'anyObject' is not convertible to 'Dictionary<key, value>]'

  23. 23

    '[AnyObject]?' is not convertible to 'NSArray'(xcode,swift)

  24. 24

    (_, _, _) -> Void' is not convertible to 'Response<AnyObject, NSError> -> Void'

  25. 25

    Error: 'String' is not convertible to 'String!'

  26. 26

    '(String) -> String' is not convertible to 'SQLHandler'

  27. 27

    'String" is not convertible to '[(String)]'

  28. 28

    String is not convertible to NSMutableString

  29. 29

    'String' is not convertible to 'Int' in Swift

HotTag

Archive