Rebuilding with Xcode 27 and the iOS 27 SDK changes behaviour that the same app running on iOS 27 did not show. @State becomes a macro and some initializer patterns stop compiling, a TabView can crash when its selection points at a hidden tab, selectable text gets system gestures, sheets stop inheriting control styling, and apps without a launch screen or the scene life cycle are refused or fail to launch. Run the audit script, fix the compile errors, and test on iOS 27 and on your oldest supported version.
An app that runs fine on iOS 27 can change the moment you rebuild it with Xcode 27. Apple gates a long list of behaviour on the SDK your binary was linked against, so the version already in the App Store keeps the old behaviour on an iOS 27 phone, and the build you make next week picks up the new one. A tab bar can start crashing. A long press on a chat bubble can stop working. A sheet can lose its compact buttons. None of that shows up in the release you shipped, which is why it tends to land in the small update you expected to be boring.
This matters more if your app was written with Cursor, Claude Code or another AI tool, because the code tends to follow patterns from older SwiftUI projects, and the assistant that wrote it may not know about the iOS 27 entries unless you hand them over. It matters most when the first rebuild happens under pressure, say a crash fix for a live app. 100 Days of SwiftUI: A 2026 Roadmap From Intermediate to Expert is one way to catch up on the newer patterns yourself.
What follows comes from Apple's iOS and iPadOS 27 release notes and Xcode 27 release notes, read on 8 November 2026. Each change gets what Apple says, what it looks like in an app, and what to do. There is a read-only script further down that finds most of these spots in a repo. The Swift snippets were written against Apple's documentation and have not been compiled, because no Xcode was available where this article was prepared. The Python script was run on small sample projects.
Three kinds of change, and why the difference matters
The entries in the release notes sort into three groups, and each group fails in its own way.
The first group is compile time. Xcode 27 ships Swift 6.4 and a new implementation of @State, so some code stops building as soon as you open the project in the new Xcode. These are the friendly ones, because the compiler tells you.
The second group is SDK-linked runtime behaviour. Apple writes these as "in apps built with the iOS 27.0 SDK". The project compiles without a warning, and the behaviour changes only when the new binary runs on iOS 27. On an iOS 18 phone the same build does what it always did, so a quick test on your old personal device proves nothing.
The third group is hard gates: a launch screen, and the scene-based life cycle. Miss one and the app is either refused or does not start.
A practical note on timing before the details. Xcode 27 needs a Mac on macOS Tahoe 26.6 or later, and it supports on-device debugging for iOS 17 and later. When this was written, Apple's Upcoming Requirements page listed no deadline for building with the iOS 27 SDK. Check that page before you plan around it, since Apple publishes those dates there.
@State is now a macro
Xcode 27 replaces the @State property wrapper with a Swift macro. Apple describes it as largely source compatible, with a few exceptions, and the reason for the change is useful to know. An expression such as @State private var model = Model() used to run every time the view struct was created, so Model.init() could fire many times over the view's life. The new version stops that repeated evaluation, and Apple says this behaviour back-deploys to iOS 17 aligned OSes.
The first exception is the most likely one to appear in generated code: a value at the declaration plus an assignment in init.
struct ProfileScreen: View {
@State private var model = ProfileModel()
let userID: String
init(userID: String) {
self.model = ProfileModel(userID: userID) // never had any effect
self.userID = userID
}
}
Apple is explicit that the initializer's value was always discarded here, so this code was already wrong. Under the macro some of these cases stop compiling, which is an improvement, since you find out. The fix is to remove the value from the declaration.
struct ProfileScreen: View {
@State private var model: ProfileModel
let userID: String
init(userID: String) {
self.model = ProfileModel(userID: userID)
self.userID = userID
}
var body: some View {
ProfileContent(model: model)
.task(id: userID) { await model.load(userID: userID) }
}
}
Two things in that fix deserve a comment. Blake Crosley tested Xcode 27.0 and reported that Apple's broken example compiled once the plain property was assigned before the @State one, and that the _x = State(initialValue:) form still compiles. That is one developer's testing and Apple has not confirmed it, but it means a green build doesn't prove the discarded value is gone. Search for the pattern instead of waiting for an error.
The second is the .task(id:). SwiftUI keeps the first value it stored for that view's identity. If userID changes later while the view stays on screen, a new value passed through init is ignored, and you are left looking at the old user. An assistant asked to "fix the compile error" will usually stop once the build is green, and that leaves the stale data bug in place.
The other exceptions are narrower. When every stored property of a struct is private, the compiler normally synthesizes a private memberwise initializer you can call from an extension of the same type. The macro disables it, so an extension calling self.init(page:title:) stops building, and you assign the members by hand instead. Generic inference is less flexible in rare cases, and the answer is to write the type out. Composing @State with other property wrappers or macros is not supported.
Since @State now evaluates its expression less often, look at any model whose init has side effects, such as starting a request or adding an observer. If that code ran several times before, you may have been relying on the repeats without knowing it, or you may have had duplicate requests that now go away. Apple's note says iOS 17 aligned systems get the new behaviour and says nothing about older ones, so if your deployment target is below iOS 17, test there too.
Two neighbouring items are compile-time as well. The @Entry macro now warns if you store default class instances or closures in the environment, and toolbarMinimizationBehavior replaces toolbarMinimizeBehavior. Crosley's SDK check found that the old toolbar name no longer compiles.
TabView can crash on a hidden selection
This entry turns a quiet state bug into a crash. Apple says that in apps built with the iOS 27.0 and iPadOS 27.0 SDKs, a TabView enforces that its selection is set to a visible tab, and that it might crash when the selection points at a hidden or otherwise unavailable tab.
Apple's documentation for hidden(_:) tells you to update the selection when you hide a tab. Plenty of code skips that step, because the result was usually harmless. The risky situations are the ones that happen away from the happy path: a user logs out while on the Admin tab, a feature flag turns a tab off, a size class change hides a tab on iPad, or a deep link sets the selection to a tab this user doesn't have.
enum AppTab: Hashable { case home, search, admin }
struct RootView: View {
@State private var tab: AppTab = .home
let isAdmin: Bool
private var visibleTab: Binding<AppTab> {
Binding(
get: { tab == .admin && !isAdmin ? .home : tab },
set: { tab = $0 }
)
}
var body: some View {
TabView(selection: visibleTab) {
Tab("Home", systemImage: "house", value: AppTab.home) { HomeView() }
Tab("Search", systemImage: "magnifyingglass", value: AppTab.search) { SearchView() }
Tab("Admin", systemImage: "gear", value: AppTab.admin) { AdminView() }
.hidden(!isAdmin)
}
}
}
Apple's sample for hidden(_:) handles a size class change with onChange. The derived binding goes one step further, so TabView never reads a value it can't show, even during the update where isAdmin flips. Test this on a device by logging out from each hideable tab, and by opening every deep link while signed out.
Selectable text now brings its own gestures
Before iOS 27, .textSelection(.enabled) on Text offered selection through a callout menu. With the 27.0 SDK it uses the system text selection UI, and Apple warns that selectable Text might include additional gestures for those interactions. Its advice is to use .highPriorityGesture() for custom gestures that should win.
Chat bubbles, code snippets and receipts are the likely trouble spots, since those are the places where developers add a long press or double tap on text that is also selectable.
Text(message.body)
.textSelection(.enabled)
.highPriorityGesture(
LongPressGesture(minimumDuration: 0.4)
.onEnded { _ in showReactions = true }
)
Decide on purpose, because you can't fully have both. If the long press wins, people lose the system's way of starting a selection on that view. A common compromise is a "Copy" action inside the reaction menu, with selection left to a detail screen.
Sheets stop inheriting control styling
Apple lists this as a fix. In apps built with the 27.0 SDKs, the controlSize, buttonSizing, buttonRepeatBehavior, menuIndicatorVisibility and ButtonBorderShape environment values are reset to their defaults in sheets and popovers.
If you set .controlSize(.small) or .buttonBorderShape(.capsule) near the root of the app and counted on it reaching a sheet, the sheet will look different after the rebuild. Layout can shift as well, because a regular button is taller than a small one, and a tightly sized sheet with a fixed detent can start clipping its last row. Apply the modifiers inside the presented content.
.sheet(isPresented: $showFilters) {
FiltersView()
.controlSize(.small)
.buttonBorderShape(.capsule)
.presentationDetents([.medium])
}
Geometry and scroll positions
containerRelativeFrame(_:alignment:) is the most layout-sensitive item on the list. Apple's entry describes the old problem on the non-scrollable axis: a view using containerRelativeFrame(.vertical) inside a horizontal ScrollView extended into vertical safe areas such as the navigation bar and home indicator, because only the scrollable axis insets were applied. Full-height card carousels and onboarding pagers often use exactly this. If someone added padding, a negative offset or an ignoresSafeArea to make that layout look right, those numbers were compensating for the old math and need another look after the rebuild.
Tapping the status bar to scroll to the top now updates a bound scrollPosition. The old behaviour could leave the binding holding a stale value. Good news in general, but anything keyed off that binding will begin to fire on a status bar tap, such as a "jump to top" button, a collapsing header or a pagination trigger.
LabeledContent inside a Menu now maps its value to the menu item's subtitle. It is a small visual change, and worth a glance if you built a settings menu that way.
AsyncImage isn't tied to the SDK in Apple's wording, but it now caches downloaded images according to standard HTTP caching headers. If your server sends long-lived cache headers and you replace an avatar at the same URL, a person may keep seeing the old picture. You can pass a URLRequest with its own cachePolicy to the new initializers, or set a session with View.asyncImageURLSession(_:).
The UIKit entries a SwiftUI app can still hit
Mixed apps should read these too. In apps built with the iOS 27.0 SDK, a presented view controller inherits its trait collection by walking up the superview chain instead of going straight to the presentation controller, so a custom UIPresentationController that passes traits down directly might need changes. UISearchController with center search bar placement now puts the scope bar on the same row as the search field. barMinimizeBehavior and barMinimizationSafeAreaAdjustment on UINavigationItem give way to navigationBarMinimization.
Two deprecations are cheap to clear while you're here. FileDocument is deprecated in favour of ReadableDocument or Document. The .roundedBorder and .squareBorder text field styles are soft deprecated in favour of .bordered, and the compiler won't fail the build over it.
The two gates that stop an app outright
Apple says iOS and iPadOS apps built with the 27.0 SDK or later must include a launch screen. The Info.plist needs one of UILaunchStoryboardName, UILaunchStoryboards, UILaunchScreen or UILaunchScreens, and apps without one are rejected once the App Store begins accepting apps built with that SDK. A project that uses a generated Info.plist usually carries this as a build setting, so look in the target's Info tab or for INFOPLIST_KEY_UILaunchScreen_Generation in the project file.
The other gate is harsher. Under Deprecations, Apple states that apps built with the latest SDK must adopt the scene-based life cycle or they fail to launch. A pure SwiftUI app using @main and App is already on scenes. The risk sits with older UIKit projects and cross-platform templates where AppDelegate creates the window itself. If you started from a React Native, Flutter or Expo template, open the ios folder and check, and update the framework first, since its template may have already moved. Apple's guide is linked in the sources below. Guideline 2.1 Rejection: Why Your AI-Built App Crashed in App Review shows what that looks like when it reaches a reviewer.
Find them all with one script
This is read-only and uses only the Python standard library. Every line it prints is a place to go and look, and plenty of hits will be harmless. It was tested on two small sample projects written for the purpose, including comments that shouldn't match. It hasn't been run on a large real-world app, and it will miss patterns that are spread across several files.
#!/usr/bin/env python3
"""Read-only scan for code that changes when rebuilt with Xcode 27 / the iOS 27 SDK.
Usage: python3 ios27_rebuild_audit.py /path/to/YourApp
Every hit is a place to look at, not a confirmed bug."""
import pathlib, re, sys
root = pathlib.Path(sys.argv[1] if len(sys.argv) > 1 else ".")
SKIP = {".build", "Pods", "DerivedData", "node_modules", "Carthage", ".git"}
LINE_RULES = [
(r"@\w+\s+@State\b|@State\s+@\w+", "STATE-COMPOSE", "@State combined with another wrapper or macro is not supported"),
(r"toolbarMinimizeBehavior", "TOOLBAR-RENAME", "replaced by toolbarMinimizationBehavior"),
(r"\bbarMinimizeBehavior|barMinimizationSafeAreaAdjustment", "NAVBAR-RENAME", "replaced by navigationBarMinimization"),
(r"\bFileDocument\b", "FILEDOC", "deprecated: move to ReadableDocument or Document"),
(r"\.(roundedBorder|squareBorder)\b", "TEXTFIELD-STYLE", "soft deprecated: use the .bordered text field style"),
(r"\.textSelection\(\.enabled\)", "TEXT-SELECT", "system selection gestures now apply; test long press and tap on this view"),
(r"containerRelativeFrame\(", "CRF", "safe-area math changed on the non-scrollable axis"),
(r"\.scrollPosition\(", "SCROLLPOS", "status bar scroll-to-top now updates this binding"),
(r"@Entry\s+var\s+\w+.*=\s*([A-Z]\w*\(|\{)", "ENTRY", "@Entry warns on default class instances or closures"),
(r"\.statusBar(Frame|Orientation|Style)\b|isStatusBarHidden", "STATUSBAR", "deprecated UIApplication status bar accessors"),
]
def code_lines(text):
for n, line in enumerate(text.splitlines(), 1):
yield n, re.sub(r"//.*$", "", line)
def report(path, n, tag, msg):
print(f"{path.relative_to(root)}:{n} [{tag}] {msg}")
def scan_swift(path):
text = path.read_text(errors="ignore")
lines = list(code_lines(text))
for n, line in lines:
for pat, tag, msg in LINE_RULES:
if re.search(pat, line):
report(path, n, tag, msg)
with_default = {m.group(1): i for i, l in lines
for m in [re.search(r"@State\s+(?:(?:private|fileprivate|public|internal)(?:\(set\))?\s+)?var\s+(\w+)[^=]*=", l)] if m}
in_init, depth = False, 0
for n, line in lines:
if not in_init and re.search(r"(?<![.\w])init\s*\(", line):
in_init, depth = True, 0
if in_init:
for name in with_default:
if re.search(rf"\b(self\.)?{name}\s*=(?!=)", line) and "@State" not in line:
report(path, n, "STATE-INIT", f"'{name}' has a value at its declaration and is assigned here")
if re.search(rf"\b_{name}\s*=", line):
report(path, n, "STATE-INIT", f"'_{name}' is assigned here and '{name}' also has a declaration value")
depth += line.count("{") - line.count("}")
if depth <= 0 and "}" in line:
in_init = False
has = lambda p: re.search(p, re.sub(r"//.*", "", text))
if has(r"TabView\s*\(\s*selection") and has(r"\.hidden\(|tabViewCustomization|defaultVisibility"):
n = next(i for i, l in lines if re.search(r"TabView\s*\(\s*selection", l))
report(path, n, "TABVIEW", "selection must always point at a visible tab or TabView might crash")
if has(r"\.(sheet|popover)\(") and has(r"\.(controlSize|buttonSizing|buttonRepeatBehavior|menuIndicatorVisibility|buttonBorderShape)\("):
report(path, 1, "SHEET-ENV", "control modifiers no longer reach sheet or popover content")
if has(r"\bMenu\b\s*[\({]") and has(r"\bLabeledContent\b"):
report(path, 1, "MENU-LC", "LabeledContent inside a Menu now maps its value to the item subtitle")
def scan_app_config():
blob, sources = "", 0
for p in root.rglob("*"):
if SKIP & set(p.parts) or not p.is_file():
continue
if p.suffix == ".plist" or p.name == "project.pbxproj":
blob += p.read_text(errors="ignore")
sources += 1
swift = "".join(p.read_text(errors="ignore") for p in root.rglob("*.swift") if not SKIP & set(p.parts))
if not sources:
print("[CONFIG] no Info.plist or project.pbxproj found, launch screen and scene checks skipped")
return
if not re.search(r"UILaunchStoryboardName|UILaunchStoryboards|UILaunchScreen", blob):
print("[LAUNCH] no launch screen key found: a build with the 27.0 SDK is rejected once the App Store accepts that SDK")
scene = re.search(r"UIApplicationSceneManifest", blob)
swiftui_app = re.search(r"@main\s+struct\s+\w+\s*:\s*App\b", swift)
if not scene and not swiftui_app:
print("[SCENE] no scene manifest and no SwiftUI App entry point: apps built with the latest SDK fail to launch without the scene life cycle")
def main():
for path in sorted(root.rglob("*.swift")):
if not SKIP & set(path.parts):
scan_swift(path)
scan_app_config()
main()
Run it from the Terminal with the repo path, then work through the output from the top. The [LAUNCH] and [SCENE] lines come first in importance even though they print last.
Running the audit on a Mac
The script was run with the system Python on a Mac against three small projects written for the check. The Mac had Xcode 26.2, which has no iOS 27 SDK, so none of the iOS 27 behaviour in this post could be observed there. What could be checked was the script itself and whether the post's Swift is valid code today: all five snippets, with small stand-ins for the types they use, type-checked against the iOS 26.2 Simulator SDK with no errors or warnings.
- A UIKit app with only an app delegate and a launch storyboard printed one line,
[SCENE], and no[LAUNCH]. That is the right result for an app that still needs the scene life cycle. - A SwiftUI app holding this post's examples got
[TEXT-SELECT]and[SHEET-ENV]for the chat bubble,[STATE-INIT]for the brokenProfileScreen, nothing for the fixed one, and[TABVIEW]for the root view. The tab view hit appeared even with the derived binding in place, because the script cannot tell a safe selection from an unsafe one, which is what "a place to look" means. - A SwiftUI project with a generated Info.plist printed nothing. Its project file holds
INFOPLIST_KEY_UILaunchScreen_Generation, which the launch screen check accepts, so modern projects don't get a false alarm.
Two edge cases in the third test file showed gaps in the STATE-INIT check. A reset() function that called ProfileModel.init() and then assigned model was reported as an initializer, because .init( matched the pattern for init(. And @State private(set) var count = 0, assigned in a real initializer, was not reported, because the pattern only allowed private before var. The script above now ignores init( after a dot and accepts private(set), fileprivate and the other access levels. With both changes the false report went away and the missed one appeared.
If an AI agent is doing the migration
Assistants do well on this job when they have the source text, and badly when they work from memory. Paste the relevant release note entries into the session, along with the script's output, and give it a narrow brief:
We are rebuilding with Xcode 27 and the iOS 27 SDK. Here are Apple's release
note entries and the output of an audit script. For each hit, say whether it
is affected and why. Do not change layout values or remove gestures yet.
For @State: remove declaration-site values only where init assigns the same
property, and flag any view where the input can change while the view stays
on screen. For TabView: show me every path that can set the selection to a
hidden tab. List what you could not verify by compiling or running.
Keep the last sentence in. An agent that can't run the app on a device will report success on visual and gesture changes it has no way of seeing, so make it say what remains untested.
A test pass that catches most of this
Build with Xcode 27 and run on an iOS 27 device or simulator first, since the SDK-linked behaviour appears only there. Then run the same build on the oldest iOS version you support, because the @State runtime change is limited to iOS 17 aligned systems and later.
| Area | What to do | What going wrong looks like |
|---|---|---|
| Tabs | Log out or lose access while on each conditional tab, open deep links while signed out | Crash on selection change |
| Text | Long press and double tap every selectable text view with a custom gesture | Your action no longer fires, or selection fights it |
| Sheets | Open each sheet and popover, compare with the current release | Larger buttons, clipped last row |
| Pagers and carousels | Check top and bottom edges on a notched phone and an iPad | Content shorter or under the bars |
| Scroll views | Tap the status bar on long lists | Header, pagination or button fires unexpectedly |
| Identity | Change the selected item while a detail view stays open | Old data on screen |
| Launch | Cold start from a clean install | Black screen or failure to launch |
Do this pass on a branch before you need it. The worst time to learn about the TabView crash is during an emergency fix to a live app, when the rebuild was supposed to change one line.
If you use Claude Code for iOS work, Claude Code + Xcode: The Production iOS Workflow Kit is a paid set of Claude Code files from this blog's author, with templates, 8 rules, 6 commands including /ios-review and /ios-release, and 10 iOS agents, plus a sample Xcode project. Its product page says it was verified with Xcode 26.2 and iOS SDK 26.2, so treat it as a workflow and check the iOS 27 items above yourself.
Keep reading on JR Devhub
- Apple Says 100,000 Apps Are Built for iPhone Duo. How to Get Your AI-Built App Ready and Earn the Badge
- The Touchscreen MacBook Pro Is Here: What to Fix in Your Mac App First
- Siri AI App Skills: What iOS Developers Should Build Before Spring
- Claude Code + Xcode: The iOS Workflow I Use Before Every Edit
Sources
- iOS & iPadOS 27 Release Notes, Apple
- Xcode 27 Release Notes, Apple
- hidden(_:) for TabContent, Apple
- Transitioning to the UIKit scene-based life cycle, Apple
- Upcoming Requirements, Apple Developer
- The @State Macro: What Xcode 27 Stops Compiling, Blake Crosley
- iOS 27.0 Release Notes: Deprecations, Breaks, and Fixes, Blake Crosley

Comments