Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

WebKit 6 min read How-to mediumAdept

Discover MapKit JS 6: Rebuilt for Today’s Web Developer

MapKit JS 6 modernizes Apple's web mapping framework around current web patterns: an npm loader package (@apple/mapkit-loader) with TypeScript types, modular library loading, native promises for services like PlaceLookup, and the standard browser EventTarget model for map events. Token setup is simpler, with static domain-bound tokens generated on the Apple Developer site, so no private key or self-signing is required. A step-by-step Yosemite Explorer example covers loading the framework via npm or a script tag, creating a map (including in React), adding PlaceAnnotations with selection accessories from Place IDs, and two-way syncing selection between a list and the map.

Assumes: JavaScript async/awaitDOM eventsnpm

Related posts

  • Resilient Import Maps - Better Theme Development and Beyond

    Shopify Engineering mediumAdept

    Shopify worked with browser vendors to change the HTML spec, Chromium and WebKit so import maps no longer break when JavaScript modules load before them or when a page has more than one map. Each document keeps a single global import map and a set of already-resolved module names. Each new map is merged in, dropping any rule that would change an already-resolved module or override an existing rule. The change ships in Chrome 133 and Safari 18.4, and es-module-shims 2.4.0+ polyfills it for older browsers. Shopify injects the polyfill on storefronts automatically, so themes and app blocks can now use hashed, immutably cached modules without load-order conflicts.

  • Shopify’s platform is the Web platform

    Shopify Engineering mediumAdept

    Remix is now Shopify's recommended framework for building Admin apps, backed by a rewritten, final version of App Bridge that makes cross-origin iframes behave like a normal web environment. App Bridge uses postMessage() to restore what browsers strip from iframes: it syncs history.pushState() URL changes to the top-level page, supplies OpenID Connect ID tokens in place of unavailable cookies, and exposes Admin integrations such as sidebar navigation through standard Custom Elements. It is loaded from a CDN script tag so fixes reach every app without redeploys. The Remix template bundles @shopify/shopify-app-remix for OAuth, ID token and HMAC handling, plus Prisma for storage and session persistence.

  • Mobile Bridge: Making WebViews Feel Native

    Shopify Engineering mediumAdept

    Shopify's mobile app serves many of its ~600 screens as WebViews, made to feel native through Mobile Bridge, a framework built on @remote-ui/rpc for two-way web/native communication. Preloading, pre-authenticating and caching WebViews in native iOS/Android modules cut P75 load time from 6s to 1.4s. Injected JS/CSS disables zoom and text selection, and modified Polaris components push titles and actions into the native nav bar. A TransportableView moves a single WebView instance between screens to preserve state, with snapshots covering back navigation. The bridge also exposes native features like the date picker and barcode scanner to web content, and remote-dom is being explored to render Polaris components natively.

  • Self-host Maps with Protomaps and Supabase Storage

    Supabase mediumAdept

    Protomaps lets you serve a self-hosted vector basemap as a single static PMTiles file, and Supabase Storage supports the HTTP Range Requests needed to read it directly from a public bucket. The walkthrough extracts a bounding box with the pmtiles CLI, uploads it, and renders it with MapLibre GL via the pmtiles protocol. Because public bucket CORS can't be configured, a Deno Edge Function can proxy range requests to a private bucket using the service role key and enforce an origin allowlist. Optionally, Expo's experimental 'use dom' components can run react-map-gl in React Native, since maplibre-react-native lacks custom protocol support.

  • How we build SwiftUI features in the Medium application

    Medium Engineering mediumAdept

    Medium's iOS team builds new iOS 13+ features in SwiftUI and Combine by splitting a monolithic, partly Objective-C codebase into Swift packages: ApolloModel for generated GraphQL models, SharedUI components, per-feature UI packages, and planned LiveService/FakeService packages. Network services are structs returning Combine publishers, with live and fake implementations injected through initializers in a style inspired by Point-Free, rather than being registered in a global service registry. Views take protocol-backed GraphQL fragments so previews and tests can use simple structs, and enum action handlers forward events to custom UIHostingControllers for app-level navigation. Building packages in isolation makes SwiftUI previews fast, though List, NavigationView and Menu still have gaps that require OS-version workarounds.

The quest for software engineering knowledge.

Look:
Layout: