Skip to content

Build Error with newer Xcode/iOS SDKs: Use of private header from outside its module: 'netinet6/in6.h' in AFNetworking #8027

Description

@masoudd2159

Description

When attempting to build the element-ios project using recent Xcode versions and newer iOS SDKs (e.g., iOS 18 / Simulator SDKs), the build fails during the dependency scanning phase of AFNetworking.

Clang throws a strict error regarding the usage of a private system header (netinet6/in6.h) inside AFNetworkReachabilityManager.m and AFHTTPSessionManager.m. Since AFNetworking is deprecated and no longer maintained upstream, this completely blocks the build pipeline on newer environment setups unless patched locally.

Steps to Reproduce

  1. Clone the element-ios repository on a machine running a recent Xcode version with newer iOS/Simulator SDKs.
  2. Run pod install.
  3. Build the Riot target for an iOS Simulator.

Expected Behavior

The project should compile successfully without throwing module violation errors from third-party legacy dependencies.

Actual Behavior & Logs

The compiler blocks the build with the following error logs:

/Users/ais/iOSProjects/element-ios/Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m:26:9: error: Use of private header from outside its module: 'netinet6/in6.h' (in target 'AFNetworking' from project 'Pods')

/Users/ais/iOSProjects/element-ios/Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m:32:9: error: Use of private header from outside its module: 'netinet6/in6.h' (in target 'AFNetworking' from project 'Pods')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions