cyril23 opened a new issue, #165:
URL: https://github.com/apache/cordova-plugin-network-information/issues/165

   ## Bug Report
   
   ### Problem
   iOS builds fail with Xcode 26 (26.4, 17E192) due to stricter module boundary 
enforcement. `CDVReachability.m` imports the private header `netinet6/in6.h` 
directly, which Xcode 26 now rejects:
   
   ```
   CDVReachability.m:49:9: error: Use of private header from outside its 
module: 'netinet6/in6.h'
   ```
   
   Build command and exit code:
   ```
   Command failed with exit code 65: xcodebuild -workspace ... -scheme ... 
-configuration Debug -destination generic/platform=iOS -archivePath ... archive
   ```
   
   ### Environment
   - **Xcode**: 26.4 (17E192)
   - **iOS SDK**: iPhoneOS26.4
   - **cordova-plugin-network-information**: 3.0.0
   - **cordova-ios**: 7.1.0
   - **Cordova CLI**: 13.0.0
   
   ### Root Cause
   The `#import <netinet6/in6.h>` on line 49 of `src/ios/CDVReachability.m` is 
**redundant**:
   - `netinet/in.h` (already imported on line 48) transitively includes 
`netinet6/in6.h` via Apple's [darwin-xnu 
bsd/netinet/in.h](https://github.com/apple/darwin-xnu/blob/main/bsd/netinet/in.h)
   - No `sockaddr_in6`, `in6_addr`, or `IN6_*` symbols from `netinet6/in6.h` 
are used directly in `CDVReachability.m`
   - Apple's own `netinet6/in6.h` header historically warned: "do not include 
netinet6/in6.h directly, include netinet/in.h"
   
   ### Fix
   Simply remove the redundant import. See: 
https://github.com/LogicsSoftwareGmbH/cordova-plugin-network-information/commit/07ad5a0d9c2f37246af7e8785bbb6504a9c3830d
   
   ```diff
    #import <sys/socket.h>
    #import <netinet/in.h>
   -#import <netinet6/in6.h>
    #import <arpa/inet.h>
   ```
   
   This has been verified in production builds (both debug IPA and APK build 
successfully after the fix).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to