Issue Description
Unable to build an app in device when Ti.App.iOS.createSearchQuery is used, I get this error below:
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : CompileC build/Intermediates/QueensMemoryProject.build/Debug-iphoneos/QueensMemoryProject.build/Objects-normal/armv7/TiAppiOSSearchQueryProxy.o Classes/TiAppiOSSearchQueryProxy.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] : (1 failure)
H5. Steps to reproduce
Create a new Alloy projects
Add Titanium 6.0.0 SDK on tiapp.xml.
Execute this function below:
// The search-query
var searchQuery = Ti.App.iOS.createSearchQuery({
queryString : 'title == "Titanium*"',
attributes : ["title", "displayName", "keywords", "contentType"]
});
Expected Result
The search query is created and ready to start.
This happens because the Ti.App.iOS.SearchQuery depends on the Ti.App.iOS.SearchableItem / Ti.App.iOS.SearchableItemAttributeSet API. If those are not used, the API does not make any sense. Anyway, we can wrap those calls, but the workaround is to use the API as documented in the docs. *EDIT*: There is a case where the
Ti.App.iOS.SearchableItem
proxies can only be returned. So I'll push a fix that will ease that use-case as well. It will be included in the 6.0.2.GA.PR (master): https://github.com/appcelerator/titanium_mobile/pull/8777 PR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8778 Use the above and the test-case from TIMOB-23828. The reason we didn't catch this error was that we used the above described API's when testing the use-case. Although this one is very specific, it's fine to fix it.
Thank you Hans !
Verified in builds: 6.0.2.v20170124145857 6.1.0.v20170124145731