Ground SDK Swift Package Manager

Hello.

We’re currently extending our iOS/iPadOS app to support more drone manufacturers, but do not use nor have any plans to use Cocapods since it is old and becoming obsolete. Currently we are using Swift Package Manager for all our dependencies. We are able to use Carthage but would prefer SwiftPM since Apple is pushing hard for it to be the future in iOS development. Are there any plans to support Swift Package Manager (or Carthage) for Ground SDK? How would we be able to use Ground SDK and integrate with your drones, primarily the ANAFI Ai, without Cocoapods?

Regards,
Adrian

3 Likes

Hi Adrian,

Sorry, but we don’t currently have any plans to support Swift Package Manager or Carthage.
If you don’t want to use Cocoapods, you can still include Ground SDK source code in your project, as described here: Install from source - 7.3

Regards,
Thibaut

Hi,

Thank you for your reply.

Would you consider adding pre-built .xcframeworks that we are able to link with in our project? Or at least provide instructions in your documentation to how that can be done. Installing an SDK completely from scratch using a separate project that uses a build script does not seem sustainable. If you were to update your SDK we would have to re-do a lot of manual work to get an updated version in our project. DJI indirectly “provides” prebuilt frameworks that we are able to use and updating does not mean spending a lot of time trying to import source code, etc.

Anyhow, I have been able to get it working, but I am quite unsure of my method. I followed the instructions you linked but found no real simple way to get the SDK to our project. After running the build script I had to dig to find the export folder to find the built SdkCore framework. I then copied that over to the project along with the Ground SDK source code. After trying to build the project with the Ground SDK source code I had to import SdkCore in a number of files using ULog. I also had to run the build script twice, once for device and once for simulator, and then combine the frameworks to a fat-library to get it to work on device and simulator. I cannot imagine this is the proposed way to work. Please, tell me what the proposed way to work would be.

Regards,
Adrian

An update on my issues. I have now removed the need to import SdkCore by creating a new project in our workspace to build GroundSdk as a framework and link that in our project. But my dissatisfaction with having to manually copy the code, etc. still remains. I hope there is an easier approach.

Regards,
Adrian

Hi Adrian,

Retrieving and building Ground SDK source code is not the easiest way to proceed. That’s why the preferred way is to use Cocoapods, it’s very simple to set up, even if you don’t use it yet.
Otherwise, if you absolutely reject Cocoapods, you can get the whole Ground SDK workspace as you did, and then add your own project inside. Thus you will be able to update Ground SDK easily, but I’m not sure this method will meet your needs.

Regards,
Thibaut

Hi Thibaut,

Thank you for your help. We have chosen to continue with the source code approach since we really do not want to integrate with Cocoapods. Though, please consider Swift Package Manager, at the very least with prebuilt binaries, for the future.

Regards,
Adrian

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.