Skip to content

[v8.6.0] App Clips導入 - #4077

Merged
TinyKitten merged 8 commits into
devfrom
feature/appclip
Feb 19, 2025
Merged

TinyKitten merged 8 commits into
devfrom
feature/appclip

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Feb 19, 2025 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • 新機能
    • アプリクリップ環境向けのUI改善を実施しました。これにより、バックグラウンドオーディオ設定はアプリクリップ利用時に調整され、利用するためにはフルバージョンのダウンロードが必要な旨の案内が表示されます。
    • また、テーマ設定ではLEDテーマが表示されなくなるなど、クリップ環境に合わせた変更が加えられています。

@coderabbitai

coderabbitai Bot commented Feb 19, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

この変更は、iOSアプリ内のApp Clip機能の統合を強化するためのものです。
具体的には、app.json に新たなプラグイン設定や iOS 固有の設定(ios, bundleIdentifier)を追加し、翻訳ファイルに App Clip 用の警告文エントリを挿入しています。
さらに、Canary/Prod 各 App Clip 用の新規 iOS 実装ファイル(AppDelegate、Info.plist、entitlements、main ファイルなど)および Xcode のプロジェクト設定、xcscheme、Podfile のターゲット構成が追加されています。
また、react-native-app-clip パッケージの依存関係の追加と、各コンポーネントにおいて isClip() を用いた条件分岐ロジックの変更が含まれています。

Changes

File(s) Change Summary
app.json フォーマット調整と新しい plugins セクション(react-native-app-clip 用設定)および ios セクション(bundleIdentifier の追加)の導入
assets/translations/en.json
assets/translations/ja.json
App Clip 用の警告文 "bgTtsAppClipAlertText" を各言語の翻訳ファイルに追加
ios/CanaryAppClip/...
(AppDelegate.h, AppDelegate.m, CanaryAppClip.entitlements, Info.plist, main.m)
CanaryAppClip 用の新規 iOS 実装ファイル、エントitlements と Info.plist、およびエントリーポイントを追加
ios/CanaryTrainLCD.entitlements CanaryTrainLCD 用のエントitlementsファイルの新規作成
ios/Podfile 既存ターゲットに加え、ProdAppClip と CanaryAppClip の新規ターゲットを追加
ios/ProdAppClip/...
(AppDelegate.h, AppDelegate.m, Info.plist, ProdAppClip.entitlements, main.m)
ProdAppClip 用の新規 iOS 実装ファイルと各種設定の追加
ios/ProdTrainLCD.entitlements ProdTrainLCD 用のエントitlementsファイルの新規作成
ios/RideSessionActivity/...
(CanaryRideSessionActivity.entitlements, ProdRideSessionActivity.entitlements)
RideSessionActivity 拡張用のエントitlementsファイル(空の plist)の追加
ios/TrainLCD.xcodeproj/...
(project.pbxproj, xcshareddata/xcschemes/XXX.xcscheme, Schemes/Prod/Info.plist)
App Clip ターゲット(ProdAppClip / CanaryAppClip)および関連するスキーム、ビルド設定、エントitlements 参照の更新
ios/WatchApp/ProdWatchApp.entitlements ProdWatchApp 用の新規エントitlementsファイルの追加
package.json 依存関係に "react-native-app-clip": "^0.5.1" を追加
src/hooks/useWarningInfo.ts
src/screens/AppSettings/index.tsx
src/screens/AppSettings/themes.ts
src/screens/Main.tsx
src/screens/NotificationSettingsScreen.tsx
react-native-app-clip からの isClip() のインポートおよび各コンポーネント内での条件分岐ロジックの追加・変更(App Clip 環境の場合の処理分岐)
ios/fastlane/Fastfile
ios/fastlane/Matchfile
新しい App Clip アプリ識別子 (me.tinykitten.trainlcd.Clip および me.tinykitten.trainlcd.dev.Clip) の追加

Sequence Diagram(s)

sequenceDiagram
    participant User as ユーザー
    participant AD as AppDelegate
    participant RN as React Native コンポーネント
    participant isClip as isClip()

    User->>AD: アプリ起動
    AD->>RN: JavaScriptバンドルの読み込み開始
    RN->>isClip: App Clip 状態をチェック
    alt isClip == true
        RN->>RN: バックグラウンド許可アラートなどの処理をスキップ
    else isClip == false
        RN->>User: 通常の許可確認や警告を表示
    end
Loading

Possibly related PRs

Poem

ひらりとコード舞う、夜空の下
新たなClipの風が、僕らを包むよ
設定も翻訳も、整えて行こう
ターゲット増えた道、しっかり踏みしめ
私はウサギ、喜びの跳ね声 🐇
キラリと未来へ、コードは光るよ


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b2f992 and aa989c5.

⛔ Files ignored due to path filters (1)
  • ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • ios/TrainLCD.xcodeproj/project.pbxproj (65 hunks)
  • ios/TrainLCD/Schemes/Prod/Info.plist (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • ios/TrainLCD/Schemes/Prod/Info.plist
🧰 Additional context used
🧠 Learnings (1)
ios/TrainLCD.xcodeproj/project.pbxproj (1)

undefined

<retrieved_learning>
Learnt from: TinyKitten
PR: #4077
File: ios/TrainLCD.xcodeproj/project.pbxproj:3046-3046
Timestamp: 2025-02-19T12:03:55.562Z
Learning: TrainLCDのApp Clipはアプリの性質上15MB以下に抑えることが困難なため、50MBまで許容されるiOS 17以上をデプロイメントターゲットとして設定している。
</retrieved_learning>

🔇 Additional comments (2)
ios/TrainLCD.xcodeproj/project.pbxproj (2)

3106-3106: App Clipのデプロイメントターゲットバージョンについて

App Clipのサイズ制限(50MB)の要件を満たすためにiOS 17以上を指定しているのは適切な判断です。


3102-3105: App Clipの画面向きの設定について

App Clipを横向き(ランドスケープ)のみに制限しているのは、TrainLCDの主要な表示機能に合わせた適切な設定です。


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (1)
src/hooks/useWarningInfo.ts (1)

124-135: 🛠️ Refactor suggestion

依存配列の最適化

useMemoの依存配列にisClipが含まれていません。App Clipの状態が変更された場合に適切に再計算されるよう、依存配列に追加することを検討してください。

  }, [
    autoModeEnabled,
    badAccuracy,
    bgPermGranted,
    fgPermStatus?.granted,
    isAlwaysPermissionNotGrantedDismissed,
    isInternetAvailable,
    longPressNoticeDismissed,
    screenshotTaken,
    selectedBound,
    warningDismissed,
+   isClip,
  ]);
🧹 Nitpick comments (9)
ios/TrainLCD.xcodeproj/project.pbxproj (1)

386-389: 追加されたフレームワークと ExpoModulesProvider の参照
Pods_TrainLCD_CanaryTrainLCD_CanaryAppClip.framework や Pods_TrainLCD_ProdTrainLCD_ProdAppClip.framework、ExpoModulesProvider.swift の参照が増えています。重複や不要な依存がないか軽く点検をおすすめします。

ios/CanaryAppClip/CanaryAppClip.entitlements (1)

5-12: Canary版App Clipのドメイン設定について

本番環境とCanary環境で同じApp Clipドメインを使用していることに関して:

  • 開発環境用の別ドメインを検討することを推奨します(例:appclip-dev.trainlcd.app)
  • 本番環境とCanary環境で同じドメインを共有することによる潜在的な問題がないか確認してください
ios/ProdAppClip/AppDelegate.m (2)

19-26: Firebaseの初期化をApp Clip向けに最適化することを推奨します

App Clipはサイズ制限が厳しいため、Firebaseの機能を必要最小限に制限することを検討してください。


66-82: リモート通知の処理が冗長かもしれません

App Clipではプッシュ通知が制限されているため、これらのデリゲートメソッドは必要ない可能性があります。

ios/CanaryAppClip/AppDelegate.m (2)

25-25: Firebase設定の順序について

[FIRApp configure]の呼び出しは、他の初期化処理の前に行うことをお勧めします。クラッシュレポートなどの重要な機能を確実に初期化するためです。

- [FIRApp configure];
+ // Firebase の初期化を最初に行う
+ [FIRApp configure];
 
  // You can add your custom initial props in the dictionary below.
  // They will be passed down to the ViewController used by React Native.
  self.initialProps = @{};

59-61: 非同期処理の改善提案

Universal Linksの処理をdispatch_asyncで行っていますが、メインスレッドでの実行が必要ない場合は、パフォーマンス向上のためdispatch_queue_createを使用することを検討してください。

ios/TrainLCD.xcodeproj/xcshareddata/xcschemes/CanaryAppClip.xcscheme (1)

54-58: Canary環境用のURLの分離を推奨

Canary環境とProduction環境で同じApp Clip URLを使用していますが、テスト目的のため、Canary環境では別のURLを使用することを推奨します。

 <EnvironmentVariable
    key = "_XCAppClipURL"
-   value = "https://trainlcd.app/clip"
+   value = "https://canary.trainlcd.app/clip"
    isEnabled = "YES">
 </EnvironmentVariable>
src/hooks/useWarningInfo.ts (1)

79-81: 条件の可読性向上について

App Clip関連の条件チェックをより明確にするため、複合条件を分割することを推奨します。

- !bgPermGranted &&
- !isAlwaysPermissionNotGrantedDismissed &&
- !!selectedBound &&
- !isClip()
+ const shouldShowPermissionWarning = !bgPermGranted && !isAlwaysPermissionNotGrantedDismissed;
+ const isFullAppContext = !!selectedBound && !isClip();
+ 
+ if (shouldShowPermissionWarning && isFullAppContext) {
package.json (1)

66-66: 依存関係のバージョン固定を推奨

react-native-app-clipのバージョンが^0.5.1と指定されていますが、App Clip機能の重要性を考慮すると、マイナーバージョンの自動更新は避けるべきです。

以下の変更を推奨します:

-    "react-native-app-clip": "^0.5.1",
+    "react-native-app-clip": "0.5.1",
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe1737f and 9f97797.

⛔ Files ignored due to path filters (2)
  • ios/Podfile.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (41)
  • android/app/src/main/assets/fonts (1 hunks)
  • app.json (1 hunks)
  • assets/translations/en.json (1 hunks)
  • assets/translations/ja.json (1 hunks)
  • ios/CanaryAppClip/AppDelegate.h (1 hunks)
  • ios/CanaryAppClip/AppDelegate.m (1 hunks)
  • ios/CanaryAppClip/Assets.xcassets/AccentColor.colorset/Contents.json (1 hunks)
  • ios/CanaryAppClip/Assets.xcassets/AppIcon.appiconset/Contents.json (1 hunks)
  • ios/CanaryAppClip/Assets.xcassets/Contents.json (1 hunks)
  • ios/CanaryAppClip/CanaryAppClip.entitlements (1 hunks)
  • ios/CanaryAppClip/Info.plist (1 hunks)
  • ios/CanaryAppClip/main.m (1 hunks)
  • ios/CanaryTrainLCD.entitlements (1 hunks)
  • ios/Fonts (1 hunks)
  • ios/Podfile (2 hunks)
  • ios/ProdAppClip/AppDelegate.h (1 hunks)
  • ios/ProdAppClip/AppDelegate.m (1 hunks)
  • ios/ProdAppClip/Assets.xcassets/AccentColor.colorset/Contents.json (1 hunks)
  • ios/ProdAppClip/Assets.xcassets/AppIcon.appiconset/Contents.json (1 hunks)
  • ios/ProdAppClip/Assets.xcassets/Contents.json (1 hunks)
  • ios/ProdAppClip/Info.plist (1 hunks)
  • ios/ProdAppClip/ProdAppClip.entitlements (1 hunks)
  • ios/ProdAppClip/main.m (1 hunks)
  • ios/ProdTrainLCD.entitlements (1 hunks)
  • ios/RideSessionActivity/CanaryRideSessionActivity.entitlements (1 hunks)
  • ios/RideSessionActivity/ProdRideSessionActivity.entitlements (1 hunks)
  • ios/TrainLCD.xcodeproj/project.pbxproj (65 hunks)
  • ios/TrainLCD.xcodeproj/xcshareddata/xcschemes/CanaryAppClip.xcscheme (1 hunks)
  • ios/TrainLCD.xcodeproj/xcshareddata/xcschemes/CanaryRideSessionActivityExtension.xcscheme (1 hunks)
  • ios/TrainLCD.xcodeproj/xcshareddata/xcschemes/ProdAppClip.xcscheme (1 hunks)
  • ios/TrainLCD.xcodeproj/xcshareddata/xcschemes/ProdRideSessionActivityExtension.xcscheme (1 hunks)
  • ios/TrainLCD/Schemes/Dev/Info.plist (1 hunks)
  • ios/TrainLCD/Schemes/Prod/Info.plist (2 hunks)
  • ios/WatchApp/ProdWatchApp.entitlements (1 hunks)
  • package.json (1 hunks)
  • proto (1 hunks)
  • src/hooks/useWarningInfo.ts (2 hunks)
  • src/screens/AppSettings/index.tsx (5 hunks)
  • src/screens/AppSettings/themes.ts (2 hunks)
  • src/screens/Main.tsx (2 hunks)
  • src/screens/NotificationSettingsScreen.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (14)
  • ios/RideSessionActivity/ProdRideSessionActivity.entitlements
  • ios/ProdAppClip/Assets.xcassets/AccentColor.colorset/Contents.json
  • ios/ProdAppClip/main.m
  • ios/ProdAppClip/AppDelegate.h
  • android/app/src/main/assets/fonts
  • ios/RideSessionActivity/CanaryRideSessionActivity.entitlements
  • ios/CanaryAppClip/Assets.xcassets/AccentColor.colorset/Contents.json
  • ios/Fonts
  • ios/CanaryAppClip/Assets.xcassets/Contents.json
  • ios/CanaryAppClip/Assets.xcassets/AppIcon.appiconset/Contents.json
  • ios/CanaryAppClip/AppDelegate.h
  • ios/ProdAppClip/Assets.xcassets/Contents.json
  • ios/CanaryAppClip/main.m
  • proto
🔇 Additional comments (31)
ios/TrainLCD.xcodeproj/project.pbxproj (10)

6-6: Xcode オブジェクトバージョンの更新を確認してください
objectVersion が 54 から 70 に更新されていますが、チーム内で使用する Xcode バージョンとの互換性を念のため確認しておくと安心です。


10-13: 新しいフレームワーク参照の追加を検証してください
Pods_TrainLCD_ProdTrainLCD_ProdAppClip.framework や Pods_TrainLCD_CanaryTrainLCD_CanaryAppClip.framework が追加されています。Podfile 側でも正しく設定されているか、ビルドエラーがないかを確認してください。

Also applies to: 19-19


104-105: App Clip を埋め込むビルド設定
ProdAppClip.app と CanaryAppClip.app を Embed する設定が追加されています。特に問題がないため承認します。


106-115: App Clip 向けリソースファイルの追加を確認してください
GoogleService-Info.plist や SplashScreen.storyboard、InfoPlist.strings、Images.xcassets がそれぞれ新しく追加されており、開発・本番・Canary などの環境で整合が取れているか再確認をお願いします。


116-133: 各種フォントファイルの参照追加について
App Clip で使用したいフォントのようですが、ライセンスや使用条件を再度ご確認ください。特に外部フォントを組み込む場合には注意が必要です。


187-193: PBXContainerItemProxy の新規追加
ProdAppClip と CanaryAppClip 向けの PBXContainerItemProxy が追加されています。App Clip の連携に必要な箇所であり、構成としては問題ありません。

Also applies to: 194-200


270-280: 「Embed App Clips」用の新規 PBXCopyFilesBuildPhase
ProdAppClip と CanaryAppClip をビルド時にコピーするフェーズが追加されました。複数ターゲットの紐づけが正しく機能しているか確認することをおすすめします。

Also applies to: 281-291


295-297: 新しい xcconfig ファイルの参照
Pods-TrainLCD-ProdTrainLCD-ProdAppClip や Pods-TrainLCD-CanaryTrainLCD-CanaryAppClip 用の xcconfig 参照が追加されています。Podfile 側と設定が整合しているかを再度チェックしてください。

Also applies to: 308-308, 313-313


370-374: エンタイトルメントとフォント定義の追加
ProdTrainLCD.entitlements や CanaryTrainLCD.entitlements のような entitlements が追加され、そのほかフォント関連のグループ設定も増えています。コードサイニングやビルド設定全体での衝突がないかを再度確認すると良いでしょう。

Also applies to: 375-379


395-416: ファイルシステム同期設定の追加
PBXFileSystemSynchronizedBuildFileExceptionSet や PBXFileSystemSynchronizedRootGroup が App Clip 用に追加されました。Xcode プロジェクト内部の整合性は問題なさそうです。

ios/WatchApp/ProdWatchApp.entitlements (1)

5-8: プッシュ通知の環境設定について

開発環境での通知設定は適切ですが、本番環境へのデプロイ前に以下の点を確認してください:

  • aps-environmentをproductionに変更する必要があります
  • 時間依存型通知の実装が完了していることを確認してください
ios/ProdAppClip/ProdAppClip.entitlements (1)

5-12: App Clip設定の確認事項

App Clipの設定は適切に行われていますが、以下の点を確認してください:

  • appclip.trainlcd.appドメインの所有権が確認済みであること
  • Universal LinksとApp Clip経験のテストが完了していること
  • 親アプリケーションIDが本番環境のものと一致していること
ios/ProdTrainLCD.entitlements (1)

5-12: メインアプリケーションの権限設定について

以下の点について本番環境デプロイ前に確認が必要です:

  1. App Clip関連:

    • App Clip識別子(me.tinykitten.trainlcd.Clip)が正しく設定されていること
    • App StoreでのApp Clip配信設定が完了していること
  2. プッシュ通知関連:

    • aps-environmentをproductionに変更すること
    • 時間依存型通知の実装とテストが完了していること
ios/CanaryTrainLCD.entitlements (1)

9-10: 開発環境のプッシュ通知設定を確認してください

本番環境へのデプロイ時には、aps-environmentの値をproductionに変更する必要があります。

ios/CanaryAppClip/Info.plist (1)

25-37: セキュリティ設定の見直しを推奨

ProdAppClipと同様に、NSAllowsArbitraryLoadsの設定を見直すことを推奨します。

src/screens/AppSettings/themes.ts (1)

11-53: 実装が適切です

App Clip環境でLEDテーマを非表示にする実装が適切に行われています。フィルタリングの実装も簡潔で分かりやすいです。

ios/Podfile (1)

70-72: App Clipターゲットの追加が適切に行われています!

ProdAppClipとCanaryAppClipの両ターゲットが、それぞれの親ターゲットから完全な設定を継承するように正しく構成されています。

Also applies to: 76-78

ios/TrainLCD/Schemes/Prod/Info.plist (2)

74-80: フォントファイルの参照が簡素化されました

'Fonts/' プレフィックスが削除され、フォントファイルの参照がよりクリーンになりました。


5-17:

Details

❓ Verification inconclusive

URLスキーム設定の検証が必要です

URLスキーム 'trainlcd' が他のアプリと競合していないことを確認してください。


🏁 Script executed:

#!/bin/bash
# Description: Check if the URL scheme is unique in the project
rg -l 'CFBundleURLSchemes.*trainlcd' --type plist

Length of output: 81


URLスキーム「trainlcd」の一意性確認のため、再検証が必要です

現状、rg -l 'CFBundleURLSchemes.*trainlcd' --type plist コマンドで「plist」型が認識されずエラーとなっています。plistファイル内のみを対象に検索するため、以下のような新しいコマンドを実行し、該当箇所が他に存在しないか確認してください:

  • コマンド例:
    rg -l 'CFBundleURLSchemes.*trainlcd' -g "*.plist"

該当コマンドを実行し、出力内容を手動で検証の上、URLスキーム「trainlcd」が他のアプリや設定と競合していないか確認してください。

ios/TrainLCD/Schemes/Dev/Info.plist (1)

74-80: フォントファイルの参照が本番環境と一貫しています

開発環境のフォントファイル参照が本番環境と同様に簡素化され、一貫性が保たれています。

ios/ProdAppClip/AppDelegate.m (2)

35-42: バンドルURLの設定が適切です

デバッグビルドとリリースビルドで適切なバンドルURLが設定されています。


49-64: Universal Linksの実装が堅牢です

  • メインキューでの処理が保証されています
  • 適切なバリデーションが実装されています
  • エラーケースが適切に処理されています
ios/TrainLCD.xcodeproj/xcshareddata/xcschemes/ProdAppClip.xcscheme (1)

54-58:

Details

❓ Verification inconclusive

App Clip URLの検証が必要

_XCAppClipURLに設定されているURLが本番環境で正しく設定されているか確認してください。また、このURLがApp Clip用のAssociated Domainsエンタイトルメントと一致していることを確認する必要があります。


🏁 Script executed:

#!/bin/bash
# App Clip用のAssociated Domainsエンタイトルメントを確認
find . -name "*.entitlements" -exec grep -l "appclips:" {} \;

Length of output: 154


App Clip URLの確認が必要です

  • _XCAppClipURLに設定されている「https://trainlcd.app/clip」が、本番用App Clipのエンタイトルメント設定(例: ios/ProdAppClip/ProdAppClip.entitlements)と整合しているか、特にドメイン部分(trainlcd.app)が正しく反映されているか確認してください。
  • また、Canary用エンタイトルメント(ios/CanaryAppClip/CanaryAppClip.entitlements)との違いがないか、または意図した設定になっているかも合わせてチェックをお願いします。
ios/TrainLCD.xcodeproj/xcshareddata/xcschemes/ProdRideSessionActivityExtension.xcscheme (1)

1-114: スキーム設定が適切に構成されています!

アプリ拡張機能用のスキームが正しく設定されており、ビルド、テスト、起動、プロファイル、解析、アーカイブの各アクションが適切に構成されています。

ios/TrainLCD.xcodeproj/xcshareddata/xcschemes/CanaryRideSessionActivityExtension.xcscheme (1)

1-114: Canary環境用のスキーム設定が適切です!

本番環境のスキームと同様の構成で、Canary環境用の識別子が正しく設定されています。

src/screens/NotificationSettingsScreen.tsx (1)

14-14: App Clip環境での権限要求の制御が適切に実装されています!

App Clip環境では常時位置情報の許可アラートを表示しないように制御されており、App Clipのガイドラインに準拠した実装となっています。

Also applies to: 164-167

src/screens/AppSettings/index.tsx (1)

5-5: App Clip環境でのバックグラウンドオーディオ機能の制御が適切に実装されています!

以下の実装が適切に行われています:

  • App Clip環境でのバックグラウンドオーディオ設定の無効化
  • 視覚的フィードバック(透明度の調整)
  • App Clip環境用の専用通知メッセージ表示

これらの変更により、App Clipの制限に準拠しつつ、ユーザーに適切なフィードバックを提供できています。

Also applies to: 53-55, 105-107, 186-186, 212-221

src/screens/Main.tsx (1)

14-14: 実装の改善を確認しました!

App Clip環境での不要な権限要求を防ぐため、isClip()チェックを追加したのは適切な対応です。これにより、App Clipでのユーザー体験が向上します。

Also applies to: 248-248

app.json (1)

18-28:

Details

❓ Verification inconclusive

バンドルIDの検証が必要です

App Clip用の設定が追加されていますが、以下の点を確認してください:

  1. バンドルID me.tinykitten.trainlcd がApp Store Connectで登録済みであること
  2. App Clip用のバンドルIDが親アプリのバンドルIDと一致していること

🏁 Script executed:

#!/bin/bash
# App Clip関連ファイルでバンドルIDの一貫性を確認
find . -type f -name "*.plist" -o -name "*.pbxproj" -o -name "*.entitlements" | xargs grep -l "me.tinykitten.trainlcd"

Length of output: 625


バンドルIDの整合性および登録状態の確認をお願いします

アプリクリップ用の設定追加に伴い、次の点についてご確認ください:

  • App Store Connectへの登録
    バンドルID "me.tinykitten.trainlcd" が App Store Connect 上で正しく登録済みであるかを確認してください。

  • 親アプリとの整合性
    App Clip 用の設定ファイル(例:ios/ProdAppClip/ProdAppClip.entitlements、ios/CanaryAppClip/CanaryAppClip.entitlements 等)において、バンドルIDが親アプリのバンドルID "me.tinykitten.trainlcd" と一致しているか再確認してください。

grep コマンドの実行結果から、該当するファイルが多数存在していることが確認されています。ファイルごとに設定内容が意図した通りになっているか、またエラー等が発生していないかを個別に手動でご検証いただくことを推奨します。

assets/translations/ja.json (1)

118-118: 新しい翻訳エントリの追加確認
追加された "bgTtsAppClipAlertText": "バックグラウンド音声機能をご利用になるには完全版をダウンロードしてください。" は、App Clip 導入に伴い背景音声機能利用時にフルバージョンのダウンロードを促す目的として適切です。JSON のフォーマットも問題なく、他の翻訳キーとの整合性も保たれています。

assets/translations/en.json (1)

117-117: 新しい翻訳エントリの追加確認
追加された "bgTtsAppClipAlertText": "To use the background audio feature, please download the full version." は、バックグラウンド音声機能利用時にフルバージョンのダウンロードを促すメッセージとして明確で適切です。JSON のフォーマットも正常ですので、この変更は問題ありません。

Comment thread ios/ProdAppClip/Info.plist Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f97797 and 9618f17.

📒 Files selected for processing (4)
  • ios/CanaryAppClip/Info.plist (1 hunks)
  • ios/ProdAppClip/Info.plist (1 hunks)
  • ios/TrainLCD.xcodeproj/project.pbxproj (65 hunks)
  • ios/TrainLCD/Schemes/Prod/Info.plist (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • ios/CanaryAppClip/Info.plist
  • ios/ProdAppClip/Info.plist
🔇 Additional comments (5)
ios/TrainLCD/Schemes/Prod/Info.plist (1)

5-17: URL スキーム設定が適切に構成されています!

App Clips 機能の導入に必要な URL スキーム設定が正しく実装されています。

ios/TrainLCD.xcodeproj/project.pbxproj (4)

375-379: フォントリソースの追加を確認

以下のフォントファイルが追加されています:

  • FrutigerNeueLTPro-Bold.ttf
  • JF-Dot-jiskan24h.ttf
  • myriadpro-bold.ttf
  • verdana-bold.ttf

これらのフォントの商用ライセンスが適切に取得されていることを確認してください。


2189-2189: バージョン番号の更新を確認

マーケティングバージョンが8.6.0に更新されています。これはPRのタイトルと一致しています。

Also applies to: 2227-2227, 2441-2441, 2479-2479


3062-3067: App Clipの画面方向設定を確認

App Clipの画面方向が横向き(Landscape)のみに制限されています。これは意図的な設定でしょうか?

メインアプリの画面方向設定と整合性があるか確認してください。

Also applies to: 3162-3167


3048-3049:

Details

✅ Verification successful

App Clipのエンタイトルメント設定を確認

新しいエンタイトルメントファイルが追加されています:

  • ProdAppClip.entitlements
  • CanaryAppClip.entitlements

App Clip用の適切な権限が設定されていることを確認してください。

Also applies to: 3148-3149


🏁 Script executed:

#!/bin/bash
# App Clipのエンタイトルメント設定を確認
find . -name "*.entitlements" -exec cat {} \;

Length of output: 2920


App Clipのエンタイトルメント設定は適切に反映されています

  • ProdAppClip.entitlements

    • "com.apple.developer.associated-appclip-app-identifiers" が $(AppIdentifierPrefix)me.tinykitten.trainlcd.Clip として設定されています。
    • "aps-environment" は Apple Development 用の development に設定され、 "com.apple.developer.usernotifications.time-sensitive" も正しく有効です。
  • CanaryAppClip.entitlements

    • "com.apple.developer.associated-appclip-app-identifiers" が $(AppIdentifierPrefix)me.tinykitten.trainlcd.dev.Clip として設定されています。
    • 同様に、 "aps-environment" や通知関連のキーが正しく反映されています。
  • さらに、App Clip に関連する "com.apple.developer.associated-domains" と "com.apple.developer.parent-application-identifiers" の設定も確認でき、
    ios/TrainLCD.xcodeproj/project.pbxproj 内での参照(3048-3049行および 3148-3149行)も問題ありません。

最終的には、各 App Clip ターゲットでのビルドおよび実機テストで動作確認をお願いします。

Comment thread ios/TrainLCD/Schemes/Prod/Info.plist Resolved
Comment thread ios/TrainLCD.xcodeproj/project.pbxproj Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
ios/fastlane/Fastfile (1)

36-36: 配列の最後の要素にカンマを追加することを推奨します

Rubyの配列では、将来の要素追加を容易にし、git diffをクリーンに保つため、複数行の配列の最後の要素にもカンマを付けることが推奨されています。

以下の修正を提案します:

        "me.tinykitten.trainlcd.ridesessionactivity",
-        "me.tinykitten.trainlcd.Clip"
+        "me.tinykitten.trainlcd.Clip",

        "me.tinykitten.trainlcd.dev.ridesessionactivity",
-        "me.tinykitten.trainlcd.dev.Clip"
+        "me.tinykitten.trainlcd.dev.Clip",

Also applies to: 55-55

🧰 Tools
🪛 RuboCop (1.69.1)

[convention] 36-36: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)

ios/TrainLCD.xcodeproj/project.pbxproj (1)

3032-3032: ユーザースクリプトサンドボックスが無効化されています

App ClipターゲットでENABLE_USER_SCRIPT_SANDBOXING = NOが設定されています。セキュリティ上の理由から、可能であれば有効化を検討してください。

Also applies to: 3133-3133, 3186-3186

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9618f17 and 20eba6c.

📒 Files selected for processing (3)
  • ios/TrainLCD.xcodeproj/project.pbxproj (65 hunks)
  • ios/fastlane/Fastfile (2 hunks)
  • ios/fastlane/Matchfile (1 hunks)
🧰 Additional context used
🪛 RuboCop (1.69.1)
ios/fastlane/Fastfile

[convention] 36-36: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)


[convention] 55-55: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)

🔇 Additional comments (7)
ios/fastlane/Matchfile (1)

12-12: App Clip用の識別子が適切に追加されています!

本番環境とdev環境の両方に対して、App Clip用の識別子が正しく追加されており、命名規則も適切に守られています。

Also applies to: 17-17

ios/fastlane/Fastfile (1)

35-36: App Clip用の識別子が正しく設定されています!

デプロイレーンにApp Clip用の識別子が適切に追加されており、Matchfileの設定と一致しています。

🧰 Tools
🪛 RuboCop (1.69.1)

[convention] 36-36: Put a comma after the last item of a multiline array.

(Style/TrailingCommaInArrayLiteral)

ios/TrainLCD.xcodeproj/project.pbxproj (5)

1042-1047: App Clipターゲットのデプロイメントターゲットバージョンの見直しが必要です


375-379: フォントリソースの追加を確認しました

以下のフォントが追加されました:

  • FrutigerNeueLTPro-Bold.ttf
  • JF-Dot-jiskan24h.ttf
  • myriadpro-bold.ttf
  • verdana-bold.ttf
  • FuturaLTPro-Bold.ttf

2167-2167: バージョン番号が8.6.0に更新されました

全ターゲットのマーケティングバージョンが8.6.0に更新されていることを確認しました。

Also applies to: 2205-2205, 2419-2419, 2457-2457, 2496-2496, 2536-2536, 2581-2581, 2627-2627, 2673-2673, 2771-2771, 2867-2867, 2913-2913, 2953-2953, 2995-2995, 3052-3052, 3102-3102, 3152-3152, 3202-3202


3144-3146: App Clipの画面方向設定を確認してください

App Clipターゲットの画面方向が横向き(Landscape)のみに制限されています。これは意図した設定でしょうか?


270-291: App Clipの埋め込み設定を確認しました

App Clipの埋め込み設定が適切に構成されていることを確認しました:

  • 正しい出力パス
  • 適切なビルドマスク
  • 正しいサブフォルダ指定

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20eba6c and 7b2f992.

📒 Files selected for processing (1)
  • ios/TrainLCD.xcodeproj/project.pbxproj (65 hunks)
🔇 Additional comments (3)
ios/TrainLCD.xcodeproj/project.pbxproj (3)

375-379: フォントリソースの追加について

以下のフォントファイルが追加されています:

  • FrutigerNeueLTPro-Bold.ttf
  • JF-Dot-jiskan24h.ttf
  • myriadpro-bold.ttf
  • verdana-bold.ttf
  • FuturaLTPro-Bold.ttf

これらのフォントの商用ライセンスが適切に取得されていることを確認してください。


3040-3045: App Clipの画面方向制限について

App Clipの画面方向が横向き(Landscape)のみに制限されています。これは意図的な設定でしょうか?
ユーザビリティの観点から、縦向き(Portrait)もサポートすることを検討してください。


6-6: Xcodeプロジェクトバージョンの更新について

objectVersionが70に更新されています。これはXcode 15以降のプロジェクトフォーマットを示しています。
チームメンバー全員が対応バージョンのXcodeを使用していることを確認してください。

Comment thread ios/TrainLCD.xcodeproj/project.pbxproj Resolved
@github-actions github-actions Bot removed the android label Feb 19, 2025
@TinyKitten
TinyKitten merged commit d86c6b0 into dev Feb 19, 2025
@TinyKitten
TinyKitten deleted the feature/appclip branch February 19, 2025 12:17
@coderabbitai coderabbitai Bot mentioned this pull request Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant