Skip to content

Expo SDK 57に追随してiOSネイティブ設定を更新しビルド失敗を解消 - #6664

Merged
TinyKitten merged 2 commits into
devfrom
fix/ios-deployment-target-16-4
Aug 12, 2026
Merged

TinyKitten merged 2 commits into
devfrom
fix/ios-deployment-target-16-4

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

概要

Expo SDK 57 へのアップグレード (#6658) 以降、canary / production の iOS ビルドが失敗していた問題を修正します。#6658 は ios/ 配下を一切更新していないため、ネイティブ側が SDK 57 の前提に追随できていませんでした。段階の異なる 2 つの失敗が連鎖しています。

  1. pod install が Expo モジュール全 35 件を解決できず exit 1(デプロイメントターゲット 15.1 < 要求 16.4)
  2. 1 を解消した後の Archive で App Clip がコンパイル不能(RCTAppDelegate などの二重定義)

失敗例: Build iOS Canary #4610

[!] CocoaPods could not find compatible versions for pod "Expo":
[!] [Expo] expo was not linked: requires iOS 16.4 but app targets 15.1

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

1. iOS デプロイメントターゲットを 16.4 へ引き上げ

  • ios/Podfile.properties.json に ios.deploymentTarget: "16.4" を追加(ios/Podfile の platform :ios はこの値を参照する)
  • ios/Podfile のフォールバック値を '15.1' から '16.4' へ更新し、SDK 57 のテンプレートと揃えた
  • ios/TrainLCD.xcodeproj/project.pbxproj の IPHONEOS_DEPLOYMENT_TARGET を、アプリ本体 2 ターゲット(ProdTrainLCD / CanaryTrainLCD)の Debug / Release 計 4 箇所で 15.1 から 16.4 へ引き上げ
  • app.config.ts に ios.deploymentTarget: '16.4' を宣言。SDK 56 以降はこれが正式な指定先で(expo-build-properties 側の同名オプションは deprecated)、expo prebuild 実行時に上記 2 ファイルへ同じ値が展開される

SDK 57 で expo / expo-modules-core ほかの podspec が :ios => '16.4' に引き上げられた一方、本リポジトリは bare workflow で ios/ をコミット管理しており、ios/Podfile の当該行は SDK 54 期 (#5475) から変わっていませんでした。React Native 0.86 自体の min_ios_version_supported は 15.1 なので、制約を上げているのは Expo 側のみです。

なお RideSessionActivity(Live Activities 拡張、16.1)とプロジェクトレベルの既定値 12.0 は変更していません。前者は Pod をリンクしない App Extension で、拡張のデプロイメントターゲットがホストアプリより低いことは Xcode 上許容されます。後者は全 iOS ターゲットが明示値を持つため実効性がなく(watchOS ターゲットは WATCHOS_DEPLOYMENT_TARGET を使用)、いずれも今回の解決には不要なため差分を最小に留めています。

2. App Clip の AppDelegate から RCTAppDelegate.h の直接 import を削除

  • ios/CanaryAppClip/AppDelegate.h および ios/ProdAppClip/AppDelegate.h の #import <RCTAppDelegate.h> を削除し、<Expo/Expo.h> 経由の解決に一本化(削除理由をコメントで明記)

SDK 57 / RN 0.86 では prebuilt な React Core が使われ、Pods/Headers/Public/ に React-RCTAppDelegate/ と React-Core-prebuilt/React_RCTAppDelegate/ という同一クラスを含む 2 つのヘッダツリーが並存します。App Clip の AppDelegate.h は両方を 1 つの translation unit へ取り込んでいたため、RCTAppDelegate / RCTRootViewFactory / RCTRootViewFactoryConfiguration が duplicate interface definition となり main.m と AppDelegate.m がコンパイルできませんでした。RCTAppDelegate は <Expo/Expo.h> → RCTAppDelegateUmbrella.h → React_RCTAppDelegate-umbrella.h の経路で得られるため、直接 import は不要です。

本体アプリは ios/AppDelegate.swift(ExpoAppDelegate ベース)なのでこの問題の影響を受けず、失敗していたのは App Clip ターゲットのみでした。

回帰リスクと緩和策

サポート端末が変わります。 アプリの最小 iOS バージョンが 15.1 から 16.4 へ上がるため、iOS 15 系が上限の端末(iPhone 6s / 6s Plus / 7 / 7 Plus / SE 第 1 世代、iPad Air 2 など)は以降のアップデート対象外になります。iOS 16.4 は iOS 16 に更新できる全端末へ配信済みのため、それ以外の端末は OS を更新すれば影響を受けません。これは Expo SDK 57 が課す制約であり、SDK を戻さない限り回避手段はありません。

App Clip 側の変更は import の削除のみで、AppDelegate の継承関係・実装には手を加えていません。Prod / Canary の両 App Clip に同じ修正を入れているため、Build iOS Production 側でも同じ失敗は起きません。

テスト

ローカル(Linux)で実行:

npm run lint       Checked 631 files. No fixes applied.
npm test           218 suites / 2304 tests 全て passed
npm run typecheck  エラーなし
npx expo-doctor    19/19 checks passed

CocoaPods / Xcode の検証は Linux では行えないため、docs/ios-build-workflows.md の「Safe dry-run」手順に従い、本ブランチに対して Build iOS Canary を TestFlight アップロード無効で実行しています。

実行 結果
1 回目(変更 1 のみ) Install CocoaPods dependencies 成功 → Archive canary で App Clip のコンパイル失敗を検出
2 回目(変更 1 + 2) 成功。** ARCHIVE SUCCEEDED ** / コンパイルエラー 0 件 / dSYM アップロードまで完了、TestFlight アップロードは想定どおりスキップ

2 回目では本体ターゲット CanaryTrainLCD の Swift コンパイルとリンク(Ld …/CanaryTrainLCD.app/CanaryTrainLCD)にも到達しています。1 回目は App Clip が本体の依存ターゲットであるため、そこで失敗した時点で本体の残り工程がスキップされていました。

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

関連Issue

スクリーンショット(任意)

@TinyKitten TinyKitten self-assigned this Aug 12, 2026
@github-actions github-actions Bot added the ios label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2d50691d-7025-481a-a4f4-fdd5ec7cb1dc

📥 Commits

Reviewing files that changed from the base of the PR and between b0759c7 and 39eac2d.

📒 Files selected for processing (2)
  • ios/CanaryAppClip/AppDelegate.h
  • ios/ProdAppClip/AppDelegate.h

📝 Walkthrough

Walkthrough

iOSの最低デプロイメントターゲットを15.1から16.4へ更新しました。Expo、CocoaPods、Xcodeの設定を対象にしています。App ClipのRCTAppDelegate参照も更新しました。

Changes

iOS構成とApp Clipヘッダーの更新

Layer / File(s) Summary
デプロイメントターゲットの更新
app.config.ts, ios/Podfile, ios/Podfile.properties.json, ios/TrainLCD.xcodeproj/project.pbxproj
Expo、CocoaPods、ProdTrainLCD、CanaryTrainLCDのiOSデプロイメントターゲットを16.4へ更新しました。
App Clipヘッダー参照の更新
ios/CanaryAppClip/AppDelegate.h, ios/ProdAppClip/AppDelegate.h
RCTAppDelegate.hの直接インポートを削除しました。RCTAppDelegateをExpo/Expo.h経由で解決する構成に変更しました。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • TrainLCD/MobileApp#6658: ExpoおよびReact Nativeの更新に伴い、iOSの最低バージョンを16.4へ変更したPRです。

Poem

うさぎが跳ねて、設定更新
15.1から16.4へ進む
App Clipの参照も整え
Expo経由で重複を避ける
iOS構成がそろいました 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed 概要、変更内容、テスト、変更種別を具体的に記載しています。関連Issueと任意のスクリーンショットが未記載ですが、説明は十分です。
Title check ✅ Passed Expo SDK 57対応に伴うiOSネイティブ設定の更新とビルド失敗の修正を明確に示しています。
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ios-deployment-target-16-4

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands.

@TinyKitten TinyKitten changed the title iOSデプロイメントターゲットを16.4へ引き上げExpo SDK 57のPod解決失敗を解消 Expo SDK 57に追随してiOSネイティブ設定を更新しビルド失敗を解消 Aug 12, 2026
@TinyKitten
TinyKitten merged commit 6deabbe into dev Aug 12, 2026
4 checks passed
@TinyKitten
TinyKitten deleted the fix/ios-deployment-target-16-4 branch August 12, 2026 09:54
@TinyKitten TinyKitten mentioned this pull request Aug 18, 2026
6 of 9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant