Exception when calling PHCollection.fetchTopLevelUserCollectionsWithOptions

Originator:kryall
Number:rdar://22726087 Date Originated:9-16-2015
Status:Resolved Resolved:9-25-2015
Product:iOS SDK Product Version:9.1 beta
Classification: Reproducible:yes
 
Summary:
Our app calls PHCollection.fetchTopLevelUserCollectionsWithOptions with an NSPredicate "localizedTitle = "Scannable"". This works fine on iOS 9 but with the iOS 9.1 beta we see an exception: 'NSInvalidArgumentException', reason: 'Unsupported predicate in fetch options: localizedTitle == "Scannable"'.

Steps to Reproduce:
        let fetchOptions = PHFetchOptions()
        fetchOptions.predicate = NSPredicate(format: "localizedTitle = %@", "Scannable")
 
        let existingCollection:PHCollection? = PHCollection.fetchTopLevelUserCollectionsWithOptions(fetchOptions).firstObject as? PHCollection


Expected Results:
Should return fetch results. Works on iOS9, throws an exception on iOS 9.1 beta.

Actual Results:
Throws an exception on iOS 9.1 beta.

Version:
iOS 9.1

Notes:


Configuration:
iPhone 6, simulator

Comments

Appears to be fixed in iOS 9 beta 2.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!