From 8fcc5622e1aff550023dd4059ce4254ffda3f019 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Thu, 15 Dec 2022 13:54:21 -0600 Subject: [PATCH] =?UTF-8?q?Fixes=20=E2=80=9Cmissing=20provisioning=20profi?= =?UTF-8?q?le=E2=80=9D=20error=20when=20refreshing=20DEBUG=20builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes embedded XCTest (+ dSYM) bundles before resigning for DEBUG builds. --- AltStore/Operations/ResignAppOperation.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AltStore/Operations/ResignAppOperation.swift b/AltStore/Operations/ResignAppOperation.swift index f12c4a3c..d697533d 100644 --- a/AltStore/Operations/ResignAppOperation.swift +++ b/AltStore/Operations/ResignAppOperation.swift @@ -241,6 +241,14 @@ private extension ResignAppOperation { for case let fileURL as URL in enumerator { + #if DEBUG + guard !fileURL.lastPathComponent.lowercased().contains(".xctest") else { + // Remove embedded XCTest (+ dSYM) bundle from copied app bundle. + try FileManager.default.removeItem(at: fileURL) + continue + } + #endif + guard let appExtension = Bundle(url: fileURL) else { throw ALTError(.missingAppBundle) } try prepare(appExtension) }