/MWM-Widget-SDK-for-iOS

(BETA) Widget SDK for iOS. Your iOS app can add widgets to MetaWatchManager and MetaWatch smartwatch devices.

Primary LanguageObjective-C

MetaWatch Widget SDK

MetaWatch SDK is a static library with a wrapper of the iOS CoreBluetooth framework and MetaWatch Remote Message Protocol. The purpose of the library is to enable fast and easy implementation for thrid-party widget develoeprs to develop a widget for MetaWatch.

About MetaWatch widget
MetaWatch can support totally 16 widgets. The widget has four sizes: one-suqare, two-horizental-square, two-vertical-square and four-square. Widget is normally defined by their functionalities, not sizes, which widgets of different sizes with similar functionalities are considered as one widget type.

Install and use our SDK:
1 To use our SDK, a widget type ID is required. Widget tyoe ID is the identifier of your widget. Your app can have multiple widget types if needed. For example, a fitness app can have both running widget type and cycling widget tyoe. Each widget can support multiple layouts.
2 Drag libMWMAppManager.a and MWMAppManager.h to your project tree in Xcode.
3 Put handleURL:fromAPP:withAnnotation: in your application:openURL:sourceApplication:annotation:(id)annotation
4 In your Plist:
    add bluetooth-central to Required background modes.
    add com.metawatch.mwm to URL identifier under URL types
    add mwmapp._YOUR_APP_BUNDLE_ID to URL Schemes.
5 Install fonts provided with the sample project under MetaFonts.

About the sample project
The sample project presents one possible implementation of MWM widget. Depending on the logic of your widget, the actual implementation can be quite different. Sample project contains two targets, MWMApp1 is a singleton widget, meaning only one instance of the widget type can be created at the same time.

To Connect MetaWatch using your App.
1 Implement MWMAppManagerDelegate, make sure you implemented all required delegate methods.
2 Pair MetaWatch: [[MWMAppManager sharedAppManager] enableMetaWatchService]
3 Connect: MWMAppManager will connect automatically. The application does not need to do so.
3 Un-Pair: [[MWMAppManager sharedAppManager] disableMetaWatchService]

To register a widget type to MetaWatch Manager, see registerExampleWidget in MainViewController.m

You can use the widget type IDs supplied with the project for development. To get your own widget type ID, please send email to siqi@metawatch.org with following information:
App Name:
App bundle ID:
Email:
Web:
Contact person:
Widget Description:

Information is collected only for record purposes. If you are a registered developer, you should be able to download the latest MWM from here: http://tflig.ht/UDJmo6