Retrieve a Soup’s Index Specs

If you want to examine or display the index specifications for a soup, call the applicable index specs retrieval method.

Hybrid Apps 

In hybrid apps, call:

1getSoupIndexSpecs();

In addition to the success and error callback functions, this function takes a single argument, soupName, which is the name of the soup. For example:

1navigator.smartstore.getSoupIndexSpecs(soupName, successCallback, errorCallback);

The success callback supports a single parameter that contains the array of index specs. For example:

1function(indexSpecs) { alert("Soup " + soupName +
2    " has the following indexes:" + JSON.stringify(indexSpecs); }

Android Apps 

1public IndexSpec [] getSoupIndexSpecs ( String soupName )

iOS Apps 

Objective-C:

1- (NSArray*)indicesForSoup:(NSString*)soupName

Swift:

1func indices(forSoupNamed: String) -> [SoupIndex]

Example:

1var soupIndices = store.indices(forSoupNamed:name)

We've Moved

Welcome to the new home of the Mobile SDK Developer Guide! For now, the Japanese guide can be found in PDF form.