Inherits from NSObject
Declared in INKApplicationList.h

Overview

A INKApplicationList is a data source that provides a list of third-party applications.

Tasks

Properties

activities

@property (readonly) NSArray *activities
Discussion

An array containing every possible app for a given handler, including ones that the user doesn’t have installed.

Declared In

INKApplicationList.h

availableActivities

@property (readonly) NSArray *availableActivities
Discussion

An array containing only the applications the user currently has installed for the given handler.

Declared In

INKApplicationList.h

canUseFallback

@property (readonly) BOOL canUseFallback
Discussion

True if the handler class enables falling back onto a web browser

Declared In

INKApplicationList.h

handlerClass

@property (copy, nonatomic) Class handlerClass
Discussion

The INKHandler subclass to load applications for.

Declared In

INKApplicationList.h

hideFirstPartyApp

@property (assign, nonatomic) BOOL hideFirstPartyApp
Discussion

If true, will not include the first-party external application registered for the handler in its list of available activities.

Declared In

INKApplicationList.h

hideInApp

@property (assign, nonatomic) BOOL hideInApp
Discussion

If true, will not include a modal in-app activity registered for the handler in its list of available activities.

Declared In

INKApplicationList.h

Class Methods

availableHandlers

+ (NSArray *)availableHandlers
Discussion

Lists all handler objects currently available

Return Value

An NSArray of Class objects representing INKHandler subclasses.

Declared In

INKApplicationList.h

Instance Methods

activityWithName:

- (INKActivity *)activityWithName:(NSString *)name
Discussion

Returns the activity for a given app name

Parameters

name

A string containing the English name of an app belonging to the current handler class

Return Value

An INKActivity object representing that application

Declared In

INKApplicationList.h

fallbackUrlForCommand:

- (NSString *)fallbackUrlForCommand:(NSString *)command
Discussion

Return the fallback URL, if applicable, for a given command

Parameters

command

A command to return the fallback for

Return Value

A string containing a templated URL to load in an INKBrowserHandler, or nil if no fallback URL exists.

Declared In

INKApplicationList.h

initWithApplication:forHandler:

- (id)initWithApplication:(UIApplication *)application forHandler:(Class)handlerClass
Discussion

Custom constructor to stub out the UIApplication in test.

Parameters

application

A UIApplication. In production, this should probably just be [UIApplication sharedApplication].

handlerClass

An INKHandler subclass to load applications for

Declared In

INKApplicationList.h

initWithHandler:

- (id)initWithHandler:(Class)handlerClass
Discussion

Create a new INKApplicationList object for a given handler class.

Parameters

handlerClass

An INKHandler subclass to load applications for.

Declared In

INKApplicationList.h