Skip to content

Fix nullability annotations in iOS networking headers - #59240

Closed
mrousavy wants to merge 1 commit into
react:mainfrom
mrousavy:fix/ios-networking-header-nullability
Closed

mrousavy wants to merge 1 commit into
react:mainfrom
mrousavy:fix/ios-networking-header-nullability

Conversation

@mrousavy

Copy link
Copy Markdown
Contributor

Summary:

Importing RCTMultipartDataTask.h and RCTHTTPRequestHandler.h produces nullability-completeness warnings because the headers mix annotated return values with unannotated pointers and blocks.

Complete the annotations with NS_ASSUME_NONNULL, keeping optional configuration providers, interceptors, progress handlers and multipart callback payloads nullable. This matches the existing implementations, including clearing an interceptor with nil and reporting a failed multipart response without headers or content.

Changelog:

[IOS] [FIXED] - Fix missing nullability annotations in networking headers.

Test Plan:

  • Compiled a translation unit importing both headers with the Xcode 27.1 iOS Simulator SDK, ARC, blocks and -Werror. Passed in Objective-C and Objective-C++ modes. It also exercises clearing all three providers/interceptors with nil, returning nil from each interceptor, nullable multipart callback payloads and an absent progress callback.
  • The same header import on the original revision fails with nine -Wnullability-completeness errors.
  • Compiled RCTMultipartDataTask.m with -fsyntax-only -Werror=nullability-completeness against the same SDK. Passed.
  • Checked both changed headers with the repository's pinned clang-format 21.1.2 (--dry-run --Werror) and ran git diff --check. Passed.

A full RNTester build was not run for this header-only change.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 20, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 20, 2026
@meta-codesync

meta-codesync Bot commented Oct 20, 2026

Copy link
Copy Markdown

@javache has imported this pull request. If you are a Meta employee, you can view this in D126472293.

@meta-codesync meta-codesync Bot closed this in c7429b0 Oct 21, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @mrousavy in c7429b0

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 21, 2026
@meta-codesync

meta-codesync Bot commented Oct 21, 2026

Copy link
Copy Markdown

@javache merged this pull request in c7429b0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants