Enable Increased Memory Limit for free teams - #4
Open
playportdev wants to merge 1 commit into
Open
playportdev wants to merge 1 commit into
playportdev wants to merge 1 commit into
Conversation
Apple offers the Increased Memory Limit capability to free teams, but the legacy updateAppId.action request cannot enable it, and Feature.freeFeatures did not list it, so SideStore dropped it and the profile came back without com.apple.developer.kernel.increased-memory-limit (SideStore#1616). - Feature.capabilityID names the developer services v1 capability ID of a feature the legacy request cannot enable (INCREASED_MEMORY_LIMIT). - updateAppID leaves such features out of the legacy request and, after it, enables them with a PATCH to v1/bundleIds/<id> (bundleIdCapabilities), the request Xcode, AltSign (b2c8861) and GetMoreRam send. If Apple refuses it, the update still succeeds without the capability, as before. - freeFeatures lists increasedMemoryLimit. - sendServicesBodyRequest sends a v1 request with its own method and JSON body; the header set is shared with sendServicesRequest. Tests mock both requests: the legacy body carries no modern feature, the PATCH body names the capability, no PATCH without it, and a refused PATCH does not fail the update.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the SideSign side of SideStore/SideStore#1616: apps signed with a free Apple ID lose
com.apple.developer.kernel.increased-memory-limit, so they get the normal memory limit (about 3.3 GB on an 8 GB phone, against about 6 GB with the entitlement).Cause
Apple offers Increased Memory Limit to free teams (Xcode with a Personal Team, AltStore 2.2+ and GetMoreRam all get it), but:
Feature.freeFeaturesdoes not listincreasedMemoryLimit, so SideStore'supdateFeaturesdrops it for a free team, andios/updateAppId.actionrequest cannot enable it anyway. It is only enabled through the developer services v1 API, with abundleIdCapabilitiesrelationship onPATCH v1/bundleIds/<id>.Changes
Feature.capabilityID: the v1 capability ID of a feature the legacy request cannot enable (INCREASED_MEMORY_LIMIT), nil for legacy features.updateAppIDleaves such features out of the legacy request. After it succeeds, it enables the ones set totruewith one v1 PATCH. This is the request AltSign sends since rileytestut/AltSign@b2c8861, and the one hugeBlack/GetMoreRam sends. If Apple refuses the PATCH,updateAppIDlogs the refusal and still returns the updated App ID, so an install behaves as it does today instead of failing.freeFeatureslistsincreasedMemoryLimit(it is already infreeEntitlements).sendServicesBodyRequest: a v1 request with its own method and JSON body.sendServicesRequestsends a query through POST plusX-HTTP-Method-Override, which cannot carry a JSON:API body. Both share oneservicesHeadersbuilder.SideStore needs no code change beyond the submodule bump.
OperationEntitlementsalready asks for the entitlement, and the signer keeps every entitlement that is in both the profile and the app. Because the legacy App ID listing may not report the v1 capability, SideStore may send the update on every install or refresh. That costs one extra idempotent request.Testing
Tests/SideSignTests/CapabilityTests.swiftmocks both requests with aURLProtocol:increasedMemoryLimit;services/v1/bundleIds/<id>and namesINCREASED_MEMORY_LIMIT, enabled;false;swift testpasses (9 tests) on Linux, Swift 6.4, with a local libunicorn for AnisetteKit. To build the existingSideSignTests.swifton Linux I addedimport Foundationlocally; that change is not in this PR. I have not run it against Apple's servers or on a phone through a SideStore build. The request body is the same as AltSign's and GetMoreRam's.Not included:
extendedVirtualAddressingandincreasedDebuggingMemoryLimit(GetMoreRamExtended sendsEXTENDED_VIRTUAL_ADDRESSINGthe same way). Each would only need itscapabilityIDand afreeFeaturesentry once someone confirms Apple grants it to free teams.Overlaps #3 in the
freeFeatureslist (one-line conflict).