Skip to content

fix(ios): remove private netinet6/in6.h import from cordova-plugin-advanced-http - #57

Merged
robingenz merged 1 commit into
mainfrom
fix/ios-build-private-header-import
Aug 14, 2026
Merged

robingenz merged 1 commit into
mainfrom
fix/ios-build-private-header-import

Conversation

@robingenz

Copy link
Copy Markdown
Member

The iOS build fails on the Capawesome Cloud runner since it moved to Xcode 26.5 / iPhoneOS26.5.sdk:

error: Use of private header from outside its module: 'netinet6/in6.h'
   (in target 'CordovaPlugins' from project 'Pods')
** ARCHIVE FAILED **

cordova-plugin-advanced-http@3.2.2 ships a vendored AFNetworking fork that imports <netinet6/in6.h> directly in SM_AFHTTPSessionManager.m and SM_AFNetworkReachabilityManager.m. The newer SDK marks that header as private to the Darwin module, so clang hard-errors on it. The import is redundant anyway — <netinet/in.h>, which both files already import, provides the same declarations.

The plugin is unmaintained (latest release 3.3.1, published 2022), so an upgrade does not fix this.

Changes

  • Add a patch-package patch removing the redundant #import <netinet6/in6.h> from both files.

The existing postinstall: patch-package hook applies it, so npm ci produces the fixed sources before cap sync copies them into ios/capacitor-cordova-ios-plugins.

Verification

  • npx patch-package re-applies all patches cleanly.
  • The iOS archive itself only runs on the Capawesome Cloud runner, so CI on this PR is the actual confirmation.

Copilot AI lite review requested due to automatic review settings August 14, 2026 06:07
@robingenz robingenz added bug/fix Something isn't working platform: ios iOS platform labels Aug 14, 2026
@robingenz robingenz self-assigned this Aug 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses iOS build failures on newer Xcode/iPhoneOS SDKs by patching an unmaintained Cordova plugin dependency to stop importing a now-private Darwin header (<netinet6/in6.h>), relying instead on <netinet/in.h> which already provides the needed declarations.

Changes:

  • Adds a patch-package patch for cordova-plugin-advanced-http@3.2.2 removing #import <netinet6/in6.h> from two vendored AFNetworking fork files.
  • Ensures npm ci + existing postinstall: patch-package flow applies the fix before Capacitor sync copies plugins into iOS.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@robingenz
robingenz merged commit b71066b into main Aug 14, 2026
6 checks passed
@robingenz
robingenz deleted the fix/ios-build-private-header-import branch August 14, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug/fix Something isn't working platform: ios iOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants