Skip to content

Installation

Cristina Suciu edited this page Feb 23, 2021 · 11 revisions

How to Install

Install UX SDK Beta using Cocoapods.

To try out UX SDK Beta, include the following in your Podfile:

target 'TargetName' do
  use_frameworks!
  pod 'DJI-UXSDK-iOS-Beta', '~> 0.4.1'
end

This will install all the modules and dependencies specified by the DJI-UXSDK-iOS-Beta podspec, so the console log shows the following:

Installing DJI-SDK-iOS (4.14)
Installing DJI-UXSDK-iOS-Beta (0.4.1)
Installing DJI-UXSDK-iOS-Beta-Accessory (0.4.1)
Installing DJI-UXSDK-iOS-Beta-Core (0.4.1)
Installing DJI-UXSDK-iOS-Beta-Flight (0.4.1)
Installing DJI-UXSDK-iOS-Beta-Map (0.4.1)
Installing DJIWidget (1.6.4)

Install a single module

In order to install a single module, e.g. the Flight Module, include the following in your Podfile:

target 'TargetName' do
  use_frameworks!
  pod 'DJI-UXSDK-iOS-Beta-Flight', '~> 0.4.1'
end

This installs the Flight Module along with the Core Module, that is a required dependency for any UXSDK module. In this case, the console log shows the following:

Installing DJI-SDK-iOS (4.14)
Installing DJI-UXSDK-iOS-Beta-Core (0.4.1)
Installing DJI-UXSDK-iOS-Beta-Flight (0.4.1)
Installing DJIWidget (1.6.4)

More details about the modules available in this UXSDK Beta release can be found under UX SDK Modules Wiki.

Using UX SDK Beta with prior UX SDK versions

UX SDK Beta supports mixing and matching of UX SDK APIs. To install both frameworks, include the following in your Profile:

target 'TargetName' do
  use_frameworks!
  pod 'DJI-UXSDK-iOS-Beta', '~> 0.4.1'
  pod 'DJI-SDK-iOS', '~> 4.14'
  pod 'DJI-UXSDK-iOS', '~> 4.14'
  pod 'DJIWidget', '~> 1.6.4'
  pod 'iOS-Color-Picker'
end

Integrating Into An App

Using UXSDK Beta Cocoapods

To integrate the UX SDK Beta into your application, you will normally use Cocoapods to process a Podfile and create a workspace with the needed pods and your source project.

The basic outline for creating and integrating the UX SDK Beta into your app is:

  1. Create your application project in Xcode
  2. Include a Podfile as described above, or add the appropriate pods to a podfile you are already using.
  3. Open Terminal and navigate to the folder holding the .xcodeproj file for your application.
  4. Use the command line pod tool to install the pods:
pod install
  1. You are now ready to start importing the UX SDK Beta and using the classes from the beta.

The Sample Code application supplied on GitHub can be a good starting point for discovering how the DJI-SDK-iOS and UX SDK Beta can be used together.

Importing into your workspace

The UXSDK modules can be imported directly into a development workspace that can include any other projects. This approach also requires specifying a Podfile in order to add the UXSDK Beta 4 dependencies to DJI-SDK-iOS and DJIWidget frameworks.

Let's take as an example this Sample App. Please observe the structure of the Podfile.

  1. Open Terminal and navigate to the UXSDKBetaSampleApp folder holding the Podfile file for your application.
  2. Use the command line pod tool to install the pods:
pod install

This will generate the UXSDKBetaSampleApp.xcworkspace file that aggregates all the UXSDK Beta modules along with the required pods. You'll be working in this workspace from now on.

  1. From the Project Navigator window, select UXSDKBetaSampleApp.xcodeproj, then go to General tab and under the Frameworks, Libraries, and Embedded Content select to import DJIUXSDKBeta.framework file.
  2. Under the current scheme to be ran, select UXSDKCore scheme followed by the device you want to build, then start your build action.
  3. You can switch back the current scheme to UXSDKBetaSampleApp and run the whole project.

Further Information and Support

For further information, please see the full SDK integration documentation.

Support

You can get support from DJI with the following methods:

Clone this wiki locally