0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

強制アップデートでGuideline 2.1 - Performance - App Completenessでリジェクトされた話

0
Last updated at Posted at 2025-11-12

私のアプリでは、アップデートを配信するとアップデートをしていないユーザーはアップデートをしないと利用できないようにしているものがあります。
この結果、App Storeに審査を出した時にレビュワーがアプリを利用できず、Guideline 2.1でリジェクトされてしまいました。
この記事では、その解決策を共有します。

スクリーンショット 2025-11-12 12.57.15.png

リジェクト文.txt
Guideline 2.1 - Performance - App Completeness

Issue Description

The app exhibited one or more bugs that would negatively impact users.

Bug description: Specifically, we are unable to access content without updating the app.

Review device details:

- Device type: iPad Air (5th generation) 
- OS version: iPadOS 26.1

Next Steps

Test the app on supported devices to identify and resolve bugs and stability issues before submitting for review.

If the bug cannot be reproduced, try the following:

- For new apps, uninstall all previous versions of the app from a device, then install and follow the steps to reproduce.
- For app updates, install the new version as an update to the previous version, then follow the steps to reproduce.

---------------------(以下 和訳)----------------------
ガイドライン 2.1 - パフォーマンス - アプリの完全性

問題の説明

このアプリには、ユーザーに悪影響を及ぼす可能性のある1つ以上のバグが見られました。

バグの内容:
具体的には、アプリをアップデートしないとコンテンツにアクセスできませんでした。

レビュー端末の詳細:
- デバイスタイプ:iPad Air(第5世代)
- OSバージョン:iPadOS 26.1

次のステップ

審査に再提出する前に、サポートされているデバイス上でアプリをテストし、バグや安定性の問題を特定・修正してください。

バグを再現できない場合は、次の手順を試してください:

- 新規アプリの場合:デバイスから以前のバージョンのアプリをすべてアンインストールし、新しいバージョンをインストールして再現手順を確認する。
- アプリアップデートの場合:旧バージョンの上に新バージョンをインストール(更新)し、再現手順を確認する。

解決策 - バージョンを"."で区切ってInt配列に変換しよう!

バージョン(例えば1.1.1)を、"."で区切って、それぞれの桁で比較を行います。
それで、現在のバージョンがApp Storeのバージョンを超えていれば、アラートは表示されないようにしました。

◆アップデートが配信された場合
アプリのバージョン : 1.1.0
App Storeの最新バージョン : 1.1.1
-> アラートを出す(要アップデート)

アプリのバージョン : 1.1.2
App Storeの最新バージョン : 1.1.1
-> アラートを出さない(アプリのバージョンが先行しているため)

コード全体

checkForUpdate.swift
func checkForUpdate() async -> Bool {
        let urlString = "https://itunes.apple.com/lookup?bundleId=\(Bundle.main.bundleIdentifier ?? "")&timestamp=\(Date().timeIntervalSince1970)"

        let currentVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0"

        print("現在のバージョン: \(currentVersion)")
        guard let url = URL(string: urlString) else {
            print("URL生成エラー")
            return false
        }

        do {
            print(url)
            let (data, _) = try await URLSession.shared.data(from: url)
            let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]
            print(json != nil ? "Get Json Seccessed" : "Get Json Failed")
            if let results = json?["results"] as? [[String: Any]],
               let appStoreVersion = results.first?["version"] as? String {
                print("App Storeのバージョン: \(appStoreVersion)")

                let currentVersionParts = currentVersion.split(separator: ".").compactMap { Int($0) }
                let appStoreVersionParts = appStoreVersion.split(separator: ".").compactMap { Int($0) }

                var needsUpdate = false
                for i in 0..<3 {
                    let current = i < currentVersionParts.count ? currentVersionParts[i] : 0
                    let appStore = i < appStoreVersionParts.count ? appStoreVersionParts[i] : 0

                    if current < appStore {
                        needsUpdate = true
                        break
                    }
                }
                print("アップデート必要: \(needsUpdate)")

                return needsUpdate
            } else {
                print("App Storeのバージョン情報を取得できませんでした")
            }
        } catch {
            print(error)
        }

        return false
    }
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?