Adobe Experience Platform Mobile SDKs Move to Swift for iOS

Authors: Peter Fransen and Chetan Prasad.

Jaemi Bremner
Apr 8 · 5 min read

In late 2016 we embarked on a journey to reimagine our existing Adobe Experience Platform Mobile SDKs. There were a few concrete goals in mind, as well as a few nice-to-haves. First and foremost we wanted to implement an extensible and pluggable architecture that would allow for incremental additions of functionality, both internally developed and from partners and customers alike. Additionally, we wanted to build platform-independent logic that was easily portable across various client devices and operating systems. Lastly, we wanted to ensure that the various performance metrics that we track for the SDK (CPU time, memory consumption, binary size, stability) remained at least the same as our pre-existing SDKs.

Language selection

Choosing to split the SDK by platform opened up some potential new language choices. Languages such as Swift and Kotlin were gaining significant traction at the time. After some research and POCs, we determined that neither of these languages had yet to implement the features we needed. We specifically needed libraries, code visibility, ubiquity, and general developer comfort. Ultimately we chose to utilize C++ for iOS and Java for Android. We also decided to still implement portable cores for each language, and isolated platform/OS-specific features into their own companion library. This allowed us to port to any future platforms with either the C++ or Java core.

Building the future

Post-release, we have continued to update the SDKs with new features, extensions, and performance/stability enhancements. With the number of customers who have migrated and the advanced implementations that they’ve been able to achieve with the new AEP SDKs, we consider this a clear success.

The only constant is change

We put together an investigatory “spike” team and spent a month porting our C++ architecture into Swift. We also took this opportunity to clean up some APIs, some internal functionality got much smoother (a blog post for another time), and we even took SPM for a test drive. We then vetted our approach with internal teams and found our investigatory efforts to be a massive success. Finally, we decided to go all-in on Swift.

Where are we now

We’re also embarking on some changes to the internal workings of the Java-based SDKs as well, but those changes will be far more transparent and less disruptive due to not needing a language switch. Please come check out our new repos, listed below to read up on the features, or maybe even drop us a pull request.

Closing thoughts

Getting your use cases to work in a simple, streamlined manner is paramount. If something can be improved or isn’t making the most sense, please start asking questions and filing issues.

Once you become more comfortable with our software and have seen our contribution guidelines (see the CONTRIBUTION.md file in each repo for guidelines, processes, etc., submit a pull request through GitHub.)

Your code doesn’t need to be perfect. We’re here to help and we ❤️ contributions.

References

Documentation

Swift Repositories

  • aepsdk-edge-ios; Swift extension that allows for sending XDM formatted data to Adobe Experience Cloud solutions, by leveraging Edge Network capabilities.
  • aepsdk-analytics-ios: Swift extension for Adobe Analytics built to understand your customers as people and steer your business with customer intelligence.
  • aepsdk-audience-ios: Swift extension for Adobe Audience Manager which enables data DMP use cases.
  • aepsdk-target-ios: Swift extension to tailor and personalize your customers' experience on mobile application with Adobe Target.
  • aepsdk-rulesenginge-ios: Swift extension providing a simple, generic, extensible rules engine.
  • aepsdk-userprofile-ios: Swift extension to provide client-side store referenceable in rules by Adobe Experience Platform Launch.

Adobe Tech Blog

News, updates, and thoughts related to Adobe, developers…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store