Skip to content

[FEAT-2] Native diff applier: iOS (bspatch) — implement, wire, device-test #3

@prasad-rently

Description

@prasad-rently

Part of FEAT-2 (PR #1). Critical path to diffs working on a phone.

ios/CodePush/CodePushDiffPatcher.{h,m} is a compile-clean placeholder (applyPatch returns nil → full-download fallback).

To do (see FEAT-2-NATIVE-INTEGRATION.md):

  • Vendor public-domain bspatch.c/.h (bsdiff project, BSD-2-Clause) into ios/CodePush/bsdiff/, expose codepush_bspatch(...); add to CodePush.podspec; link libbz2.tbd.
  • Implement applyPatch:toSource:error: via codepush_bspatch, wrap output in NSData (freeWhenDone:YES).
  • Wire into CodePushPackage.m with hash verification + full-download fallback (mirror Android).
  • XCTest: server patch applies → bytes == target; corrupt → fallback.

Acceptance: same as Android; one server patch format applies on both platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeat-2FEAT-2: differential JS bundle updatesneeds-device-ciRequires native build + on-device verification

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions