Skip to content

Conversation

NidhiDixit09
Copy link
Collaborator

Reference

EMT-2305 - 413 HTTP error on initSession
https://branch.atlassian.net/browse/EMT-2305
#1511

Summary

Removed Apple Receipt param from Server Requests. Its not used by backend and related Apple API is deprecated now.

Type Of Change

  • Bug fix (non-breaking change which fixes an issue)

cc @BranchMetrics/saas-sdk-devs for visibility.

Copy link
Contributor

matter-code-review bot commented Aug 26, 2025

Code Quality bug fix maintainability

Summary By MatterAI MatterAI logo

🔄 What Changed

This Pull Request's title and body state the removal of apple_receipt and apple_testflight parameters from server requests, citing their non-usage by the backend and the deprecation of related Apple APIs, aiming to resolve HTTP 413 errors. 🍎 However, the provided patch only modifies GitHub Actions workflows (.github/workflows/pre-release-qa.yml and .github/workflows/verify.yml) by removing redundant sudo xcode-select commands that explicitly set the Xcode version. ⚙️

🔍 Impact of the Change

The workflow modifications simplify the CI/CD configuration, potentially leading to slightly faster and more robust build processes by relying on the default Xcode version provided by the runner. If the stated parameter removal also occurred (though not shown in the patch), it would reduce request payload size, potentially mitigating HTTP 413 errors and improving API efficiency. 🚀

📁 Total Files Changed

  • .github/workflows/pre-release-qa.yml: Removed redundant Xcode version selection from multiple jobs. 🧹
  • .github/workflows/verify.yml: Removed redundant Xcode version selection from a verification job. 🧹

🧪 Test Added

No new functional tests are visible in the provided patch. The changes are to CI/CD configuration. 🧪

🔒Security Vulnerabilities

No new security vulnerabilities are introduced by the workflow changes. The stated removal of unused parameters from server requests could be considered a minor security improvement by reducing the attack surface. 🛡️

Tip

Quality Recommendations

  1. Verify that the apple_receipt and apple_testflight parameters have indeed been removed from the relevant server request calls in the application code, as this change is stated in the PR description but not visible in the provided patch.

  2. Ensure that removing the explicit xcode-select command does not introduce any build inconsistencies or failures on different macOS runner versions, although macos-latest typically handles this well.

Tanka Poem ♫

Old params now gone,
Workflows clean, Xcode selects,
Builds run swift and true.
No more 413 errors,
Code breathes, a lighter payload. 🌬️

Sequence Diagram

sequenceDiagram
    participant Client as Mobile App
    participant Server as Backend Service

    Client->>Server: initSession(param1, param2)
    Note over Server: Previously included apple_receipt and apple_testflight
    Note over Server: Now these parameters are removed from the request payload
    Server->>Server: ProcessSessionRequest(param1, param2)
    Server-->>Client: SessionResponse
Loading

@gdeluna-branch
Copy link
Contributor

/matter summary

@gdeluna-branch
Copy link
Contributor

/matter review

@BranchMetrics BranchMetrics deleted a comment from matter-code-review bot Aug 27, 2025
@BranchMetrics BranchMetrics deleted a comment from matter-code-review bot Aug 27, 2025
Copy link
Contributor

Summary By MatterAI MatterAI logo

🔄 What Changed

This Pull Request primarily focuses on removing the apple_receipt and apple_testflight parameters from all server requests within the Branch SDK. This involved a comprehensive cleanup: deleting the BNCAppleReceipt class, its associated test file (BNCAppleReceiptTests.m), removing its usage and property from BNCRequestFactory, and deprecating related constants in BranchConstants.h and BranchConstants.m. Additionally, several CI/CD workflows (pre-release-qa.yml, release.yml, verify.yml) were updated to explicitly select Xcode 16.4 for build consistency, and the Branch_noidfa_signed_xcframework artifact in release.yml is now packaged as a .zip file. 🚀

🔍 Impact of the Change

This change streamlines the Branch SDK by eliminating the collection and transmission of Apple receipt information, which can lead to improved privacy compliance and reduced payload sizes for server requests. The removal of unused code enhances the SDK's maintainability and reduces its footprint. The CI/CD updates ensure a standardized and consistent build environment across various integration verification jobs, thereby improving the reliability and predictability of the build process. 🛠️

📁 Total Files Changed

  • .github/workflows/pre-release-qa.yml: Updated Xcode version for pre-release QA builds. (16 additions)
  • .github/workflows/release.yml: Changed release artifact to a zip file. (1 addition, 1 deletion)
  • .github/workflows/verify.yml: Updated Xcode version for verification builds. (2 additions)
  • Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m: Removed tests for BNCAppleReceipt. (33 deletions)
  • Sources/BranchSDK/BNCAppleReceipt.m: Removed BNCAppleReceipt implementation. (66 deletions)
  • Sources/BranchSDK/BNCRequestFactory.m: Removed BNCAppleReceipt dependency and related parameter additions to server requests. (17 deletions)
  • Sources/BranchSDK/BranchConstants.m: Removed apple_receipt and apple_testflight constants. (2 deletions)
  • Sources/BranchSDK/Private/BNCAppleReceipt.h: Removed BNCAppleReceipt header. (27 deletions)
  • Sources/BranchSDK/Private/BranchConstants.h: Removed apple_receipt and apple_testflight constant declarations. (2 deletions)

🧪 Test Added

No new tests were added. The existing test file BNCAppleReceiptTests.m was removed as its corresponding functionality was deprecated. ❌

🔒Security Vulnerabilities

No new security vulnerabilities were introduced. The removal of data collection for Apple receipt information can be seen as a positive step towards enhancing user privacy. ✅

@BranchMetrics BranchMetrics deleted a comment from matter-code-review bot Aug 27, 2025
Copy link
Contributor

@matter-code-review matter-code-review bot left a comment

Choose a reason for hiding this comment

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

Clean removal of Apple Receipt functionality with proper CI/CD improvements. Added Xcode version pinning across workflows and fixed missing artifact path.

Skipped files
  • Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj: Skipped file pattern
  • BranchSDK.xcodeproj/project.pbxproj: Skipped file pattern

Copy link
Contributor

@gdeluna-branch gdeluna-branch left a comment

Choose a reason for hiding this comment

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

I'm approving the removal of apple receipt but there's gh runner changes here I'm not reviewing.

Copy link
Contributor

Important

PR Review Skipped

PR review skipped as per the configuration setting. Run a manually review by commenting /matter review

💡Tips to use Matter AI

Command List

  • /matter summary: Generate AI Summary for the PR
  • /matter review: Generate AI Reviews for the latest commit in the PR
  • /matter review-full: Generate AI Reviews for the complete PR
  • /matter release-notes: Generate AI release-notes for the PR
  • /matter : Chat with your PR with Matter AI Agent
  • /matter remember : Generate AI memories for the PR
  • /matter explain: Get an explanation of the PR
  • /matter help: Show the list of available commands and documentation
  • Need help? Join our Discord server: https://discord.gg/fJU5DvanU3

@NidhiDixit09 NidhiDixit09 merged commit e29ddd9 into master Aug 29, 2025
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants