Add Mobile SDK

Add Mobile SDK

There are 2 methods to add the SDK to your project, via CocoaPods (recommended) or by manually adding the library to Xcode.

Preferred method: CocoaPods

Requirements

  • Xcode 9 or higher
  • iOS 10.0 or higher
  • CocoaPods package manager:

Install

$ sudo gem install cocoapods

Get Started

1- pod init

Creates a Podfile for the current directory if none currently exists. If an XCODEPROJ project file is specified or if there is only a single project file in the current directory, targets will be automatically generated based on targets defined in the project.

$ pod init

2- Update Podfile

List the dependencies in Podfile in your Xcode project directory:

target 'MyApp' do

pod 'NAOSDK'

end

3- pod install

Now you can install the dependencies in your project:

$ pod install

Make sure to always open the Xcode workspace instead of the project file when building your project:

$ open App.xcworkspace

Swift provider

A Swift provider is available since NAO SDK 20.06 release: https://bitbucket.org/polestarusa/naoswiftprovider/src/master

Alternative method: add manually into Xcode

If you do not wish to use CocoaPods, you may install the NAO SDK manually.

  • Download the latest iOS NAO SDK.
  • Extract/Navigate to the folder <NAO SDK Dir>/Pod/Classes.
  • Drag all the SDK’s header files (.h) into your Xcode Project Explorer (check the ‘Copy items if needed’ box).
  • Drag the libNaoSDK.a into your Xcode Project Explorer (check the ‘Copy items if needed’ box).
  • Select your root project, then go to ‘Target’, then select ‘Build Phases’ tab. Add the following iOS libraries:
    • libz.tbd
    • libc++.tbd
    • SystemConfiguration.framework
    • CoreMotion.framework
    • CoreLocation.framework
    • CoreBluetooth.framework
    • CoreData.framework

Your project should now look like this:


    • Related Articles

    • Release 21.02 (NAO SDK 4.10)

      Versions Component Version NAO® Cloud 21.02.0 NAO® SDK iOS 4.10 NAO® SDK Android 4.10 NAO® Logger iOS 4.10 NAO® Logger Android 4.10 Important Note : AndroidX & NAO® SDK Since 2018, Google maintains the AndroidX library to provide backward ...
    • NAO SDK 3rd-Party Licenses

      TClap C++ command line parser [used in NAO SDK c++ core] /*********** * Copyright (c) 2003, Michael E. Smoot . * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. * All rights reverved. * * See the file COPYING in the top directory of this ...
    • Release 23.03 (NAO SDK 4.11.11)

      Versions Component Version NAO® Cloud 23.03 NAO® JS SDK 23.03 NAO® SDK iOS 4.11.11 NAO® SDK Android 4.11.11 NAO® Logger iOS 4.11.11 NAO® Logger Android 4.11.11 New Features NAO® Cloud Add new management for NAOSDK when exiting site Add possibility to ...
    • Release 22.12 (NAO SDK 4.11.10)

      Versions Component Version NAO® Cloud 22.12 NAO® Viewer 22.12 NAO® SDK iOS 4.11.10 NAO® SDK Android 4.11.10 NAO® Logger iOS 4.11.10 NAO® Logger Android 4.11.10 New Features NAO® Cloud NAO Server, NAO Cloud self hosted license check NAO® Viewer ...
    • Android 12

      Intro Android 12 introduced new features and behaviors, from permissions to security, that affect directly the NAO® SDK. All the changes are described on Android 12’s documentation. NAO® SDK Release 21.02 (v4.10.x) will still work as expected with ...