Some files are needed to use the NAO SDK Services in your app:
You can call synchronizeData() on the service handle (see API documentation) to fetch the latest configuration files from NAO Cloud.
Alternatively, if you don’t want to use the data on NAO Cloud, or do not want to rely on internet connectivity, you can embed those files inside the application. Drag and drop the files 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 those files from NAO Cloud, from your site’s dashboard (under Developer > Resources tab).
Since NAO SDK 4.5.0, PDB’s and app.json assets can be embedded on target devices inside a bundle :
Keep in mind that the embedded files can still be updated through the synchronizeData() method.
If you are not using the sync feature of the NAO SDK, keep in mind that ALL the files must be available to the NAO SDK BEFORE you start it. The embedded files should ALL be updated in the app after any published change on NAO Cloud (PDB of one of the covered sites, geofences/geonotifications, API Key configuration, iBeacon configuration, …). Doing differently could result in errors, such as an impossibility to get a blue dot or decreased performances.
The recommended call flow is to first call synchronizeData(), then the Services start() method. The NAO SDK will internally detect that a synchronization is ongoing, and update everything automatically. In the event that the synchronization would not go through, but a previous was already downloaded/embedded, the NAO SDK would still be able to run.