GroundSdkConfig

@objcMembers
@objc(GSConfig)
public class GroundSdkConfig : NSObject

Global GroundSdk configuration

Allows application to configure GroundSdk features. This configuration can be set by adding entries in the application info.plist or by setting properties on the config shared instance before creating the first GroundSdk instance (the best place for that is the init function of your AppDelegate).

In the application info.plist, configuration is set by adding an entry GroundSdk, type Dictionary, with the following content:

  • Wifi (Bool): enable local wifi support. Default is true.
  • Usb (Bool): enable Usb support (for sky controllers). Default is true.
  • UsbDebug (Bool): enable usb debug bridge support. Default is false.
  • Ble (Bool): enable deprecated Ble support. Default is false.

  • SupportedDevices (Array of String): List of all supported devices by the application. Default is all. The devices name that should be given are the description of each DeviceModel you want to support. The supported device list is used to restrict the device discovery. Thus, any saved device whose model is restricted, will still be persisted (but never seen again).

  • OfflineSettings (String): enable offline settings and send them to the drone at connection. Default is model.

    • off: disable
    • model: share settings between all drones of the same model
  • CrashReport (Bool): enable crash reports from drone or remote control to be shared with Parrot. Default is true.

  • FlightData (Bool): enable download flight data files from drone. Default is true.

  • FlightLog (Bool): enable flight logs (from drone or remote control) to be shared with Parrot. Default is true.

  • BlackBox (Bool): enable black box recording and sharing these records with Parrot. Default is true.

  • FirmwareSync (Bool): enable firmware synchronization. Default is true.

  • AutoConnectionAtStartup (Bool): Whether or not the auto connection should start immediately when GroundSdk is started. Default is false.

  • AppDefaults ([String: String]): Dictionary that list all plist file names describing the application default values for the devices. Indexed by device model name. Default is empty.

  • EmbeddedFirmwares (Array of String): List of plist file names that describes the embedded firmwares. Default is empty. Ignored if FirmwareSync is false.

  • BlacklistedVersions (Array of String): List of plist file names that describe the blacklisted firmware versions. Default is empty. Ignored if FirmwareSync is false.

  • AutoSelectWifiCountry (Bool): Whether or not the auto wifi selection, based on reverse geocoding, is used. Default is true.

  • Ephemeris (Bool): Ephemeris files help the drone to be aware of its own gps position faster. Default is true.

Example: Enable Usb debug and disable offline settings

<key>GroundSdk</key>
 <dict>
   <key>UsbDebug</key> <true/>
   <key>OfflineSettings</key> <string>off</string>
</dict>
  • Configuration singleton instance.

    Declaration

    Swift

    public private(set) static var sharedInstance: GroundSdkConfig {
      get
      }
  • Offline settings modes.

    See more

    Declaration

    Swift

    public enum OfflineSettingsMode : Int
  • Application key.

    Declaration

    Swift

    public var applicationKey: String? { get set }
  • Whether Wifi backend is enabled.

    Declaration

    Swift

    public var enableWifi: Bool { get set }
  • Whether Usb backend is enabled.

    Declaration

    Swift

    public var enableUsb: Bool { get set }
  • Whether Usb debug backend is enabled.

    Declaration

    Swift

    public var enableUsbDebug: Bool { get set }
  • Whether BLE backend is enabled.

    Declaration

    Swift

    public var enableBle: Bool { get set }
  • Enable offline settings and send them to the drone at connection.

    Declaration

    Swift

    public var offlineSettings: GroundSdkConfig.OfflineSettingsMode { get set }
  • Enable crash reporting. If the drone or the remote control connected crashes, the crash report will be shared with Parrot.

    Declaration

    Swift

    public var enableCrashReport: Bool { get set }
  • Enable FlightData (PUD).

    Declaration

    Swift

    public var enableFlightData: Bool { get set }
  • Enable FlightLog.

    Declaration

    Swift

    public var enableFlightLog: Bool { get set }
  • Enable black box recording and sending them to Parrot’s servers. If set to true, as soon as a device is connecting, a black box will be recorded in memory. Then, when the drone is disconnected, this black box is stored on the file system and will be sent to Parrot’s servers. If no drone is connected, the remote control black box is abandoned.

    Declaration

    Swift

    public var enableBlackBox: Bool { get set }
  • Enable firmware synchronization.

    Declaration

    Swift

    public var enableFirmwareSynchronization: Bool { get set }
  • Alternate firmware server.

    Declaration

    Swift

    public var alternateFirmwareServer: String? { get set }
  • List of all supported devices

    Declaration

    Swift

    public var supportedDevices: Set<DeviceModel> { get set }
  • Whether or not the auto connection should automatically start when GroundSdk starts.

    Declaration

    Swift

    public var autoConnectionAtStartup: Bool { get set }
  • Whether or not the auto wifi selection, based on reverse geocoding, is used.

    Declaration

    Swift

    public var autoSelectWifiCountry: Bool { get set }
  • Ephemeris management.

    Declaration

    Swift

    public var enableEphemeris: Bool { get set }
  • Black box quota in mega bytes.

    Declaration

    Swift

    public var blackBoxQuotaMb: Int? { get set }
  • Flight log quota in mega bytes.

    Declaration

    Swift

    public var flightLogQuotaMb: Int? { get set }
  • Flight data quota in mega bytes.

    Declaration

    Swift

    public var flightDataQuotaMb: Int? { get set }
  • Crash report quota in mega bytes.

    Declaration

    Swift

    public var crashReportQuotaMb: Int? { get set }
  • Black box public folder.

    Declaration

    Swift

    public var blackboxPublicFolder: String? { get set }
  • List of all supported devices. This API is ObjC only. For Swift, please use supportedDevices.

    Declaration

    Swift

    @objc(supportedDevices)
    public var gsSupportedDevices: Set<GSDeviceModel> { get set }
  • Application default values for the devices. It is the name of the plist describing app defaults for a given device model, indexed by device model.

    Declaration

    Swift

    public var appDefaults: [DeviceModel : String] { get set }
  • Embedded firmware descriptors.

    A descriptor is the name of the plist (located in the main bundle) that declares all informations about the embedded firmwares.

    Declaration

    Swift

    public var embeddedFirmwareDescriptors: [String] { get set }
  • Embedded blacklisted firmware versions descriptors.

    A descriptor is the name of the plist (located in the main bundle) that declares all informations about the blacklisted firmwares.

    Declaration

    Swift

    public var embeddedBlacklistedVersionDescriptors: [String] { get set }
  • Reloads configuration. Only for unit testing.

    Declaration

    Swift

    public static func reload()