SwapKit Support in ∞labs's Mover Application.

Mover is a file transfer application produced by ∞labs and available for iPhone, iPod touch and iPad with iPhone OS 3.0 and later (web site). It's meant to be used to send items from a user to another when both users are physically present at the same location, much like the "send via Bluetooth" feature present in many other phones.

Previously, Mover only obtained items to send through built-in Apple APIs. From Mover 3.1 on, SwapKit allows any app to send and receive items through Mover. Read this document to find out how.

Supported Features

(For more information on how SwapKit support has evolved between versions, please check out Summary of SwapKit Support in ∞labs's Mover.)

Mover comes in three variants — "Lite" (free), "Plus" (paid) and an open source version, which appear to the user as different applications (having separate bundle identifiers). SwapKit support is identical in all three versions, and apps can send and receive all kinds of items as specified below regardless of variant. This allows the user to 'circumvent' some limitations of the Lite version, where some of the item kinds described below are not usually available; this is intentional, and allows developers to send to Mover without having to worry about free/paid users. (Note however that some limitations remain regardless of how the item was added; for example, Lite users cannot send items via Bluetooth. These do not affect any SwapKit-mediated action, such as adding items to the table, or receiving them from Mover.)

In 3.1, only items that have built-in support in Mover can be sent and received. The item kinds available in 3.1 are as follows:

Mover supports the default action (kILSwapDefaultAction) and an appropriate "prepare for transfer" one (kILSwapPrepareForTransferAction).

Due to internal issues and the current SwapKit up-to-RAM-size-items limitation, receiving and sending for video items is not supported in Mover 3.1, but may become available in future releases.

The above list of types is for informational purposes only; if you think you want to add sending and receiving support for an item, even if it's not of one of the above types, do so. SwapKit's query APIs and the send controller will pick up any future Mover update that expands its capabilities, and will make it available without having to update your app; additionally, if you use an appropriate common action for searching (like the aforementioned "prepare for transfer" one), you will pick up all appropriate apps, not just Mover variants.

How it Works

Mover implements SwapKit features in the following way:

Mover's item menu, including the Send to App item.

Sending and Receiving Contacts

Mover 3.1 currently does not have a vCard parser; instead, it internally represents a contact as a property list containing the same information provided by the corresponding Address Book ABRecordRef object.

The SwapKit 1.0 distribution includes two files, ILSwapMvrContactSupport.h and ILSwapMvrContactSupport.m, that you can include in your project. These files implement a category on ILSwapItem that provides both receiving and sending support for contacts in the format, and a constant (kMvrContactAsPropertyListType) that you can use as the type of items produced by the category.

To use it, include the files in your project and link to AddressBook.framework; then:

ABRecordRef person = /* some record you want to send via Mover */;
ILSwapItem* item = [ILSwapItem moverContactItemFromPersonRecord:person];
[[ILSwapService sharedService]
                       sendItem:item
                         ofType:kMvrContactAsPropertyListType
                      forAction:kILSwapPrepareForTransferAction
    toApplicationWithIdentifier:(@"net.infinitelabs.Mover")];

Likewise, to copy a ABRecordRef corresponding to a contact sent by Mover, use the -copyPersonRecordFromMoverContactItem method in ILSwapItem introduced by the above files.