From 1165171ca10ee53537238a7e83dbd5b9f10422fd Mon Sep 17 00:00:00 2001 From: aalej Date: Tue, 25 Nov 2025 00:05:53 +0800 Subject: [PATCH 1/2] fix issue where crashlytics isn't detected for ios apps that use project.pbxproj --- CHANGELOG.md | 1 + src/mcp/util/crashlytics/availability.spec.ts | 17 +++++++++++++++++ src/mcp/util/crashlytics/availability.ts | 7 +++++++ 3 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb2d..4ee4241fa45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- Fixed issue where MCP server didn't detect if iOS app uses Crashlytics in projects that use `project.pbxproj` diff --git a/src/mcp/util/crashlytics/availability.spec.ts b/src/mcp/util/crashlytics/availability.spec.ts index 3f1cd5c277a..3c96a534705 100644 --- a/src/mcp/util/crashlytics/availability.spec.ts +++ b/src/mcp/util/crashlytics/availability.spec.ts @@ -236,6 +236,23 @@ describe("isCrashlyticsAvailable", () => { expect(result).to.be.false; }); + it("should return true for an iOS project with Crashlytics in project.pbxproj", async () => { + mockfs({ + "/test-dir": { + ios: { + "Project.xcodeproj": { + "project.pbxproj": + "/* Begin PBXBuildFile section */ /* FirebaseCore in Frameworks */ = {isa = PBXBuildFile; /* FirebaseCore */; }; /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; /* FirebaseCrashlytics */; }; /* End PBXBuildFile section */", + }, + }, + }, + }); + + const result = await isCrashlyticsAvailable(mockContext("/test-dir")); + + expect(result).to.be.true; + }); + it("should return true for a Flutter project with Crashlytics in pubspec.yaml", async () => { mockfs({ "/test-dir": { diff --git a/src/mcp/util/crashlytics/availability.ts b/src/mcp/util/crashlytics/availability.ts index 8a68741b23a..780339c7907 100644 --- a/src/mcp/util/crashlytics/availability.ts +++ b/src/mcp/util/crashlytics/availability.ts @@ -80,6 +80,13 @@ async function iosAppUsesCrashlytics(appPath: string): Promise { return true; } } + const xcodeProjectFiles = await detectFiles(appPath, "project.pbxproj"); + for (const file of xcodeProjectFiles) { + const content = await fs.readFile(path.join(appPath, file), "utf8"); + if (content.includes("Crashlytics")) { + return true; + } + } return false; } From e715e2938f380f09aff574b22bed735ab13565ea Mon Sep 17 00:00:00 2001 From: aalej Date: Tue, 25 Nov 2025 00:15:43 +0800 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ee4241fa45..c80e975be87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -- Fixed issue where MCP server didn't detect if iOS app uses Crashlytics in projects that use `project.pbxproj` +- Fixed issue where MCP server didn't detect if iOS app uses Crashlytics in projects that use `project.pbxproj` (#9515)