Skip to content
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## x.x.x - x.x.x

**Fixes**

- [#2129](https://github.com/stripe/stripe-react-native/pull/2129) Fix iOS build on new arch 0.81 with static linkage

## 0.53.0 - 2025-09-15

**Features**
Expand Down
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ PODS:
- StripePayments (= 24.23.0)
- StripePaymentsUI (= 24.23.0)
- StripeUICore (= 24.23.0)
- stripe-react-native (0.51.0):
- stripe-react-native (0.53.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1712,14 +1712,14 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Stripe (~> 24.23.0)
- stripe-react-native/NewArch (= 0.51.0)
- stripe-react-native/NewArch (= 0.53.0)
- StripeApplePay (~> 24.23.0)
- StripeFinancialConnections (~> 24.23.0)
- StripePayments (~> 24.23.0)
- StripePaymentSheet (~> 24.23.0)
- StripePaymentsUI (~> 24.23.0)
- Yoga
- stripe-react-native/NewArch (0.51.0):
- stripe-react-native/NewArch (0.53.0):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -1746,7 +1746,7 @@ PODS:
- StripePaymentSheet (~> 24.23.0)
- StripePaymentsUI (~> 24.23.0)
- Yoga
- stripe-react-native/Tests (0.51.0):
- stripe-react-native/Tests (0.53.0):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -2110,15 +2110,15 @@ SPEC CHECKSUMS:
RNScreens: 0d4cb9afe052607ad0aa71f645a88bb7c7f2e64c
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Stripe: 2306d32be47f9632942f3385e9c2bad31d6ddcab
stripe-react-native: d95f5aa4e5a2d4a0edc8b3ea06e3a55d33ad31eb
stripe-react-native: 5250f17648f652dd5c570e76bd8b7bca579a238d
StripeApplePay: edf515972406df57bd860d5f00416a552be6a450
StripeCore: ff6173a175acc7c4c25acc7cfabbade717dbc4de
StripeFinancialConnections: 34a90401657135130fe5bfd93db5ac27c001ec65
StripePayments: 9efe7bd14cae1821dba13997e12e070dfb38610b
StripePaymentSheet: 1c04531a7eff2c721736fc7d433ee342a59fae0e
StripePaymentsUI: 1cd35149b88de69c3364b4d1d4bb28c653c7d626
StripeUICore: 539e667170d9c5c86c02a9c63f320d132c7c1b73
Yoga: 9b7fb56e7b08cde60e2153344fa6afbd88e5d99f
Yoga: afd04ff05ebe0121a00c468a8a3c8080221cb14c

PODFILE CHECKSUM: a2ed964678852d4cc306ff4add3e4fa90be77ea6

Expand Down
1 change: 0 additions & 1 deletion ios/NewArch/AddToWalletButtonComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>

#import "RCTFollyConvert.h"
#import "StripeNewArchConversions.h"
#import "StripeSwiftInterop.h"

Expand Down
1 change: 0 additions & 1 deletion ios/NewArch/AddressSheetViewComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>

#import "RCTFollyConvert.h"
#import "StripeNewArchConversions.h"
#import "StripeSwiftInterop.h"

Expand Down
2 changes: 1 addition & 1 deletion ios/NewArch/ApplePayButtonComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>

#import "RCTFollyConvert.h"
#import "StripeNewArchConversions.h"
#import "StripeSwiftInterop.h"

using namespace facebook::react;
Expand Down
1 change: 0 additions & 1 deletion ios/NewArch/AuBECSDebitFormComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>

#import "RCTFollyConvert.h"
#import "StripeNewArchConversions.h"
#import "StripeSwiftInterop.h"

Expand Down
1 change: 0 additions & 1 deletion ios/NewArch/CardFieldComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import "RCTFollyConvert.h"
#import "StripeNewArchConversions.h"
#import "StripeSwiftInterop.h"

Expand Down
3 changes: 1 addition & 2 deletions ios/NewArch/CardFormComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import "RCTFollyConvert.h"
#import "StripeNewArchConversions.h"
#import "StripeSwiftInterop.h"

Expand Down Expand Up @@ -68,7 +67,7 @@ - (void)updateProps:(const facebook::react::Props::Shared &)props
_view.preferredNetworks = convertIntVectorToNSArray(newViewProps.preferredNetworks);

[super updateProps:props oldProps:oldProps];

[_view didSetProps];
}

Expand Down
4 changes: 1 addition & 3 deletions ios/NewArch/EmbeddedPaymentElementViewComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>

#import "RCTFollyConvert.h"
#import "StripeNewArchConversions.h"
#import "StripeSwiftInterop.h"

using namespace facebook::react;
Expand Down Expand Up @@ -71,8 +71,6 @@ - (void)prepareForRecycle
[self prepareView];
}



@end

Class<RCTComponentViewProtocol> EmbeddedPaymentElementViewCls(void)
Expand Down
2 changes: 1 addition & 1 deletion ios/NewArch/StripeContainerComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>

#import "RCTFollyConvert.h"
#import "StripeNewArchConversions.h"
#import "StripeSwiftInterop.h"

using namespace facebook::react;
Expand Down
14 changes: 14 additions & 0 deletions ios/NewArch/StripeNewArchConversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
#include <folly/dynamic.h>
#include <vector>

// This file was moved in RN 0.81. This includes it differently depending on linkage
// and falls back to the old file for older RN versions.
#if __has_include(<react/utils/FollyConvert.h>)
// static libs / header maps (no use_frameworks!)
#import <react/utils/FollyConvert.h>
#elif __has_include("FollyConvert.h")
/// `use_frameworks! :linkage => :static` users will need to import FollyConvert this way
#import "FollyConvert.h"
#elif __has_include("RCTFollyConvert.h")
#import "RCTFollyConvert.h"
#else
#error "FollyConvert.h not found. Ensure React-utils & RCT-Folly pods are installed."
#endif

NS_ASSUME_NONNULL_BEGIN

namespace stripe::react {
Expand Down
15 changes: 9 additions & 6 deletions ios/NewArch/StripeNewArchConversions.mm
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
#import "StripeNewArchConversions.h"

#import <Foundation/Foundation.h>
#import <React/RCTConversions.h>
#import "RCTFollyConvert.h"

namespace stripe::react {

NSArray<NSString *> * convertStringVectorToNSArray(const std::vector<std::string> &values) {
NSArray<NSString *> *convertStringVectorToNSArray(const std::vector<std::string> &values)
{
NSMutableArray<NSString *> *result = [[NSMutableArray alloc] initWithCapacity:values.size()];
for (const auto &value : values) {
[result addObject:RCTNSStringFromString(value)];
}
return result;
}

NSArray<NSNumber *> * convertIntVectorToNSArray(const std::vector<int> &values) {
NSArray<NSNumber *> *convertIntVectorToNSArray(const std::vector<int> &values)
{
NSMutableArray<NSNumber *> *result = [[NSMutableArray alloc] initWithCapacity:values.size()];
for (int value : values) {
[result addObject:@(value)];
}
return result;
}

NSDictionary * _Nullable convertFollyDynamicToNSDictionaryOrNil(const folly::dynamic &dyn)
NSDictionary *_Nullable convertFollyDynamicToNSDictionaryOrNil(const folly::dynamic &dyn)
{
switch (dyn.type()) {
case folly::dynamic::OBJECT: {
Expand All @@ -39,9 +42,9 @@
}
}

NSDictionary * convertFollyDynamicToNSDictionary(const folly::dynamic &dyn)
NSDictionary *convertFollyDynamicToNSDictionary(const folly::dynamic &dyn)
{
return convertFollyDynamicToNSDictionaryOrNil(dyn) ?: [NSDictionary new];
}

}
} // namespace stripe::react
Loading