← Files MapboxARCHIVED FILE

skills/mapbox-ios-patterns/evals/evals.json

2.5 KB · Sep 30, 2026 · 23:11 UTC

↓ Download file

{
  "skill_name": "mapbox-ios-patterns",
  "evals": [
    {
      "id": 1,
      "prompt": "I'm setting up Mapbox Maps SDK in my iOS app. Where do I put the access token?",
      "expectations": [
        "Token goes in Info.plist with the key MBXAccessToken",
        "Shows the correct plist entry: <key>MBXAccessToken</key> <string>pk.your_token</string>",
        "Presents the Info.plist approach as the primary/standard/recommended way for iOS (a programmatic alternative via MapboxOptions.setAccessToken is valid and may be mentioned, but should not be promoted as the main approach)",
        "Notes the token should be a public token (starts with pk.)"
      ]
    },
    {
      "id": 2,
      "prompt": "My iOS app creates a new `PointAnnotationManager` inside `updateMarkers()` every time markers change, and performance is bad when called frequently. What's wrong?",
      "expectations": [
        "Creating a new annotation manager on every update is the problem — managers should be created once and reused",
        "Store the PointAnnotationManager as an instance property and initialize it once",
        "To update markers, just reassign the annotations array: pointAnnotationManager.annotations = newAnnotations",
        "Also recommends batch updates: set all annotations at once rather than appending one by one"
      ]
    },
    {
      "id": 3,
      "prompt": "I'm using the Mapbox Standard style on iOS and want to detect when users tap on POIs (coffee shops, restaurants, etc.) on the map. How do I implement this?",
      "expectations": [
        "Use the Interactions API with TapInteraction(.standardPoi) — the modern recommended approach for Standard style featuresets",
        "Shows the SwiftUI or UIKit pattern: TapInteraction(.standardPoi) { poi, context in ... }",
        "The poi object provides typed access to POI properties like poi.name",
        "Notes that returning true from the closure stops propagation to other interactions"
      ]
    },
    {
      "id": 4,
      "prompt": "I have a SwiftUI Mapbox map and I want to drop coffee shop markers from a GeoJSON feed. I don't have a custom image — I just need simple pins. What should I use?",
      "expectations": [
        "Recommends `Marker` (the Markers API) as the simplest fit",
        "Imports with `@_spi(Experimental) import MapboxMaps`",
        "Uses `ForEvery` with `Marker` inside the Map block",
        "Mentions that for hundreds or thousands of features a SymbolLayer on a GeoJSONSource is more appropriate"
      ]
    }
  ]
}

SHA-256: 4d673e793f2df53f90d14f5452702004475ce7ae41e9c60321a12d99e00ed9e0