Skip to content

docs(mobile/4): iOS build requires Xcode 26 (iOS 26 SDK) - #450

Open
LukeTowers wants to merge 1 commit into
NativePHP:mainfrom
LukeTowers:docs/ios-xcode-26-requirement
Open

docs(mobile/4): iOS build requires Xcode 26 (iOS 26 SDK)#450
LukeTowers wants to merge 1 commit into
NativePHP:mainfrom
LukeTowers:docs/ios-xcode-26-requirement

Conversation

@LukeTowers

Copy link
Copy Markdown

What

Updates the Mobile v4 → Getting Started → Environment Setup iOS requirements from Xcode 16.0 or later to Xcode 26 or later (and notes the implied macOS 15.6+).

Why

Building a fresh v4 app on Xcode 16.4 (iOS 18.5 SDK) fails to compile in NativePHP's own renderer:

nativephp/ios/NativePHP/NativeRender/NativeRootTabsRenderer.swift:909
error: value of type 'TabBarAccessoryModifier.Content' has no member 'tabViewBottomAccessory'

tabViewBottomAccessory is an iOS 26-only SwiftUI API. Because the symbol must exist in the SDK at compile time, an #available guard can't rescue an older SDK — the iOS 26 SDK (shipped with Xcode 26) is required. Xcode 26 in turn requires macOS 15.6+.

Reproduced with nativephp/mobile 4.0.1 / nativephp/mobile-ui 0.3.0 via php artisan native:run ios.

Note for maintainers

I documented this as the current requirement, but if the intent is to keep supporting Xcode 16, the alternative is to gate the iOS 26 API in the renderer (compile-time SDK check) rather than change the docs — happy to adjust this PR either way.

Changes

  • resources/views/docs/mobile/4/getting-started/environment-setup.md: iOS requirements → Xcode 26 / macOS 15.6+, with a one-line rationale.

The v4 native renderer builds against iOS 26 SDK APIs (e.g.
`tabViewBottomAccessory` in `NativeRootTabsRenderer`), so compiling with
Xcode 16 / the iOS 18 SDK fails with "has no member 'tabViewBottomAccessory'".
Update the iOS environment-setup requirements to Xcode 26 (which itself
requires macOS 15.6+), and explain why.
@LukeTowers

Copy link
Copy Markdown
Author

Build log excerpt (reproduces the Xcode 16 failure)

Environment: Xcode 16.4 (Build 16F6), macOS 15.5, Apple silicon · nativephp/mobile 4.0.1 / mobile-ui 0.3.0 · php artisan native:run ios <ipad-sim-udid> --build=debug.

The active SDK is iOS 18.5 (the newest Xcode 16.4 ships), and that's where the compile dies:

xcodebuild output (key lines; full log is ~1900 lines of build-system noise)
# --- SDK / target (from build settings) ---
SDKROOT = iphonesimulator18.5
-target arm64-apple-ios18.2-simulator ...
  -isysroot .../Developer/SDKs/iPhoneSimulator18.5.sdk

# --- compile error ---
.../NativePHP/NativeRender/NativeRootTabsRenderer.swift:844:10: warning:
  'onChange(of:perform:)' was deprecated in iOS 17.0: Use `onChange` with a
  two or zero parameter action closure instead.
        .onChange(of: mode) { _ in
         ^
.../NativePHP/NativeRender/NativeRootTabsRenderer.swift:909:22: error:
  value of type 'TabBarAccessoryModifier.Content'
  (aka '_ViewModifier_Content<TabBarAccessoryModifier>')
  has no member 'tabViewBottomAccessory'
                    .tabViewBottomAccessory {
                     ^~~~~~~~~~~~~~~~~~~~~~

# --- failure tail ---
** BUILD FAILED **

The following build commands failed:
	SwiftCompile normal arm64 Compiling NativeRootTabsRenderer.swift, ... (in target 'NativePHP-simulator' from project 'NativePHP')
	SwiftCompile normal arm64 .../NativeRootTabsRenderer.swift (in target 'NativePHP-simulator' from project 'NativePHP')
	Building workspace NativePHP with scheme NativePHP-simulator
(3 failures)

tabViewBottomAccessory doesn't exist in the iOS 18.5 SDK, so the compiler rejects it outright — confirming an iOS 26 SDK (Xcode 26) is required to build the current release. Installing Xcode 26 (macOS 15.6+) is the fix.

(Full raw log withheld — it's ~272 KB of a private repo's build output; happy to share more specific sections if useful.)

@simonhamp

Copy link
Copy Markdown
Member

Good find! I think we should actually make it so that tabViewBottomAccessory isn't attempted on anything pre-iOS 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants