Skip to main content

Java

The SDK is compiled to Java 17 classfiles. You must run it on JDK 17 or later.
JDK versionSupported
JDK 17Yes
JDK 18–24Yes
JDK 25Yes
JDK 16 and earlierNo
The SDK uses java.net.http.HttpClient (introduced in Java 11) for all HTTP communication. No additional HTTP client dependency is required.

Kotlin / JVM

Kotlin on the JVM consumes Maven artifacts the same way Java does. Add the dependency to your Gradle or Maven build file and use the SDK from Kotlin code without any additional configuration:
val api = AppleMaps(System.getenv("APPLE_MAPS_TOKEN"))
val results = api.geocode(GeocodeInput.builder("One Infinite Loop, Cupertino").build())
println(results.results().firstOrNull()?.name())
The same JDK 17+ requirement applies.

Frameworks

The SDK has no framework dependencies. It works in any JVM environment that meets the JDK requirement:

Spring Boot

Declare AppleMaps as a @Bean in a @Configuration class. The AutoCloseable implementation integrates cleanly with Spring’s DisposableBean lifecycle.

Spring AI

Works as any other Maven dependency inside a Spring AI project. Inject the AppleMaps bean into your AI tool implementations.

Quarkus

Works as a plain Maven dependency. Declare a CDI @ApplicationScoped producer that creates and disposes the client.

Plain Java

No framework required. Instantiate AppleMaps directly and close it when done.

Android

Android is not supported.
The SDK uses java.net.http.HttpClient, which is part of the Java SE standard library but is not included in the Android runtime. Attempting to use this library on Android will result in a NoClassDefFoundError or similar failure at runtime. To support Android, the SDK would need to replace HttpClient with an Android-compatible HTTP client (such as OkHttp) and publish a separate Android artifact.

Kotlin Multiplatform / iOS

Kotlin Multiplatform (KMP) targeting iOS/Native is not supported.
iOS targets in a KMP project use Kotlin/Native, which cannot consume JVM bytecode artifacts from Maven Central. This library is compiled to JVM bytecode only. To support iOS via KMP, the SDK would need to:
  1. Rewrite HTTP communication using a multiplatform client such as Ktor.
  2. Publish a multiplatform artifact with commonMain, jvmMain, and nativeMain source sets.
The current library is JVM-only and there are no plans to add KMP support at this time.

Summary

EnvironmentSupportedNotes
Java 17–25 (server)YesPrimary target
Kotlin/JVMYesSame JDK requirement
Spring BootYesWorks as a @Bean
Spring AIYesWorks as a @Bean
QuarkusYesCDI producer pattern
Plain JavaYesNo framework needed
AndroidNoMissing java.net.http.HttpClient
Kotlin/Native (iOS)NoCannot consume JVM bytecode
Kotlin MultiplatformNoNo multiplatform artifact