Emulate User Position

Emulate User Position

If you want to test your integration of the NAO SDK without the need to be on site, we provide an emulated mode. That emulated mode is only available for the Location Service and Geofencing Service.

  • Warning: The emulator mode bypasses the sensors, so the integration of the sensor activation part of your application cannot be tested in that mode.

All the files needed for emulation are available at your NAO Cloud page under Developer > Resources tab.

 

These files must be copied to your project files.

 

You can test your integration of the NAO SDK with the emulator API Key.
This key can be used only for Location Service and Geofencing Service.
For the location service, it will emulate a user position. Just create an instance of NAOLocationHandle as usual:

NAOLocationHandle* locationHandle = [[NAOLocationHandle alloc] initWithKey:@"emulator" 
                                                                  delegate:/* your (id<NAOLocationHandleDelegate>) */
                                                           sensorsDelegate:/* your (id<NAOSensorsDelegate>) */];

Warning: This API Key does not use the sensors: the integration of the sensor activation delegate can’t be tested with it.

You will also need to add a position emulation file (nao.kml). Drag and drop the nao.kml in your Xcode project navigator, check the box “Copy items if needed” and verify the presence of the file added in Build Phases -> Copy Bundle Resources.
You can download this file from NAO Cloud, from your site’s dashboard (under Developer > Resources tab)

For the Geofencing Service you need to add the geofencing emulation file (alerts_emulator.json) the same away as above for the nao.kml. and to create an instance of NAOGeofencingHandle as usual:

NAOGeofencingHandle* geofencingHandle = [[NAOGeofencingHandle alloc] initWithKey:@"emulator" 
                                                                  delegate:/* your (id<NAOGeofencingHandleDelegate>) */
                                                           sensorsDelegate:/* your (id<NAOSensorsDeleg

    • Related Articles

    • App publication

      If your application needs to use the service in background mode, you must follow a few rules to avoid a rejection of your application on AppStore. Basic rule Apple only accepts applications that use background modes when it is justified. Example use ...
    • Service Selection

      Whatever the services you are using, there are two mandatory delegates that your app must implement, since they’re used by all the services. Data Synchronisation Delegate (NAOSyncDelegate): Gives you the result of the data synchronisation requested ...
    • Tracking Service

      This is a new service included in version 4.10.0. Tracking service allows once activated to track the position of people in a building. Warning: this service must be activated with the user’s consent. otherwise this service will not be started Setup ...
    • iOS 14

      Summary NAOSDK remains compatible with iOS14. Permission Changes On iOS 13, the user had the option of deciding whether the app should have access to its location once, only when using the app, or always. On iOS 14, the user can décide whether the ...
    • Release 4.3

      Release V4.3.6 Date: 16 february 2017 Build: V4.3.6-R17865 Fixed Issue Geofencing handle init behavior: when a NAOGeofencingHandle is first instantiated, it should notify geofencing listener of zones the user is currently in via call to ...