Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loading Customer Center when entitlement is granted by another Apple app #4603

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Dec 17, 2024

Projects with multiple apps fail to load when the entitlement is granted by another app in the project. For example this Customer Info response:

{
  "request_date": "2024-12-17T13:47:05Z",
  "request_date_ms": 1734443225832,
  "subscriber": {
    "entitlements": {
      "pro": {
        "expires_date": "2024-12-17T14:01:33Z",
        "grace_period_expires_date": null,
        "product_identifier": "premiumyearly",
        "purchase_date": "2024-12-16T14:01:33Z"
      }
    },
    "first_seen": "2024-04-29T06:37:25Z",
    "last_seen": "2024-12-16T15:24:53Z",
    "management_url": "https://apps.apple.com/account/subscriptions",
    "non_subscriptions": {
    },
    "original_app_user_id": "_",
    "original_application_version": "1.0",
    "original_purchase_date": "2019-05-09T08:20:34Z",
    "other_purchases": {
    },
    "subscriptions": {
      "premiumyearly": {
        "auto_resume_date": null,
        "billing_issues_detected_at": null,
        "expires_date": "2024-12-17T14:01:33Z",
        "grace_period_expires_date": null,
        "is_sandbox": true,
        "original_purchase_date": "2024-02-16T14:02:22Z",
        "ownership_type": "PURCHASED",
        "period_type": "normal",
        "purchase_date": "2024-12-16T14:01:33Z",
        "refunded_at": null,
        "store": "app_store",
        "store_transaction_id": "000",
        "unsubscribe_detected_at": null
      }
    }
  }
}

This also fixes the Customer Center when the product fails to load by displaying the available information.

@vegaro vegaro enabled auto-merge (squash) December 17, 2024 14:56
Copy link
Contributor

@fire-at-will fire-at-will left a comment

Choose a reason for hiding this comment

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

Nice!!

@vegaro vegaro merged commit 936d66a into main Dec 17, 2024
8 of 10 checks passed
@vegaro vegaro deleted the sdk-3723-issue-loading-when-entitlement-is-granted-by-another-app-in branch December 17, 2024 15:06
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.

3 participants