Skip to content

Commit ef6777d

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 fbshipit-source-id: a5990c4769456ab756095129851eb4e8dbeda912
1 parent 829a76a commit ef6777d

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
@@ -8288,20 +8288,6 @@ struct facebook::react::NativeAlertManagerArgs {
82888288
public bool operator==(const facebook::react::NativeAlertManagerArgs& other) const;
82898289
}
82908290

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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