Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24337] iOS: Using Ti.App.iOS.createSearchQuery without other UserActivity API's causes build to fail on device

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-01-25T11:49:58.000+0000
Affected Version/sRelease 6.0.0, Release 6.0.1
Fix Version/sRelease 6.0.2
ComponentsiOS
Labelsn/a
Reporter Ricardo Ramirez
AssigneeHans Knöchel
Created2017-01-23T17:28:11.000+0000
Updated2017-01-25T11:50:05.000+0000

Description

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.

Comments

  1. Hans Knöchel 2017-01-23

    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.
  2. Hans Knöchel 2017-01-23

    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.
  3. Ricardo Ramirez 2017-01-24

    Thank you Hans !
  4. Eric Wieber 2017-01-24

    Verified in builds: 6.0.2.v20170124145857 6.1.0.v20170124145731

JSON Source