Skip to content

Add Increased Memory Limit capabilities to produce and modify_services - #30088

Open
csc-EricWu wants to merge 2 commits into
fastlane:masterfrom
csc-EricWu:feature/increased-memory-limit-capability
Open

Add Increased Memory Limit capabilities to produce and modify_services#30088
csc-EricWu wants to merge 2 commits into
fastlane:masterfrom
csc-EricWu:feature/increased-memory-limit-capability

Conversation

@csc-EricWu

Copy link
Copy Markdown
Contributor

Expose INCREASED_MEMORY_LIMIT and INCREASED_MEMORY_LIMIT_DEBUGGING via App Store Connect API for produce enable_services, create_app_online enable_services validation, and modify_services.

Aligns with the scope of #22189 without changing DeveloperCenter app creation flow.

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

Description

Testing Steps

@iBotPeaches

Copy link
Copy Markdown
Member

Any further details on the Connect-API only stuff? I was following the additional changes, but a bit lost on the split between the server side.

Expose INCREASED_MEMORY_LIMIT and INCREASED_MEMORY_LIMIT_DEBUGGING via
App Store Connect API for produce enable_services, create_app_online
enable_services validation, and modify_services.

Aligns with the scope of fastlane#22189 without changing DeveloperCenter app
creation flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
@csc-EricWu
csc-EricWu force-pushed the feature/increased-memory-limit-capability branch from a10090b to d496e1a Compare June 20, 2026 15:58
@csc-EricWu

Copy link
Copy Markdown
Contributor Author

About the Connect API part:This PR only adds support for the two new capabilities (INCREASED_MEMORY_LIMIT and INCREASED_MEMORY_LIMIT_DEBUGGING) via Spaceship::ConnectAPI (the modern App Store Connect API path). It does not touch the old Developer Portal / legacy paths used in app creation.I followed the structure from PR #22189 as a reference:Added the new capability constants in the relevant ConnectAPI models.
Updated produce (enable_services + create_app_online validation).
Updated modify_services.

The "server side" split refers to only modifying the ConnectAPI side (which is what produce, modify_services, etc. now primarily use), while leaving the old DeveloperCenter/Portal code unchanged — exactly as described in the PR title and description.If the structure or separation isn't correct, or if some parts need cleanup/refactoring, please feel free to push changes directly or let me know what should be adjusted. I'm happy to learn and improve it.Looking forward to your feedback!



expect(features["dataProtection"].value).to eq("complete")
end

it "skips Connect API-only services in legacy Portal enable_services" do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test looked like some older logic you had, which doesn't seem relevant anymore. Things were force-pushed so I don't remember which commit added it, but its probably testing an older behavior

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take another look.I have added these logics

Capabilities such as increased_memory_limit and extended_virtual_address_space
are not supported by the legacy Portal AppService API used during
Spaceship.app.create!. Attempting to enable them via enable_services caused
NoMethodError, and they cannot be added to app_service.rb because Apple only
exposes them through the Connect API (PATCH bundleIds with capability IDs like
INCREASED_MEMORY_LIMIT and EXTENDED_VIRTUAL_ADDRESSING).

Skip Connect API-only services in the Portal enable_services path, then call
Produce::Service after app creation to enable them. Build service options on a
dedicated Class instance so accessor definitions do not pollute Object and break
capability detection.

Co-authored-by: Cursor <cursoragent@cursor.com>
@csc-EricWu
csc-EricWu force-pushed the feature/increased-memory-limit-capability branch from 56c9dab to e9d817c Compare June 22, 2026 12:10
@iBotPeaches

Copy link
Copy Markdown
Member

Thanks, so I was previously following this PR when it was just continuing the pattern of adding new capabilities and it made sense.

Now we have new logic for connect_api_only. Is this saying that these new services/capabilities are only configurable via the new Connect API? Just not following those changes.

@csc-EricWu

Copy link
Copy Markdown
Contributor Author

Thanks for the question — the naming is confusing, and I should have explained the split more clearly in the PR description.

Short answer: Yes. increased_memory_limit, extended_virtual_address_space, and increased_memory_limit_debugging are not configurable through the legacy Developer Portal / Spaceship::Portal::AppService path that enable_services uses during Spaceship.app.create!. They must be enabled via Spaceship’s Connect provisioning flow (BundleId#update_capability → PATCH /v1/bundleIds/{id} on developer.apple.com/services-account).

Why connect_api_only exists

When this PR only added the new capability constants and wired them into produce enable_services / create_app_online, they still went through the same Portal enable_services path as Push, Associated Domains, etc. That fails for these keys because Apple never exposed them on Portal AppService — e.g. Spaceship.app_service.increased_memory_limit doesn’t exist, so you get NoMethodError during app creation.

So the change splits capabilities into two buckets:

Path API Examples
Portal (enable_services in create_new_app)
Legacy Developer Portal
push, associated_domains, app_group, …
Connect-only (enable_connect_api_services)
Connect provisioning (Produce::Service → update_capability)
increased_memory_limit, extended_virtual_address_space, fonts, family_controls, …
connect_api_only? means: in ALLOWED_SERVICES, but not in Spaceship::Portal::AppService — skip Portal during create, then enable after the Bundle ID exists on ASC.

Clarification on “Connect API”

The flag name refers to Spaceship Connect’s capability APIs, not necessarily “any capability you can turn on with a P8 JWT on api.appstoreconnect.apple.com”. For these memory-related capabilities, Apple does not accept POST /v1/bundleIdCapabilities with types like INCREASED_MEMORY_LIMIT (409 — not in the allowed capabilityType list). The supported path is the services-account PATCH you see in the Developer portal UI (same as Produce::Service / modify_services after Spaceship.login).

What the PR does in practice

Adds INCREASED_MEMORY_LIMIT / INCREASED_MEMORY_LIMIT_DEBUGGING to BundleIdCapability::Type and exposes them in produce / modify_services (same pattern as other newer capabilities).
Marks them as Connect-only so create_app_online doesn’t break on Portal.
After app creation, enable_connect_api_services calls Produce::Service.enable, which logs in and runs bundle_id.update_capability(...).
Happy to rename connect_api_only to something clearer (e.g. connect_provisioning_only or portal_unsupported_service?) if that would help — the behavior is “Portal can’t configure this; use Connect provisioning instead.”

@iBotPeaches

Copy link
Copy Markdown
Member

That fails for these keys because Apple never exposed them on Portal AppService — e.g. Spaceship.app_service.increased_memory_limit doesn’t exist, so you get NoMethodError during app creation.

This doesn't make sense to me. We create those no? Or are you saying these are custom entitlements that need to be approved and thus don't have a spot in the internal legacy account/ios/identifiers/updateService.action area?

Sorry the rest just looks like a bunch of AI gibberish and having difficulties following. It seems like this PR is on the way of solving the custom entitlement issue I think? #29609

@csc-EricWu

Copy link
Copy Markdown
Contributor Author

It was Ai who answered, because I don't quite understand either, I just wanted to push this matter forward.

@iBotPeaches iBotPeaches left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the honesty. At the moment I don't understand the other changes to feel comfortable merging. If I get some downtime to intercept some calls and look at what these memory changes are named I could probably validate a bit easier.

We'd need a better understanding of why enable_connect_api_services was introduced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants