Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19415] iOS9: Expose UTType constants for SearchableItemAttributeSet

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2015-08-28T20:15:22.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sRelease 5.0.0
ComponentsiOS
Labelsspotlight
ReporterBenjamin Hatfield
AssigneeEric Merriman
Created2015-08-26T18:11:56.000+0000
Updated2017-03-27T22:14:48.000+0000

Description

For the Titanium.App.iOS.createSearchableItemAttributeSet method, you are required to set the itemContentType property. https://developer.apple.com/library/prerelease/ios/documentation/CoreSpotlight/Reference/CSSearchableItemAttributeSet_Class/index.html#//apple_ref/occ/instm/CSSearchableItemAttributeSet/initWithItemContentType: To make it easier for developer, we should expose the constants. From this reference, it seems like Text, Composite, Image and Audio Visual should be exposed: https://developer.apple.com/library/prerelease/ios/documentation/MobileCoreServices/Reference/UTTypeRef/index.html#//apple_ref/doc/constant_group/ As a work around, they can use the identifier values from this table for now: https://developer.apple.com/library/ios/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html

Comments

  1. Rick Blalock 2015-08-28

    Tried the following and I get: [ERROR] field thumbnailUrl is invalid
       				var itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({
       					itemContentType: "public.image",
       					title: _row.specie_name,
       					contentDescription: "Fishing Regulations",
       					thumbnailUrl: "/images/fish/" + _row.specie_fish_id + "/" +  _row.specie_fish_id + ".jpg",
       					keywords: [_row.specie_name]
       				});
       
  2. Benjamin Hatfield 2015-08-28

    [~rblalock] I think URL should be all uppercased for thumbnailURL: http://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.App.iOS.SearchableItemAttributeSet-property-thumbnailURL
  3. Rick Blalock 2015-08-28

    Ok I'll try this. Was going off the iOS property name.
  4. Chee Kiat Ng 2015-08-28

    PR Here: https://github.com/appcelerator/titanium_mobile/pull/7085 [~bhatfield], I have exposed text, composite, image and audio visual as you requested. However, sorry I didn't write the docs for these in apidocs. Let me know if we need anything else.
  5. Benjamin Hatfield 2015-08-28

    https://github.com/appcelerator/titanium_mobile/pull/7087
  6. Lee Morris 2017-03-27

    Closing ticket as fixed.

JSON Source