Open Spatial SDK for iOS contains:
Components | Notes |
---|---|
SDK Sources | Sources for Open Spatial SDK APIs |
OpenSpatial.framework | Used to build applications against the APIs, added for convenience |
Example App | Demostrates how to use the APIs to register and log events |
The source files needed to build the OpenSpatial.framework are in the Open Spatial iOS Framework folder
The SDK is distributed under Apache2.0 license (see LICENSE.md).
- Open the xCode project for which you would like to add the OpenSpatial framework
- Navigate to the project navigator
- Select the specific target in the project editor menu
- Go to Embedded Binaries and add the OpenSpatial.framework file that is found in the root of the OpenSpatial iOS Framework directory
- Be sure that when adding the OpenSpatial.framework file, that you select the option to copy it into your project directory
- In the header of the file for which you would like to use the Nod device, type #import <OpenSpatial/OpenSpatialBluetooth.h>
Please vist out Developer Portal for more detailed instructions and tutorials.
Importing OpenSpatial into header file
- At the top of the header file, type the below.
#import <OpenSpatial/OpenSpatialBluetooth.h>
Subscribes the specified peripheral device to RelativeXY events
[self.HIDServ subscribeToEvents:name forEventTypes:@[@(OS_RELATIVE_XY_TAG)]];
Subscribes the specific peripheral device to RelativeXY and Euler Angle events
[self.HIDServ subscribeToEvents:name forEventTypes:@[@(OS_RELATIVE_XY_TAG), @(OS_EULER_ANGLES_TAG)]];
Unsubscribes the specified peripheral device to RelativeXY events
[self.HIDServ unsubscribeFromEvents:(NSString *)peripheralName forEventTypes:@[@(OS_RELATIVE_XY_TAG)]];
Accelerometer
OS_RAW_ACCELEROMETER_TAG
Gyro
OS_RAW_GYRO_TAG
Compass
OS_RAW_COMPASS_TAG
Euler Angles
OS_EULER_ANGLES_TAG
Translations
OS_TRANSLATIONS_TAG
Analog
OS_ANALOG_DATA_TAG
RelativeXY
OS_RELATIVE_XY_TAG
Gesture Direction
OS_DIRECTION_GESTURE_TAG
Slider Gesture
OS_SLIDER_GESTURE_TAG
Button
OS_BUTTON_EVENT_TAG
For information on Open Spatial SDK for Android see (https://github.com/openspatial/android-sdk)