Skip to content

Commit

Permalink
fix plaid failure on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
staszekscp committed Jul 22, 2024
1 parent 50ebe95 commit e125aec
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 6 deletions.
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

0 comments on commit e125aec

Please sign in to comment.