MDZip on mobile: libraries for Android and iOS #15
kylemwhite
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
MDZip (
.mdz) now has native libraries for both phone platforms.org.mdzip:mdzip-coreis for Android (Kotlin or Java), andmdzip-core-swiftis for iOS (Swift). Both read, write and validate.mdzfiles, and both pass the same shared conformance tests from the specification as the .NET, JavaScript, Python, Rust and Lua libraries. A document saved on a phone opens the same way in MDZip Studio, VS Code or Obsidian, and the other way round.Android
For Android 5.0 and later. It's a plain Kotlin library, so it also works in desktop and server apps on Java 8 and later, from Kotlin or Java. No dependencies beyond the Kotlin standard library.
dependencies { implementation("org.mdzip:mdzip-core:0.1.0") }iOS
For iPhone and iPad on iOS 15 and later. The same package works in Mac apps (macOS 12 and later) and on Linux, so one codebase can handle
.mdzon every Apple device. Add it in Xcode under File → Add Package Dependencies… withhttps://github.com/mdzip-project/mdzip-core-swift, or inPackage.swift:What they do
.mdzis one file with the Markdown and its images together, so it survives email, messaging apps, AirDrop and cloud drives. The libraries read it straight from memory or a stream, without unzipping anything to storage.manifest.jsonthe specification requires, with the main document recorded, so other tools open the right file.The libraries don't render Markdown; your app shows it with the Markdown view it already uses.
Tested on every change: on Android 5.0, 7.0, 10 and 15 emulators and Java 11 and 17 for the Kotlin library, and in the iOS Simulator, on macOS and on Linux for the Swift one.
What's next
If you're adding
.mdzto an app, Core libraries compares all seven, and Works with MDZip shows everything that reads and writes it today. Building something on a phone? Tell us in Discussions; we'd like to list it.Android library on Maven Central · Android source and API reference · iOS library source and API reference · Release notes: Android, iOS
Kotlin is a trademark of JetBrains s.r.o. Swift and the Swift logo are trademarks of Apple Inc. Neither is affiliated with or endorses MDZip.
All reactions