Skip to content

NSMotionUsageDescriptionを各iOSターゲットに追加してTestFlight配信のブロックを解消 - #6668

Merged
TinyKitten merged 2 commits into
devfrom
claude/nsmotion-usage-description-oo2nqx
Aug 12, 2026
Merged

TinyKitten merged 2 commits into
devfrom
claude/nsmotion-usage-description-oo2nqx

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

概要

Expo SDK 57 の expo-location が iOS の CMMotionActivityManager を参照するようになり、NSMotionUsageDescription 未設定を理由に TestFlight でテストを開始できない状態になっていた。各 iOS ターゲットに purpose string を追加してブロックを解消する。

変更の種類

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

変更内容

  • ios/TrainLCD/Schemes/Prod/Info.plist と ios/TrainLCD/Schemes/Dev/Info.plist に NSMotionUsageDescription を追加
  • ios/ProdAppClip/Info.plist と ios/CanaryAppClip/Info.plist にも同キーを追加(App Clip は Podfile 上でアプリターゲットのネストターゲットであり、同じ Pod をリンクするため)
  • ios/ja.lproj/InfoPlist.strings / ios/en.lproj/InfoPlist.strings にローカライズ済みの説明文を追加(既存の位置情報・写真ライブラリの purpose string と同じ運用に合わせた)

背景:

  • [email protected] の ios/Providers/MotionActivityStreamer.swift / ios/Requesters/MotionActivityPermissionRequester.swift / ios/LocationModule.swift が import CoreMotion と CMMotionActivityManager を使用している(SDK 57 で追加された getMotionActivityAsync / watchMotionActivityAsync 用)
  • 同梱の config plugin は NSMotionUsageDescription を既定値で注入する設計だが、本リポジトリは ios/ を直接管理しており Info.plist も Schemes/{Prod,Dev} 配下の独自パスのため、plugin による注入が届かない
  • アプリ側の JS からモーションアクティビティ API を呼んでいる箇所は現状無いが、バイナリが CoreMotion をリンクしている以上 purpose string は必須

リグレッションリスク: 変更は Info.plist へのキー 1 件追加とローカライズ文字列の追加のみで、既存キーの変更・削除は無い。実行時の挙動には影響せず、モーションアクティビティ API を呼んだ場合にのみ本文言が表示される。

テスト

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

作業環境が Node 22 / npm 10 で engines: npm>=11 と不整合になり npm ci が失敗するため、npm test / npm run typecheck はローカル実行できていない。npm run lint 相当の biome check ./src(631 ファイル)のみ単体実行し指摘なし。差分は iOS の Info.plist / InfoPlist.strings のみで JS/TS を含まないため、残り 2 つは CI での確認をお願いしたい。あわせて 4 つの plist が plistlib でパースできることを確認済み。

関連Issue

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


Generated by Claude Code

Summary by CodeRabbit

  • 新機能
    • 移動状況の判定にモーションセンサーを使用することを、iOSの許可画面で明示するようになりました。
    • 位置情報とモーションセンサー情報を組み合わせて、乗車中や徒歩などの移動状況を判定します。
    • 許可メッセージを日本語・英語に対応しました。

@github-actions github-actions Bot added the ios label Aug 12, 2026
@TinyKitten TinyKitten self-assigned this 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: 68bd4d64-30c0-4712-97c7-7035f38ce58a

📥 Commits

Reviewing files that changed from the base of the PR and between 05f9c96 and 7014b75.

📒 Files selected for processing (6)
  • ios/CanaryAppClip/Info.plist
  • ios/ProdAppClip/Info.plist
  • ios/TrainLCD/Schemes/Dev/Info.plist
  • ios/TrainLCD/Schemes/Prod/Info.plist
  • ios/en.lproj/InfoPlist.strings
  • ios/ja.lproj/InfoPlist.strings

📝 Walkthrough

Walkthrough

各iOSターゲットにNSMotionUsageDescriptionを追加しました。モーションセンサーの利用目的を設定し、英語と日本語のローカライズ文言を追加しました。

Changes

モーションセンサー利用目的の追加

Layer / File(s) Summary
利用目的とローカライズ文言
ios/CanaryAppClip/Info.plist, ios/ProdAppClip/Info.plist, ios/TrainLCD/Schemes/*/Info.plist, ios/{en,ja}.lproj/InfoPlist.strings
各iOS設定ファイルにNSMotionUsageDescriptionを追加しました。英語と日本語の表示文言を追加しました。

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

うさぎが跳ねて、センサーもぴょん
目的の文言、設定に整う
英語と日本語、並んで光る
iOSの許可が、静かに伝わる
ぴょん、変更完了! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは各iOSターゲットへのNSMotionUsageDescription追加とTestFlightブロック解消という主な変更を明確に示しています。
Description check ✅ Passed 概要、変更内容、変更種別、テスト結果、未実行理由を記載しており、テンプレートの必須情報をおおむね満たしています。
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/nsmotion-usage-description-oo2nqx

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. Track spend and usage in your billing settings.


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

@TinyKitten
TinyKitten merged commit f43f5fe into dev Aug 12, 2026
4 checks passed
@TinyKitten
TinyKitten deleted the claude/nsmotion-usage-description-oo2nqx branch August 12, 2026 10:35
This was referenced Aug 12, 2026
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.

2 participants