· 2 min read Posted by Kevin Galligan

Publishing Kotlin Multiplatform Swift Packages - Nate Ebel

Nate Ebel and the team at Premise configured a production-scale KMP development and publishing workflow for shared Kotlin and iOS libraries. This in-depth post explains how all of that works together.

Configuring builds for any production system is usually a complex task. KMP is relatively new, and like all new platforms, the tools and best-practice for production development and deployment are still being built and defined.

Kotlin Multiplatform for native mobile adds some special issues. Developers are generally familiar with their core platform and not the “other one”, so configuring a build system for both can be a challenge. Further, while SPM and CocoaPods both support prebuilt binaries, managing versions, configuring dependencies, and publishing in a secure environment, have until recently required a completely custom implementation.

We first heard about Nate’s work from his Droidcon NYC Talk, coincidentally right before we published KMMBridge.

Cloud Storage

A section that really struck home from the post. One of the more complex pieces is handling authentication for the remote binaries. Premise uses Google Cloud Storage to hold the binaries, and another service in front of it to grant access. Without getting too technical, Xcode needs basic auth with ~/.netrc file config. Presumably, Google Cloud Storage doesn’t provide an easily managed basic or token auth option to grab files, so another service is required. AWS S3 would need something similar. For anybody looking to implement something like this, or looking to contribute to open source KMP tools, this might be a good solution to provide.

Read More

Publishing Kotlin Multiplatform Swift Packages Using Google Cloud Storage and Cloud Run