Skip to content

Commit 8923457

Browse files
coadometa-codesync[bot]
authored andcommitted
Exclude iOS-specific symbols from the ReactAndroid C++ API snapshot (#56250)
Summary: Pull Request resolved: #56250 Excludes iOS-specific symbols from the ReactAndroid C++ API snapshot. The snapshot contains iOS native modules CxxSpec templates, their data structs, and bridging structs that have no relevance on Android. These symbols leaked because the Android codegen generates CxxSpec templates for ALL JavaScript module specs regardless of platform. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D98480080
1 parent 2da40c0 commit 8923457

3 files changed

Lines changed: 1 addition & 204 deletions

File tree

scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -8287,20 +8287,6 @@ struct facebook::react::NativeAlertManagerArgs {
82878287
public bool operator==(const facebook::react::NativeAlertManagerArgs& other) const;
82888288
}
82898289

8290-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
8291-
struct facebook::react::NativePushNotificationManagerIOSNotification {
8292-
public P0 alertTitle;
8293-
public P1 alertBody;
8294-
public P2 userInfo;
8295-
public P3 category;
8296-
public P4 fireDate;
8297-
public P5 fireIntervalSeconds;
8298-
public P6 applicationIconBadgeNumber;
8299-
public P7 isSilent;
8300-
public P8 soundName;
8301-
public bool operator==(const facebook::react::NativePushNotificationManagerIOSNotification& other) const;
8302-
}
8303-
83048290
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
83058291
struct facebook::react::NativeExceptionsManagerExceptionData {
83068292
public P0 message;
@@ -8314,19 +8300,6 @@ struct facebook::react::NativeExceptionsManagerExceptionData {
83148300
public bool operator==(const facebook::react::NativeExceptionsManagerExceptionData& other) const;
83158301
}
83168302

8317-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
8318-
struct facebook::react::NativePlatformConstantsIOSPlatformConstantsIOS {
8319-
public P0 isTesting;
8320-
public P1 isDisableAnimations;
8321-
public P2 reactNativeVersion;
8322-
public P3 forceTouchAvailable;
8323-
public P4 osVersion;
8324-
public P5 systemName;
8325-
public P6 interfaceIdiom;
8326-
public P7 isMacCatalyst;
8327-
public bool operator==(const facebook::react::NativePlatformConstantsIOSPlatformConstantsIOS& other) const;
8328-
}
8329-
83308303
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
83318304
struct facebook::react::NativeDialogManagerAndroidDialogOptions {
83328305
public P0 title;
@@ -8477,14 +8450,6 @@ struct facebook::react::NativeMutationObserverNativeMutationObserverObserveOptio
84778450
public bool operator==(const facebook::react::NativeMutationObserverNativeMutationObserverObserveOptions& other) const;
84788451
}
84798452

8480-
template <typename P0, typename P1, typename P2>
8481-
struct facebook::react::NativePushNotificationManagerIOSPermissions {
8482-
public P0 alert;
8483-
public P1 badge;
8484-
public P2 sound;
8485-
public bool operator==(const facebook::react::NativePushNotificationManagerIOSPermissions& other) const;
8486-
}
8487-
84888453
template <typename P0, typename P1>
84898454
struct facebook::react::NativeAnimatedModuleEventMapping {
84908455
public P0 nativeEventPath;
@@ -8809,24 +8774,12 @@ class facebook::react::NativeImageLoaderAndroidCxxSpec : public facebook::react:
88098774
public static constexpr std::string_view kModuleName;
88108775
}
88118776

8812-
template <typename T>
8813-
class facebook::react::NativeImageLoaderIOSCxxSpec : public facebook::react::TurboModule {
8814-
protected NativeImageLoaderIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8815-
public static constexpr std::string_view kModuleName;
8816-
}
8817-
88188777
template <typename T>
88198778
class facebook::react::NativeImageStoreAndroidCxxSpec : public facebook::react::TurboModule {
88208779
protected NativeImageStoreAndroidCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
88218780
public static constexpr std::string_view kModuleName;
88228781
}
88238782

8824-
template <typename T>
8825-
class facebook::react::NativeImageStoreIOSCxxSpec : public facebook::react::TurboModule {
8826-
protected NativeImageStoreIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8827-
public static constexpr std::string_view kModuleName;
8828-
}
8829-
88308783
template <typename T>
88318784
class facebook::react::NativeIntentAndroidCxxSpec : public facebook::react::TurboModule {
88328785
protected NativeIntentAndroidCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -8887,12 +8840,6 @@ class facebook::react::NativeNetworkingAndroidCxxSpec : public facebook::react::
88878840
public static constexpr std::string_view kModuleName;
88888841
}
88898842

8890-
template <typename T>
8891-
class facebook::react::NativeNetworkingIOSCxxSpec : public facebook::react::TurboModule {
8892-
protected NativeNetworkingIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8893-
public static constexpr std::string_view kModuleName;
8894-
}
8895-
88968843
template <typename T>
88978844
class facebook::react::NativePerformanceCxxSpec : public facebook::react::TurboModule {
88988845
protected NativePerformanceCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -8911,18 +8858,6 @@ class facebook::react::NativePlatformConstantsAndroidCxxSpec : public facebook::
89118858
public static constexpr std::string_view kModuleName;
89128859
}
89138860

8914-
template <typename T>
8915-
class facebook::react::NativePlatformConstantsIOSCxxSpec : public facebook::react::TurboModule {
8916-
protected NativePlatformConstantsIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8917-
public static constexpr std::string_view kModuleName;
8918-
}
8919-
8920-
template <typename T>
8921-
class facebook::react::NativePushNotificationManagerIOSCxxSpec : public facebook::react::TurboModule {
8922-
protected NativePushNotificationManagerIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8923-
public static constexpr std::string_view kModuleName;
8924-
}
8925-
89268861
template <typename T>
89278862
class facebook::react::NativeReactDevToolsRuntimeSettingsModuleCxxSpec : public facebook::react::TurboModule {
89288863
protected NativeReactDevToolsRuntimeSettingsModuleCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -8977,12 +8912,6 @@ class facebook::react::NativeStatusBarManagerAndroidCxxSpec : public facebook::r
89778912
public static constexpr std::string_view kModuleName;
89788913
}
89798914

8980-
template <typename T>
8981-
class facebook::react::NativeStatusBarManagerIOSCxxSpec : public facebook::react::TurboModule {
8982-
protected NativeStatusBarManagerIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8983-
public static constexpr std::string_view kModuleName;
8984-
}
8985-
89868915
template <typename T>
89878916
class facebook::react::NativeTimingCxxSpec : public facebook::react::TurboModule {
89888917
protected NativeTimingCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -9381,47 +9310,6 @@ struct facebook::react::NativePlatformConstantsAndroidReactNativeVersionAndroidB
93819310
public static std::optional<facebook::jsi::String> prereleaseToJs(facebook::jsi::Runtime& rt, decltype(types.prerelease) value);
93829311
}
93839312

9384-
template <typename T>
9385-
struct facebook::react::NativePlatformConstantsIOSPlatformConstantsIOSBridging {
9386-
public static T fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Object& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9387-
public static T types;
9388-
public static bool forceTouchAvailableToJs(facebook::jsi::Runtime& rt, decltype(types.forceTouchAvailable) value);
9389-
public static bool isDisableAnimationsToJs(facebook::jsi::Runtime& rt, decltype(types.isDisableAnimations) value);
9390-
public static bool isMacCatalystToJs(facebook::jsi::Runtime& rt, decltype(types.isMacCatalyst) value);
9391-
public static bool isTestingToJs(facebook::jsi::Runtime& rt, decltype(types.isTesting) value);
9392-
public static facebook::jsi::Object reactNativeVersionToJs(facebook::jsi::Runtime& rt, decltype(types.reactNativeVersion) value);
9393-
public static facebook::jsi::Object toJs(facebook::jsi::Runtime& rt, const T& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9394-
public static facebook::jsi::String interfaceIdiomToJs(facebook::jsi::Runtime& rt, decltype(types.interfaceIdiom) value);
9395-
public static facebook::jsi::String osVersionToJs(facebook::jsi::Runtime& rt, decltype(types.osVersion) value);
9396-
public static facebook::jsi::String systemNameToJs(facebook::jsi::Runtime& rt, decltype(types.systemName) value);
9397-
}
9398-
9399-
template <typename T>
9400-
struct facebook::react::NativePushNotificationManagerIOSNotificationBridging {
9401-
public static T fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Object& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9402-
public static T types;
9403-
public static facebook::jsi::Object toJs(facebook::jsi::Runtime& rt, const T& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9404-
public static std::optional<bool> isSilentToJs(facebook::jsi::Runtime& rt, decltype(types.isSilent) value);
9405-
public static std::optional<double> applicationIconBadgeNumberToJs(facebook::jsi::Runtime& rt, decltype(types.applicationIconBadgeNumber) value);
9406-
public static std::optional<double> fireDateToJs(facebook::jsi::Runtime& rt, decltype(types.fireDate) value);
9407-
public static std::optional<double> fireIntervalSecondsToJs(facebook::jsi::Runtime& rt, decltype(types.fireIntervalSeconds) value);
9408-
public static std::optional<facebook::jsi::Object> userInfoToJs(facebook::jsi::Runtime& rt, decltype(types.userInfo) value);
9409-
public static std::optional<facebook::jsi::String> alertBodyToJs(facebook::jsi::Runtime& rt, decltype(types.alertBody) value);
9410-
public static std::optional<facebook::jsi::String> alertTitleToJs(facebook::jsi::Runtime& rt, decltype(types.alertTitle) value);
9411-
public static std::optional<facebook::jsi::String> categoryToJs(facebook::jsi::Runtime& rt, decltype(types.category) value);
9412-
public static std::optional<facebook::jsi::String> soundNameToJs(facebook::jsi::Runtime& rt, decltype(types.soundName) value);
9413-
}
9414-
9415-
template <typename T>
9416-
struct facebook::react::NativePushNotificationManagerIOSPermissionsBridging {
9417-
public static T fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Object& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9418-
public static T types;
9419-
public static bool alertToJs(facebook::jsi::Runtime& rt, decltype(types.alert) value);
9420-
public static bool badgeToJs(facebook::jsi::Runtime& rt, decltype(types.badge) value);
9421-
public static bool soundToJs(facebook::jsi::Runtime& rt, decltype(types.sound) value);
9422-
public static facebook::jsi::Object toJs(facebook::jsi::Runtime& rt, const T& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9423-
}
9424-
94259313
template <typename T>
94269314
struct facebook::react::NativeReactDevToolsRuntimeSettingsModulePartialReloadAndProfileConfigBridging {
94279315
public static T fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Object& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);

scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -8278,20 +8278,6 @@ struct facebook::react::NativeAlertManagerArgs {
82788278
public bool operator==(const facebook::react::NativeAlertManagerArgs& other) const;
82798279
}
82808280

8281-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
8282-
struct facebook::react::NativePushNotificationManagerIOSNotification {
8283-
public P0 alertTitle;
8284-
public P1 alertBody;
8285-
public P2 userInfo;
8286-
public P3 category;
8287-
public P4 fireDate;
8288-
public P5 fireIntervalSeconds;
8289-
public P6 applicationIconBadgeNumber;
8290-
public P7 isSilent;
8291-
public P8 soundName;
8292-
public bool operator==(const facebook::react::NativePushNotificationManagerIOSNotification& other) const;
8293-
}
8294-
82958281
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
82968282
struct facebook::react::NativeExceptionsManagerExceptionData {
82978283
public P0 message;
@@ -8305,19 +8291,6 @@ struct facebook::react::NativeExceptionsManagerExceptionData {
83058291
public bool operator==(const facebook::react::NativeExceptionsManagerExceptionData& other) const;
83068292
}
83078293

8308-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
8309-
struct facebook::react::NativePlatformConstantsIOSPlatformConstantsIOS {
8310-
public P0 isTesting;
8311-
public P1 isDisableAnimations;
8312-
public P2 reactNativeVersion;
8313-
public P3 forceTouchAvailable;
8314-
public P4 osVersion;
8315-
public P5 systemName;
8316-
public P6 interfaceIdiom;
8317-
public P7 isMacCatalyst;
8318-
public bool operator==(const facebook::react::NativePlatformConstantsIOSPlatformConstantsIOS& other) const;
8319-
}
8320-
83218294
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
83228295
struct facebook::react::NativeDialogManagerAndroidDialogOptions {
83238296
public P0 title;
@@ -8468,14 +8441,6 @@ struct facebook::react::NativeMutationObserverNativeMutationObserverObserveOptio
84688441
public bool operator==(const facebook::react::NativeMutationObserverNativeMutationObserverObserveOptions& other) const;
84698442
}
84708443

8471-
template <typename P0, typename P1, typename P2>
8472-
struct facebook::react::NativePushNotificationManagerIOSPermissions {
8473-
public P0 alert;
8474-
public P1 badge;
8475-
public P2 sound;
8476-
public bool operator==(const facebook::react::NativePushNotificationManagerIOSPermissions& other) const;
8477-
}
8478-
84798444
template <typename P0, typename P1>
84808445
struct facebook::react::NativeAnimatedModuleEventMapping {
84818446
public P0 nativeEventPath;
@@ -8800,24 +8765,12 @@ class facebook::react::NativeImageLoaderAndroidCxxSpec : public facebook::react:
88008765
public static constexpr std::string_view kModuleName;
88018766
}
88028767

8803-
template <typename T>
8804-
class facebook::react::NativeImageLoaderIOSCxxSpec : public facebook::react::TurboModule {
8805-
protected NativeImageLoaderIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8806-
public static constexpr std::string_view kModuleName;
8807-
}
8808-
88098768
template <typename T>
88108769
class facebook::react::NativeImageStoreAndroidCxxSpec : public facebook::react::TurboModule {
88118770
protected NativeImageStoreAndroidCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
88128771
public static constexpr std::string_view kModuleName;
88138772
}
88148773

8815-
template <typename T>
8816-
class facebook::react::NativeImageStoreIOSCxxSpec : public facebook::react::TurboModule {
8817-
protected NativeImageStoreIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8818-
public static constexpr std::string_view kModuleName;
8819-
}
8820-
88218774
template <typename T>
88228775
class facebook::react::NativeIntentAndroidCxxSpec : public facebook::react::TurboModule {
88238776
protected NativeIntentAndroidCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -8878,12 +8831,6 @@ class facebook::react::NativeNetworkingAndroidCxxSpec : public facebook::react::
88788831
public static constexpr std::string_view kModuleName;
88798832
}
88808833

8881-
template <typename T>
8882-
class facebook::react::NativeNetworkingIOSCxxSpec : public facebook::react::TurboModule {
8883-
protected NativeNetworkingIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8884-
public static constexpr std::string_view kModuleName;
8885-
}
8886-
88878834
template <typename T>
88888835
class facebook::react::NativePerformanceCxxSpec : public facebook::react::TurboModule {
88898836
protected NativePerformanceCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -8902,18 +8849,6 @@ class facebook::react::NativePlatformConstantsAndroidCxxSpec : public facebook::
89028849
public static constexpr std::string_view kModuleName;
89038850
}
89048851

8905-
template <typename T>
8906-
class facebook::react::NativePlatformConstantsIOSCxxSpec : public facebook::react::TurboModule {
8907-
protected NativePlatformConstantsIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8908-
public static constexpr std::string_view kModuleName;
8909-
}
8910-
8911-
template <typename T>
8912-
class facebook::react::NativePushNotificationManagerIOSCxxSpec : public facebook::react::TurboModule {
8913-
protected NativePushNotificationManagerIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8914-
public static constexpr std::string_view kModuleName;
8915-
}
8916-
89178852
template <typename T>
89188853
class facebook::react::NativeReactDevToolsRuntimeSettingsModuleCxxSpec : public facebook::react::TurboModule {
89198854
protected NativeReactDevToolsRuntimeSettingsModuleCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -8968,12 +8903,6 @@ class facebook::react::NativeStatusBarManagerAndroidCxxSpec : public facebook::r
89688903
public static constexpr std::string_view kModuleName;
89698904
}
89708905

8971-
template <typename T>
8972-
class facebook::react::NativeStatusBarManagerIOSCxxSpec : public facebook::react::TurboModule {
8973-
protected NativeStatusBarManagerIOSCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8974-
public static constexpr std::string_view kModuleName;
8975-
}
8976-
89778906
template <typename T>
89788907
class facebook::react::NativeTimingCxxSpec : public facebook::react::TurboModule {
89798908
protected NativeTimingCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -9242,27 +9171,6 @@ struct facebook::react::NativePlatformConstantsAndroidReactNativeVersionAndroidB
92429171
public static facebook::jsi::Object toJs(facebook::jsi::Runtime& rt, const T& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
92439172
}
92449173

9245-
template <typename T>
9246-
struct facebook::react::NativePlatformConstantsIOSPlatformConstantsIOSBridging {
9247-
public static T fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Object& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9248-
public static T types;
9249-
public static facebook::jsi::Object toJs(facebook::jsi::Runtime& rt, const T& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9250-
}
9251-
9252-
template <typename T>
9253-
struct facebook::react::NativePushNotificationManagerIOSNotificationBridging {
9254-
public static T fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Object& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9255-
public static T types;
9256-
public static facebook::jsi::Object toJs(facebook::jsi::Runtime& rt, const T& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9257-
}
9258-
9259-
template <typename T>
9260-
struct facebook::react::NativePushNotificationManagerIOSPermissionsBridging {
9261-
public static T fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Object& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9262-
public static T types;
9263-
public static facebook::jsi::Object toJs(facebook::jsi::Runtime& rt, const T& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
9264-
}
9265-
92669174
template <typename T>
92679175
struct facebook::react::NativeReactDevToolsRuntimeSettingsModulePartialReloadAndProfileConfigBridging {
92689176
public static T fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Object& value, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);

scripts/cxx-api/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ platforms:
5151
- "*/platform/ios/*"
5252
exclude_symbols:
5353
- "InputAccessory"
54+
- "IOS"
5455
input_filter: false
5556
definitions:
5657
RN_SERIALIZABLE_STATE: 1

0 commit comments

Comments
 (0)