<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/apple-improves-context-window-management-for-its-foundation-models-cx419bigo" -->

---
title: Apple Improves Context Window Management for its...
description: iOS 26.4 RC introduces new context window management tools for Apple&#x27;s on-device Foundation Models framework. The update adds a `contextSize` property on...
canonical: https://daily.dev/posts/apple-improves-context-window-management-for-its-foundation-models-cx419bigo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Apple Improves Context Window Management for its Foundation Models | daily.dev
og:description: iOS 26.4 RC introduces new context window management tools for Apple&#x27;s on-device Foundation Models framework. The update adds a `contextSize` property on...
og:url: https://daily.dev/posts/apple-improves-context-window-management-for-its-foundation-models-cx419bigo
og:image: https://api.daily.dev/og/posts/CX419bigo.png
og:image:alt: Apple Improves Context Window Management for its Foundation Models
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Apple Improves Context Window Management for its Foundation Models

**[InfoQ](https://daily.dev/sources/infoq)** · 3 min read · 0 upvotes · 0 comments

## Summary

iOS 26.4 RC introduces new context window management tools for Apple's on-device Foundation Models framework. The update adds a `contextSize` property on `SystemLanguageModel` and a `tokenCount(for:)` method, enabling developers to dynamically track and manage the 4096-token context window limit without hardcoding values. Key challenges include accounting for system prompts, user instructions, and tool definitions (which serialize their schemas and inflate token counts). These additions are back-deployed to all iOS versions supporting the framework, and Apple recommends strategies like session splitting, prompt trimming, and requesting shorter model responses to avoid `.exceededContextWindowSize` errors.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.infoq.com/news/2026/03/apple-foundation-models-context/>

## Similar posts on daily.dev

- [Managing Small Context Windows in Language Models](https://daily.dev/posts/managing-small-context-windows-in-language-models-n3u1axvbz) · Machine Learning Mastery · 1 upvotes · 0 comments

---

Tags: [#ai](https://daily.dev/tags/ai), [#llm](https://daily.dev/tags/llm), [#apple](https://daily.dev/tags/apple), [#swift](https://daily.dev/tags/swift)

[View this post on daily.dev](https://daily.dev/posts/apple-improves-context-window-management-for-its-foundation-models-cx419bigo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Apple Improves Context Window Management for its Foundation Models","url":"https://daily.dev/posts/apple-improves-context-window-management-for-its-foundation-models-cx419bigo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/apple-improves-context-window-management-for-its-foundation-models-cx419bigo"},"datePublished":"2026-03-23T11:02:57.803Z","dateModified":"2026-08-24T07:10:31.864Z","description":"iOS 26.4 RC introduces new context window management tools for Apple's on-device Foundation Models framework. The update adds a `contextSize` property on...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f31abe643858d627ae2ba1e7db387f4e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f31abe643858d627ae2ba1e7db387f4e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"InfoQ","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"InfoQ","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/afc3bced3e1e4b188dd9127017a60e0c","url":"https://daily.dev/sources/infoq"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/apple-improves-context-window-management-for-its-foundation-models-cx419bigo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai,llm,apple,swift","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"InfoQ","item":"https://daily.dev/sources/infoq"},{"@type":"ListItem","position":3,"name":"Apple Improves Context Window Management for its Foundation Models"}]}
```

