Repository navigation
Commit c7429b0
Fix nullability annotations in iOS networking headers (#59240)
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.
Pull Request resolved: #59240
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.
Snapshot completion (local update):
- Added the four generated ReactApple API snapshots from the CI artifact for PR head `151876277233befdbe7c0d9818039aa08ad15d1c`; verified the artifact SHA-256 against GitHub metadata. Imported headers and all prior snapshots match that revision. No header implementation or dependency changes.
- The repository `validate_snapshots` comparison passes for all 12 generated views. `arc lint -a` reports no lint issues.
- Full local `buck2 run fbsource//xplat/js/react-native-github/scripts/cxx-api:api-snapshot` could not regenerate: the existing codegen environment lacks `tinyglobby`. The updated files are exact generated CI output, not hand-edited snapshots.
Reviewed By: christophpurrer
Differential Revision: D126472293
Pulled By: javache
fbshipit-source-id: 0c4f87e4d6f8c57f89f9e914d1c44a60802df1b61 parent 7b6516e commit c7429b0
6 files changed
Lines changed: 20 additions & 11 deletions
File tree
- packages/react-native
- Libraries/Network
- React/Base
- scripts/cxx-api/api-snapshots
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | | - | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | | - | |
| 1413 | + | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | 1416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
1456 | | - | |
| 1456 | + | |
1457 | 1457 | | |
1458 | 1458 | | |
1459 | 1459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | | - | |
| 1413 | + | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | 1416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | | - | |
| 1413 | + | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | 1416 | | |
| |||
0 commit comments