From 2c93c2ac700984cce7f3e597fec8bad4d6f171d2 Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:30:13 +0000 Subject: [PATCH 01/12] Add explicit increased-memory capability opt-in to prepared IPA metadata, default off --- .../PackageManager/Core/SigningAdvanced.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/LiveContainerSwiftUI/PackageManager/Core/SigningAdvanced.swift b/LiveContainerSwiftUI/PackageManager/Core/SigningAdvanced.swift index 1f9309524..95627617b 100644 --- a/LiveContainerSwiftUI/PackageManager/Core/SigningAdvanced.swift +++ b/LiveContainerSwiftUI/PackageManager/Core/SigningAdvanced.swift @@ -1,6 +1,10 @@ import Foundation enum SigningAdvanced { + /// Explicit host Advanced Install request, never a claim that Apple granted + /// the entitlement. The source-built SideStore validates the signed profile. + static let increasedMemoryRequestKey = "LCOSIncreasedMemoryLimitRequested" + struct App { let url: URL let name: String @@ -23,6 +27,9 @@ enum SigningAdvanced { struct Options: Sendable { var enableFileSharing: Bool var removeAppExtensions: Bool = false + /// The Apple App ID capability and signing entitlement are handled + /// later by SideStore, not by this metadata-only IPA editor. + var enableIncreasedMemoryLimit: Bool = false /// Individual .appex names to omit from the staged IPA before signing. var excludedExtensionNames: Set = [] } @@ -120,6 +127,13 @@ enum SigningAdvanced { if bundle == app.url { plist["CFBundleDisplayName"] = name; plist["CFBundleName"] = name plist["UIFileSharingEnabled"] = options.enableFileSharing + // Only a user-selected Advanced Install may write this opt-in. + // A disabled selection clears stale requests from an imported IPA. + if options.enableIncreasedMemoryLimit { + plist[increasedMemoryRequestKey] = true + } else { + plist.removeValue(forKey: increasedMemoryRequestKey) + } if options.enableFileSharing { // Also expose Documents in the Files app; this alone cannot // grant access to a sandbox outside the app's Documents folder. From b2fa364c905b79c3c581a4a07c67989b48dea76e Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:30:54 +0000 Subject: [PATCH 02/12] Expose opt-in Increased Memory Limit switch with real signing requirements in Advanced Install --- .../LCAdvancedInstallView.swift | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/LiveContainerSwiftUI/PackageManager/LCAdvancedInstallView.swift b/LiveContainerSwiftUI/PackageManager/LCAdvancedInstallView.swift index e3b4abc9a..3bee1a5ff 100644 --- a/LiveContainerSwiftUI/PackageManager/LCAdvancedInstallView.swift +++ b/LiveContainerSwiftUI/PackageManager/LCAdvancedInstallView.swift @@ -16,6 +16,7 @@ struct LCAdvancedInstallView: View { @State private var identifier = "" @State private var ipaFilename = "" @State private var enableFileSharing = false + @State private var enableIncreasedMemoryLimit = false @State private var excludedExtensions: Set = [] @State private var managingExtensions = false @State private var icon: Data? @@ -154,6 +155,17 @@ struct LCAdvancedInstallView: View { Toggle(isOn: $enableFileSharing) { Label("lcos.install.fileSharing".installLoc, systemImage: "folder") } + Toggle(isOn: $enableIncreasedMemoryLimit) { + Label("lcos.install.increasedMemory".installLoc, systemImage: "memorychip") + } + .accessibilityHint("lcos.install.increasedMemoryHelp".installLoc) + if enableIncreasedMemoryLimit { + Label("lcos.install.increasedMemoryWarning".installLoc, + systemImage: "exclamationmark.triangle") + .font(.footnote) + .foregroundStyle(.secondary) + .fixedSize(horizontal: false, vertical: true) + } if app.extensionCount > 0 { Button { managingExtensions = true } label: { HStack(spacing: 12) { @@ -177,7 +189,8 @@ struct LCAdvancedInstallView: View { } header: { Text("lcos.install.options".installLoc) } footer: { - Text("lcos.install.fileSharingHelp".installLoc) + Text("lcos.install.fileSharingHelp".installLoc + "\n" + + "lcos.install.increasedMemoryHelp".installLoc) } .disabled(working) } @@ -357,7 +370,9 @@ struct LCAdvancedInstallView: View { if let workspace { try? FileManager.default.removeItem(at: workspace) } workspace = directory; app = inspected; name = inspected.name; identifier = inspected.identifier ipaFilename = source.lastPathComponent; icon = nil - enableFileSharing = inspected.fileSharingEnabled; excludedExtensions.removeAll() + enableFileSharing = inspected.fileSharingEnabled + enableIncreasedMemoryLimit = false + excludedExtensions.removeAll() SigningDiagnostics.record("advanced.extract.end", inspected.identifier) } catch { try? FileManager.default.removeItem(at: directory); throw error } } catch { SigningDiagnostics.failure("advanced.extract.failed", error); failure = error.localizedDescription } @@ -370,6 +385,7 @@ struct LCAdvancedInstallView: View { let icon = icon let options = SigningAdvanced.Options(enableFileSharing: enableFileSharing, removeAppExtensions: false, + enableIncreasedMemoryLimit: enableIncreasedMemoryLimit, excludedExtensionNames: excludedExtensions) do { guard let group = LCSharedUtils.appGroupPath() else { throw SigningInjectionFailure.invalid("Shared app group unavailable") } From 564547d6fb143cb76283b47fcc75169e0e58f402 Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:31:15 +0000 Subject: [PATCH 03/12] Localize Increased Memory Limit control and Apple provisioning requirements in Russian and English --- Resources/Localizable.xcstrings | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Resources/Localizable.xcstrings b/Resources/Localizable.xcstrings index 66cdc99be..23a0dfef5 100644 --- a/Resources/Localizable.xcstrings +++ b/Resources/Localizable.xcstrings @@ -1,6 +1,9 @@ { "sourceLanguage" : "en", "strings" : { + "lcos.install.increasedMemory" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Increased Memory Limit"}},"ru":{"stringUnit":{"state":"translated","value":"Увеличенный лимит памяти"}}}}, + "lcos.install.increasedMemoryHelp" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Requests the Increased Memory Limit capability for this app's Apple App ID. SideStore must obtain a provisioning profile with the entitlement and reinstall the app. Available memory depends on the device; no RAM is physically added."}},"ru":{"stringUnit":{"state":"translated","value":"Запрашивает у Apple возможность Increased Memory Limit для App ID приложения. SideStore должен получить профиль с этим разрешением и переустановить приложение. Доступная память зависит от устройства; физическая ОЗУ не увеличивается."}}}}, + "lcos.install.increasedMemoryWarning" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Requires signing into SideStore with an Apple ID and access to Apple Developer Services. If Apple refuses the capability or the profile lacks the entitlement, the installation will stop instead of claiming success."}},"ru":{"stringUnit":{"state":"translated","value":"Необходим вход в SideStore с Apple ID и доступ к Apple Developer Services. Если Apple отклонит запрос или в профиле не окажется разрешения, установка будет остановлена."}}}}, "lcos.home.scrollIndicator" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Show scroll indicator"}},"ru":{"stringUnit":{"state":"translated","value":"Показывать индикатор прокрутки"}}}}, "lcos.home.nativeScrollEdge" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"System scroll blur"}},"ru":{"stringUnit":{"state":"translated","value":"Системное размытие при прокрутке"}}}}, "lcos.home.nativeScrollEdgeDescription" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Uses iOS's native scroll-edge rendering where supported. No artificial material overlays. The app grid scrolls continuously without pages."}},"ru":{"stringUnit":{"state":"translated","value":"Используется системный эффект iOS, если поддерживается. Без искусственных полупрозрачных полос. Сетка приложений прокручивается непрерывно без страниц."}}}}, From df62cc92197f82a2d67a81902eff630d4ab4020f Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:32:02 +0000 Subject: [PATCH 04/12] Pin Apple Developer Services memory-capability patch and retain entitlement only with a granted profile --- scripts/prepare_sidestore_source.py | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/scripts/prepare_sidestore_source.py b/scripts/prepare_sidestore_source.py index 111f41ed7..947849a54 100644 --- a/scripts/prepare_sidestore_source.py +++ b/scripts/prepare_sidestore_source.py @@ -5,6 +5,46 @@ expected=(root/'Integrations/SideStore/SOURCE_COMMIT').read_text().strip() actual=subprocess.check_output(['git','-C',str(source),'rev-parse','HEAD'],text=True).strip() assert actual==expected, 'SideStore source revision changed; review signing integration before rebuilding' + +# SideSign's pinned version accepts the entitlement for free teams but does not +# register the Apple App ID capability. Apply the reviewed, exactly pinned +# SideSign PR #4 patch (legacy App ID update + Developer Services v1 PATCH). +# It is cherry-picked without a commit over SideStore's existing 2FA fix; do +# not silently switch to an unreviewed nightly dependency revision. +sidesign=source/'Dependencies/SideSign' +sidesign_base='752d1ef602aa792a432ffa1e71646dc1ecf7363c' +sidesign_memory_patch='9d89dac1d391c934e5c69be1fadbb090d9a7f944' +assert subprocess.check_output(['git','-C',str(sidesign),'rev-parse','HEAD'],text=True).strip()==sidesign_base, 'SideSign submodule changed' +subprocess.run(['git','-C',str(sidesign),'fetch','--no-tags','origin','refs/pull/4/head'],check=True) +assert subprocess.check_output(['git','-C',str(sidesign),'rev-parse','FETCH_HEAD'],text=True).strip()==sidesign_memory_patch, 'SideSign memory capability patch changed' +subprocess.run(['git','-C',str(sidesign),'cherry-pick','--no-commit',sidesign_memory_patch],check=True) +expected_patch_files={'Sources/DeveloperPortal/AppIDs.swift','Sources/DeveloperPortal/DeveloperPortalAPI.swift', + 'Sources/Models/Feature.swift','Tests/SideSignTests/CapabilityTests.swift'} +applied_patch_files=set(subprocess.check_output( + ['git','-C',str(sidesign),'diff','--cached','--name-only'],text=True).splitlines()) +assert applied_patch_files==expected_patch_files, 'Unexpected modified files in SideSign memory capability patch' + +# SideSign normally retains only entitlements already declared by the source +# executable. A host user opt-in can request the capability for an IPA whose +# existing binary does not declare it, but only if Apple's PROFILE actually +# grants it. This narrowly scoped filter rule does not affect other bundles. +signer=sidesign/'Sources/CodeSigning/CodeSignerAPI.swift' +signed=signer.read_text(encoding='utf-8') +needle=''' let applicationEntitlements = app.entitlements + + for (key, _) in filteredEntitlements {''' +assert signed.count(needle)==1 +signed=signed.replace(needle,''' let applicationEntitlements = app.entitlements + let requestedMemory = !app.isExtension && + (app.infoPlist["LCOSIncreasedMemoryLimitRequested"] as? Bool == true) + let memoryEntitlement = "com.apple.developer.kernel.increased-memory-limit" + if requestedMemory && (matchedProfile.entitlements[memoryEntitlement] as? Bool != true) { + throw SignerError.invalidApp(cause: "Apple provisioning profile does not grant Increased Memory Limit") + } + + for (key, _) in filteredEntitlements { + if key == memoryEntitlement && requestedMemory { continue }''') +signer.write_text(signed,encoding='utf-8') operation=source/'SideStore/Core/Operations/PipelineOperations/ResignAppOperation.swift' s=operation.read_text(encoding='utf-8') anchor=' let appBundleURL = try await self.prepareAppBundle(for: appBundle, profiles: profiles, appexBundleIds: context.appexBundleIds ?? [:])' From 7f7db6b4795fc8cb0ac9fe114679748f2c027cb5 Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:32:36 +0000 Subject: [PATCH 05/12] Request Apple Increased Memory capability before provisioning and reject profiles that lack the entitlement --- scripts/prepare_sidestore_source.py | 57 +++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/scripts/prepare_sidestore_source.py b/scripts/prepare_sidestore_source.py index 947849a54..a53645c4d 100644 --- a/scripts/prepare_sidestore_source.py +++ b/scripts/prepare_sidestore_source.py @@ -45,6 +45,63 @@ for (key, _) in filteredEntitlements { if key == memoryEntitlement && requestedMemory { continue }''') signer.write_text(signed,encoding='utf-8') +# Only Advanced Install opts in. The SideStore pipeline is the only component +# that can update the registered Apple App ID and obtain the provisioning +# profile; the host IPA editor must never claim to grant the entitlement. +profiles_operation=source/'SideStore/Core/Operations/PipelineOperations/FetchProvisioningProfilesOperation.swift' +profile_source=profiles_operation.read_text(encoding='utf-8') +anchor=''' let effectiveBundleId = self.context.targetBundleIdentifier + + let appExtensions = targetAppBundle.appExtensions''' +assert profile_source.count(anchor)==1 +profile_source=profile_source.replace(anchor,''' let effectiveBundleId = self.context.targetBundleIdentifier + let memoryRequested = targetAppBundle.infoPlist["LCOSIncreasedMemoryLimitRequested"] as? Bool == true + + let appExtensions = targetAppBundle.appExtensions''') +anchor=''' if let overrideProfile = self.context.overrideProvisioningProfile { + self.debugLog''' +assert profile_source.count(anchor)==1 +profile_source=profile_source.replace(anchor,''' if let overrideProfile = self.context.overrideProvisioningProfile { + if memoryRequested && (overrideProfile.entitlements[ALTEntitlement.increasedMemoryLimit.rawValue] as? Bool != true) { + throw OperationError.invalidParameters("Selected provisioning profile does not grant Increased Memory Limit") + } + self.debugLog''') +anchor=''' let profile = try await DeveloperPortalProxy.shared.downloadProvisioningProfile(for: groupAppID, deviceType: DeveloperPortalProxy.currentDeviceType, team: team) + self.debugLog''' +assert profile_source.count(anchor)==1 +profile_source=profile_source.replace(anchor,''' let profile = try await DeveloperPortalProxy.shared.downloadProvisioningProfile(for: groupAppID, deviceType: DeveloperPortalProxy.currentDeviceType, team: team) + // A successful Apple API request is not proof of an approved + // entitlement; verify the actual issued provisioning profile. Never + // silently install a normal-memory app when the user opted in. + if parentAppBundle == nil && + targetAppBundle.infoPlist["LCOSIncreasedMemoryLimitRequested"] as? Bool == true && + (profile.entitlements[ALTEntitlement.increasedMemoryLimit.rawValue] as? Bool != true) { + SigningDiagnostics.record("memory.profile.missing", groupAppID.bundleIdentifier, level: "error") + throw OperationError.invalidParameters("Apple did not grant Increased Memory Limit to the provisioning profile") + } + self.debugLog''') +anchor=''' // check if we really need to make a update on portal + let currentFeatures = appID.features''' +assert profile_source.count(anchor)==1 +profile_source=profile_source.replace(anchor,''' let memoryRequested = targetAppBundle.bundleIdentifier == self.context.targetAppBundle?.bundleIdentifier && + (targetAppBundle.infoPlist["LCOSIncreasedMemoryLimitRequested"] as? Bool == true) + if memoryRequested { + guard allowedFeatures.contains(.increasedMemoryLimit) else { + throw OperationError.invalidParameters("Increased Memory Limit is not available for this signing team") + } + targetFeatures[.increasedMemoryLimit] = "true" + SigningDiagnostics.record("memory.capability.requested", appID.bundleIdentifier) + } + + // check if we really need to make a update on portal + let currentFeatures = appID.features''') +anchor=''' let needsUpdate = targetFeatures.contains { feature, targetValue in''' +assert profile_source.count(anchor)==1 +profile_source=profile_source.replace(anchor,''' // The older App ID listing may not reflect the v1 memory capability. + // Repeat this idempotent request on explicit Advanced Install opt-in. + let needsUpdate = memoryRequested || targetFeatures.contains { feature, targetValue in''') +profiles_operation.write_text(profile_source,encoding='utf-8') + operation=source/'SideStore/Core/Operations/PipelineOperations/ResignAppOperation.swift' s=operation.read_text(encoding='utf-8') anchor=' let appBundleURL = try await self.prepareAppBundle(for: appBundle, profiles: profiles, appexBundleIds: context.appexBundleIds ?? [:])' From cf773239cd2d04b5623e97adeb261e86b197c718 Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:33:03 +0000 Subject: [PATCH 06/12] Record pinned SideSign capability patch and entitlement-validation provenance in source build manifest --- scripts/prepare_sidestore_source.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/prepare_sidestore_source.py b/scripts/prepare_sidestore_source.py index a53645c4d..e702f1a8c 100644 --- a/scripts/prepare_sidestore_source.py +++ b/scripts/prepare_sidestore_source.py @@ -252,5 +252,18 @@ manifest={'schema':1,'integration_script_sha256':hashlib.sha256(pathlib.Path(__file__).read_bytes()).hexdigest(),'resign_operation_sha256':hashlib.sha256(operation.read_bytes()).hexdigest(),'repository':'LiveContainer/SideStore','commit':actual,'overlay':{file.name:hashlib.sha256(file.read_bytes()).hexdigest() for file in files},'signing_phase':'after bundle preparation, before ALTSigner.signApp'} manifest['install_ui']={'executor_sha256':hashlib.sha256(executor.read_bytes()).hexdigest(),'handler_sha256':hashlib.sha256(handler.read_bytes()).hexdigest(),'phase':'advanced configuration in host; no guest framework loading', 'host_ui_only':True, 'pipeline_diagnostics':True, 'picker_owned_copy':True, 'picker_sha256':hashlib.sha256(myapps.read_bytes()).hexdigest(), 'download_sha256':hashlib.sha256(download.read_bytes()).hexdigest()} manifest['extension_ids']={'prepare_sha256':hashlib.sha256(extension_operation.read_bytes()).hexdigest(),'validate_before_signing':True} +manifest['increased_memory_limit']={ + 'sidesign_base':sidesign_base, + 'sidesign_capability_patch':sidesign_memory_patch, + 'feature':'INCREASED_MEMORY_LIMIT', + 'entitlement':'com.apple.developer.kernel.increased-memory-limit', + 'developer_portal_source_sha256':hashlib.sha256( + (sidesign/'Sources/DeveloperPortal/AppIDs.swift').read_bytes()).hexdigest(), + 'profile_operation_sha256':hashlib.sha256(profiles_operation.read_bytes()).hexdigest(), + 'signer_sha256':hashlib.sha256(signer.read_bytes()).hexdigest(), + 'profile_validation':True, + 'signer_requires_profile':True, + 'host_opt_in_only':True +} (source/'LCOS_SOURCE.json').write_text(json.dumps(manifest,indent=2)+'\n') print(json.dumps(manifest,indent=2)) From 0d7ecbb8cdeb1b35d3d9da7daa51fe90b8517068 Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:33:07 +0000 Subject: [PATCH 07/12] Refuse integrated builds without pinned memory capability patch and strict profile checks --- scripts/verify_sidestore_source.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/verify_sidestore_source.py b/scripts/verify_sidestore_source.py index 1c33193c3..99e550238 100644 --- a/scripts/verify_sidestore_source.py +++ b/scripts/verify_sidestore_source.py @@ -12,6 +12,17 @@ def verify(path): raise ValueError('SideStore artifact does not match the pinned source revision') if hashlib.sha256((root / 'scripts/prepare_sidestore_source.py').read_bytes()).hexdigest() != manifest.get('integration_script_sha256'): raise ValueError('Rebuild SideStore: pipeline integration script changed') + memory = manifest.get('increased_memory_limit', {}) + if (memory.get('sidesign_base') != '752d1ef602aa792a432ffa1e71646dc1ecf7363c' + or memory.get('sidesign_capability_patch') != '9d89dac1d391c934e5c69be1fadbb090d9a7f944' + or memory.get('feature') != 'INCREASED_MEMORY_LIMIT' + or memory.get('entitlement') != 'com.apple.developer.kernel.increased-memory-limit' + or memory.get('profile_validation') is not True + or memory.get('signer_requires_profile') is not True + or memory.get('host_opt_in_only') is not True + or any(len(memory.get(key, '')) != 64 for key in [ + 'developer_portal_source_sha256', 'profile_operation_sha256', 'signer_sha256'])): + raise ValueError('Rebuild SideStore: missing verified Increased Memory Limit capability integration') files = {name: root / 'Integrations/SideStore' / name for name in ['LCOSSigningInjection.swift', 'LCOSSigningInjectionUI.swift']} files.update({name: root / 'LiveContainerSwiftUI/PackageManager/Core' / name for name in ['SigningMachO.swift', 'SigningInjectionPreset.swift', 'SigningBundleIdentifiers.swift', 'PackageSHA256.swift', 'SigningDiagnostics.swift']}) From 1a472c2234c129c83474a5ddedc33c9ac614023f Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:33:40 +0000 Subject: [PATCH 08/12] Test explicit memory opt-in, strict default-off semantics and no extension entitlement forgery --- .../AdvancedInstallTests.swift | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Tests/PackageCoreTests/AdvancedInstallTests.swift b/Tests/PackageCoreTests/AdvancedInstallTests.swift index 5f72eaeb8..63ccfcbb2 100644 --- a/Tests/PackageCoreTests/AdvancedInstallTests.swift +++ b/Tests/PackageCoreTests/AdvancedInstallTests.swift @@ -44,6 +44,40 @@ final class AdvancedInstallTests: XCTestCase { XCTAssertEqual(plist["LSSupportsOpeningDocumentsInPlace"] as? Bool, true) } + func testIncreasedMemoryLimitOptInSetsRealSigningRequestOnlyForMainApp() throws { + let (root, app) = try fixture() + defer { try? FileManager.default.removeItem(at: root) } + try SigningAdvanced.customize(app, name: app.name, identifier: app.identifier, + iconPNG: nil, options: .init(enableFileSharing: false, enableIncreasedMemoryLimit: true)) + let main = try XCTUnwrap(PropertyListSerialization.propertyList( + from: Data(contentsOf: app.url.appendingPathComponent("Info.plist")), + format: nil) as? [String: Any]) + let extensionInfo = try XCTUnwrap(PropertyListSerialization.propertyList( + from: Data(contentsOf: app.url.appendingPathComponent("PlugIns/Widget.appex/Info.plist")), + format: nil) as? [String: Any]) + XCTAssertEqual(main[SigningAdvanced.increasedMemoryRequestKey] as? Bool, true) + XCTAssertNil(extensionInfo[SigningAdvanced.increasedMemoryRequestKey]) + XCTAssertEqual(try SigningAdvanced.inspect(root).extensionCount, 1) + // This editor writes an explicit request, not a forged entitlement. + XCTAssertNil(main["com.apple.developer.kernel.increased-memory-limit"]) + } + + func testIncreasedMemoryLimitOffIsDefaultAndClearsUntrustedOrOldRequest() throws { + let (root, app) = try fixture() + defer { try? FileManager.default.removeItem(at: root) } + let plistURL = app.url.appendingPathComponent("Info.plist") + var main = try XCTUnwrap(PropertyListSerialization.propertyList( + from: Data(contentsOf: plistURL), format: nil) as? [String: Any]) + main[SigningAdvanced.increasedMemoryRequestKey] = true + try PropertyListSerialization.data(fromPropertyList: main, format: .xml, options: 0) + .write(to: plistURL) + try SigningAdvanced.customize(app, name: app.name, identifier: app.identifier, + iconPNG: nil) + let after = try XCTUnwrap(PropertyListSerialization.propertyList( + from: Data(contentsOf: plistURL), format: nil) as? [String: Any]) + XCTAssertNil(after[SigningAdvanced.increasedMemoryRequestKey]) + } + func testRemoveAppExtensionsRetainsExecutableAndAppIdentity() throws { let (root, app) = try fixture(); defer { try? FileManager.default.removeItem(at: root) } let executable = try Data(contentsOf: app.url.appendingPathComponent("Test")) From 6ca644493cef89b9189d212c1765eb8aeb82e0ef Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:34:49 +0000 Subject: [PATCH 09/12] Run SideSign Apple capability request unit tests before source-built SideStore archive --- .github/workflows/build-sidestore-source.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-sidestore-source.yml b/.github/workflows/build-sidestore-source.yml index b3d2c8fb9..8c0363eee 100644 --- a/.github/workflows/build-sidestore-source.yml +++ b/.github/workflows/build-sidestore-source.yml @@ -29,6 +29,12 @@ jobs: - name: Apply reviewed signing overlay if: steps.signing-cache.outputs.cache-hit != 'true' run: python3 scripts/prepare_sidestore_source.py sidestore-source + - name: Test pinned Increased Memory Limit Apple capability requests + if: steps.signing-cache.outputs.cache-hit != 'true' + working-directory: sidestore-source/Dependencies/SideSign + run: | + set -o pipefail + swift test --filter CapabilityTests 2>&1 | tee ../../../sidesign-memory-tests.log - name: Archive custom SideStore if: steps.signing-cache.outputs.cache-hit != 'true' working-directory: sidestore-source @@ -62,5 +68,7 @@ jobs: if: always() with: name: sidestore-source-logs - path: sidestore-build.log + path: | + sidestore-build.log + sidesign-memory-tests.log if-no-files-found: warn From 20d4a9c855f9de86cd5026b81abcd9f98e997f68 Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:34:54 +0000 Subject: [PATCH 10/12] Document GetMoreRam integration, real Apple capability/profile gating and pinned SideSign patch --- Integrations/SideStore/README.md | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/Integrations/SideStore/README.md b/Integrations/SideStore/README.md index 805503108..9e522dcb0 100644 --- a/Integrations/SideStore/README.md +++ b/Integrations/SideStore/README.md @@ -60,6 +60,58 @@ private staging directory and hands it back to SideStore. Signing, provisioning, installation and their errors still belong to the real SideStore pipeline. Empty/invalid choices fail before handoff. Cancel leaves the original IPA untouched. +## Increased Memory Limit (GetMoreRam workflow) + +The **Increased Memory Limit** toggle in Advanced Install is **off by default**. It +prepares a user-requested installation option, not a forged Apple entitlement. +The host adds the internal `LCOSIncreasedMemoryLimitRequested` marker to the +**main application only** in the disposable IPA copy. Clearing the toggle +also clears a pre-existing marker; extensions are unaffected. + +During the *real* source-built SideStore install pipeline: +1. SideStore finds or creates the Apple App ID for the **effective signed bundle + identifier**, using the account already signed in to SideStore. +2. `FetchProvisioningProfilesOperation` requests the + `INCREASED_MEMORY_LIMIT` capability on that App ID before downloading + a new provisioning profile. The pinned SideSign patch uses Apple Developer + Services' v1 `bundleIdCapabilities` PATCH (the mechanism used by + [GetMoreRam](https://github.com/hugeBlack/GetMoreRam)). +3. The operation checks the **actual profile** contains + `com.apple.developer.kernel.increased-memory-limit = true`. + If not, installation **fails with a visible error**, rather than silently + proceeding with a normal-memory profile. A user-selected override profile + without the entitlement is rejected as well. +4. The pinned SideSign signer may retain this entitlement **only for an opted-in + main app whose provisioning profile explicitly grants it**. It never grants + it to app extensions or to apps installed by the ordinary workflow. + +A profile entitlement does not add physical RAM or promise a fixed memory +budget; the memory budget is device- and iOS-dependent. Internet access, +Apple account authentication and Apple's approval are necessary. After +installing, a device test must inspect both the installed app's signature +and its provisioning profile to prove the entitlement actually survived. + +The feature does not modify the original input IPA, bypass signature checks, +revoke another App ID, or change the ordinary installation/refresh flow. +Account credentials remain managed exclusively by SideStore. We do **not** +ship or embed GetMoreRam or ask the user to log in to a second service. + +### Pinned dependency / safety gate + +`scripts/prepare_sidestore_source.py` checks out the existing SideStore +revision and its SideSign `752d1ef` submodule, then cherry-picks the +**exact** SideSign pull request +[SideSign #4](https://github.com/SideStore/SideSign/pull/4) commit +`9d89dac1d391c934e5c69be1fadbb090d9a7f944` *without committing*. +The patch request's HEAD must match the pinned SHA, and the modified file +list is verified. It keeps SideStore's existing 2FA fix. The builder patches +the memory-only signer check, verifies the profile operation, runs the +SideSign `CapabilityTests`, and records the source hashes in the build +manifest. The IPA verifier refuses an artifact lacking this provenance. + +This is an experimental feature until real Apple profile/signature verification +on an iPhone. A green Xcode build cannot establish an increased memory budget. + ## Extension bundle identifiers The single-profile path now fetches the profile under the effective target bundle ID and keys its From 408023df1bb9d16be3141e456ce4efc0dbed005a Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:38:48 +0000 Subject: [PATCH 11/12] Correct Advanced Install extension manager docs while documenting memory capability --- Integrations/SideStore/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Integrations/SideStore/README.md b/Integrations/SideStore/README.md index 9e522dcb0..afaef730f 100644 --- a/Integrations/SideStore/README.md +++ b/Integrations/SideStore/README.md @@ -47,10 +47,11 @@ bundle ID or icon, and configure supported dylib/DEB injection presets before pr When enabled, `LSSupportsOpeningDocumentsInPlace` is also set so the app's Documents directory is available to Files. It does not expose unrelated sandbox directories. The original value is displayed on load and preserved by default. -- **Remove App Extensions** is visible only when the IPA contains `.appex` bundles in - `PlugIns`. It is disabled by default, removes those extension bundles from the - staged copy and may break extension-dependent features such as widgets and sharing. - Other embedded resources and executables are retained. +- **Manage App Extensions** is visible only when the IPA contains `.appex` bundles in + `PlugIns`. Every extension is retained by default; selected extensions can be + omitted individually from the staging copy. Removing extensions may break + extension-dependent features such as widgets and sharing. Other resources + and executables remain untouched. - **Manage injected libraries** opens the existing validated injection preset UI, keyed to the effective bundle ID. No unsupported device-limit bypass or fictitious Apple account/signing selector is offered. From 4986140776bf99e67a9387161e82b58855657be3 Mon Sep 17 00:00:00 2001 From: Zephyrax <103900579+CORBENDALLAS111@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:53:09 +0000 Subject: [PATCH 12/12] Log verified Increased Memory Limit grants and override-profile rejections during actual SideStore provisioning --- scripts/prepare_sidestore_source.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/prepare_sidestore_source.py b/scripts/prepare_sidestore_source.py index e702f1a8c..c703eebbc 100644 --- a/scripts/prepare_sidestore_source.py +++ b/scripts/prepare_sidestore_source.py @@ -63,8 +63,12 @@ assert profile_source.count(anchor)==1 profile_source=profile_source.replace(anchor,''' if let overrideProfile = self.context.overrideProvisioningProfile { if memoryRequested && (overrideProfile.entitlements[ALTEntitlement.increasedMemoryLimit.rawValue] as? Bool != true) { + SigningDiagnostics.record("memory.profile.missing", effectiveBundleId, level: "error") throw OperationError.invalidParameters("Selected provisioning profile does not grant Increased Memory Limit") } + if memoryRequested { + SigningDiagnostics.record("memory.profile.granted", effectiveBundleId) + } self.debugLog''') anchor=''' let profile = try await DeveloperPortalProxy.shared.downloadProvisioningProfile(for: groupAppID, deviceType: DeveloperPortalProxy.currentDeviceType, team: team) self.debugLog''' @@ -74,10 +78,13 @@ // entitlement; verify the actual issued provisioning profile. Never // silently install a normal-memory app when the user opted in. if parentAppBundle == nil && - targetAppBundle.infoPlist["LCOSIncreasedMemoryLimitRequested"] as? Bool == true && - (profile.entitlements[ALTEntitlement.increasedMemoryLimit.rawValue] as? Bool != true) { - SigningDiagnostics.record("memory.profile.missing", groupAppID.bundleIdentifier, level: "error") - throw OperationError.invalidParameters("Apple did not grant Increased Memory Limit to the provisioning profile") + targetAppBundle.infoPlist["LCOSIncreasedMemoryLimitRequested"] as? Bool == true { + guard profile.entitlements[ALTEntitlement.increasedMemoryLimit.rawValue] as? Bool == true else { + SigningDiagnostics.record("memory.profile.missing", groupAppID.bundleIdentifier, level: "error") + throw OperationError.invalidParameters("Apple did not grant Increased Memory Limit to the provisioning profile") + } + // This records an issued Apple profile, NOT a completed install. + SigningDiagnostics.record("memory.profile.granted", groupAppID.bundleIdentifier) } self.debugLog''') anchor=''' // check if we really need to make a update on portal