Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP Staging] [HybridApp] Fix Plaid failure on iOS on HybridApp #45875

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions ios/NewExpensify.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,11 @@
"$(inherited)",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
PRODUCT_BUNDLE_IDENTIFIER = "";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1648,7 +1652,11 @@
"$(inherited)",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
PRODUCT_BUNDLE_IDENTIFIER = "";
PRODUCT_NAME = "";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
Expand Down Expand Up @@ -1726,7 +1734,11 @@
"$(inherited)",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
PRODUCT_BUNDLE_IDENTIFIER = "";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1871,7 +1883,11 @@
"$(inherited)",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
PRODUCT_BUNDLE_IDENTIFIER = "";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -2008,7 +2024,11 @@
"$(inherited)",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
PRODUCT_BUNDLE_IDENTIFIER = "";
PRODUCT_NAME = "";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
Expand Down Expand Up @@ -2143,7 +2163,11 @@
"$(inherited)",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
PRODUCT_BUNDLE_IDENTIFIER = "";
PRODUCT_NAME = "";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
Expand Down
35 changes: 35 additions & 0 deletions patches/react-native-plaid-link-sdk+11.11.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/node_modules/react-native-plaid-link-sdk/ios/PLKFabricHelpers.h b/node_modules/react-native-plaid-link-sdk/ios/PLKFabricHelpers.h
index cf70d5e..4e34cd2 100644
--- a/node_modules/react-native-plaid-link-sdk/ios/PLKFabricHelpers.h
+++ b/node_modules/react-native-plaid-link-sdk/ios/PLKFabricHelpers.h
@@ -5,8 +5,12 @@
#if __has_include(<rnplaidlink/react_native_plaid_link_sdk-Swift.h>)
#import <rnplaidlink/react_native_plaid_link_sdk-Swift.h>
#else
+#ifdef USE_FRAMEWORKS
+#import <react_native_plaid_link_sdk/react_native_plaid_link_sdk-Swift.h>
+#else
#import <react_native_plaid_link_sdk-Swift.h>
#endif
+#endif

// copied from RCTFollyConvert
folly::dynamic PLKConvertIdToFollyDynamic(id json)
diff --git a/node_modules/react-native-plaid-link-sdk/react-native-plaid-link-sdk.podspec b/node_modules/react-native-plaid-link-sdk/react-native-plaid-link-sdk.podspec
index 7c60081..4a13a3c 100644
--- a/node_modules/react-native-plaid-link-sdk/react-native-plaid-link-sdk.podspec
+++ b/node_modules/react-native-plaid-link-sdk/react-native-plaid-link-sdk.podspec
@@ -21,6 +21,13 @@ Pod::Spec.new do |s|
# we don't want this to be seen by Swift
s.private_header_files = 'ios/PLKFabricHelpers.h'

+ if ENV['USE_FRAMEWORKS'] == '1'
+ s.pod_target_xcconfig = {
+ "OTHER_CFLAGS" => "$(inherited) -DUSE_FRAMEWORKS",
+ "OTHER_CPLUSPLUSFLAGS" => "$(inherited) -DUSE_FRAMEWORKS",
+ }
+ end
+
if fabric_enabled
install_modules_dependencies(s)
else
Loading