diff --git a/AltStore/Operations/ResignAppOperation.swift b/AltStore/Operations/ResignAppOperation.swift index a6098e00..12760205 100644 --- a/AltStore/Operations/ResignAppOperation.swift +++ b/AltStore/Operations/ResignAppOperation.swift @@ -148,6 +148,14 @@ private extension ResignAppOperation infoDictionary[Bundle.Info.exportedUTIs] = exportedUTIs try (infoDictionary as NSDictionary).write(to: bundle.infoPlistURL) + + // Remove _CodeSignature folder (if it exists) because it will be added when resigning and it may have files that aren't overwritten when resigning + // These files might be the cause of some ApplicationVerificationFailed errors + let codeSignaturePath = bundle.bundleURL.appendingPathComponent("_CodeSignature").absoluteString + if FileManager.default.fileExists(atPath: codeSignaturePath) { + try FileManager.default.removeItem(atPath: codeSignaturePath) + print("Removed _CodeSignature folder at \(codeSignaturePath)") + } } DispatchQueue.global().async {