Skip to content

Commit 1215b82

Browse files
Juanita-Dashclaude
andcommitted
Revert upstream Android symbol refs + regenerate Podfile.lock
Bridge code calls into the upstream `com.shopify.checkoutsheetkit` library (`ShopifyCheckoutSheetKit`, `CheckoutSheetKitDialog`, `CheckoutSheetKitException`) since those artifacts have not been republished under the new name yet. Also regenerate sample/ios/Podfile.lock for the renamed bridge pod (`RNShopifyCheckoutSheetKit` -> `RNShopifyCheckoutKit`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 68e4b22 commit 1215b82

5 files changed

Lines changed: 48 additions & 48 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Keep Checkout Sheet Kit classes
2-
-keep class com.shopify.checkoutkit.** { *; }
2+
-keep class com.shopify.checkoutsheetkit.** { *; }

modules/@shopify/checkout-kit/android/src/main/java/com/shopify/reactnative/checkoutkit/CustomCheckoutEventProcessor.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ of this software and associated documentation files (the "Software"), to deal
3030
import androidx.annotation.NonNull;
3131
import androidx.annotation.Nullable;
3232

33-
import com.shopify.checkoutkit.*;
33+
import com.shopify.checkoutsheetkit.*;
3434
import com.facebook.react.modules.core.DeviceEventManagerModule;
3535
import com.facebook.react.bridge.WritableNativeMap;
3636
import com.facebook.react.bridge.ReactApplicationContext;
37-
import com.shopify.checkoutkit.pixelevents.PixelEvent;
38-
import com.shopify.checkoutkit.lifecycleevents.CheckoutCompletedEvent;
37+
import com.shopify.checkoutsheetkit.pixelevents.PixelEvent;
38+
import com.shopify.checkoutsheetkit.lifecycleevents.CheckoutCompletedEvent;
3939
import com.fasterxml.jackson.databind.ObjectMapper;
4040
import java.io.IOException;
4141
import java.util.HashMap;
@@ -94,7 +94,7 @@ public void onGeolocationPermissionsShowPrompt(@NonNull String origin,
9494
event.put("origin", origin);
9595
sendEventWithStringData("geolocationRequest", mapper.writeValueAsString(event));
9696
} catch (IOException e) {
97-
Log.e("ShopifyCheckoutKit", "Error emitting \"geolocationRequest\" event", e);
97+
Log.e("ShopifyCheckoutSheetKit", "Error emitting \"geolocationRequest\" event", e);
9898
}
9999
}
100100

@@ -113,7 +113,7 @@ public void onWebPixelEvent(@NonNull PixelEvent event) {
113113
String data = mapper.writeValueAsString(event);
114114
sendEventWithStringData("pixel", data);
115115
} catch (IOException e) {
116-
Log.e("ShopifyCheckoutKit", "Error processing pixel event", e);
116+
Log.e("ShopifyCheckoutSheetKit", "Error processing pixel event", e);
117117
}
118118
}
119119

@@ -123,7 +123,7 @@ public void onCheckoutFailed(CheckoutException checkoutError) {
123123
String data = mapper.writeValueAsString(populateErrorDetails(checkoutError));
124124
sendEventWithStringData("error", data);
125125
} catch (IOException e) {
126-
Log.e("ShopifyCheckoutKit", "Error processing checkout failed event", e);
126+
Log.e("ShopifyCheckoutSheetKit", "Error processing checkout failed event", e);
127127
}
128128
}
129129

@@ -138,7 +138,7 @@ public void onCheckoutCompleted(@NonNull CheckoutCompletedEvent event) {
138138
String data = mapper.writeValueAsString(event);
139139
sendEventWithStringData("completed", data);
140140
} catch (IOException e) {
141-
Log.e("ShopifyCheckoutKit", "Error processing completed event", e);
141+
Log.e("ShopifyCheckoutSheetKit", "Error processing completed event", e);
142142
}
143143
}
144144

@@ -167,7 +167,7 @@ private String getErrorTypeName(CheckoutException error) {
167167
return "CheckoutHTTPError";
168168
} else if (error instanceof ConfigurationException) {
169169
return "ConfigurationError";
170-
} else if (error instanceof CheckoutKitException) {
170+
} else if (error instanceof CheckoutSheetKitException) {
171171
return "InternalError";
172172
} else {
173173
return "UnknownError";

modules/@shopify/checkout-kit/android/src/main/java/com/shopify/reactnative/checkoutkit/ShopifyCheckoutKitModule.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ of this software and associated documentation files (the "Software"), to deal
3535
import com.facebook.react.bridge.ReadableMap;
3636
import com.facebook.react.bridge.WritableMap;
3737
import com.shopify.checkoutkit.NativeShopifyCheckoutKitSpec;
38-
import com.shopify.checkoutkit.*;
38+
import com.shopify.checkoutsheetkit.*;
3939

4040
import java.util.HashMap;
4141
import java.util.Map;
@@ -47,7 +47,7 @@ public class ShopifyCheckoutKitModule extends NativeShopifyCheckoutKitSpec {
4747

4848
private final ReactApplicationContext reactContext;
4949

50-
private CheckoutKitDialog checkoutSheet;
50+
private CheckoutSheetKitDialog checkoutSheet;
5151

5252
private CustomCheckoutEventProcessor checkoutEventProcessor;
5353

@@ -56,7 +56,7 @@ public ShopifyCheckoutKitModule(ReactApplicationContext reactContext) {
5656

5757
this.reactContext = reactContext;
5858

59-
ShopifyCheckoutKit.configure(configuration -> {
59+
ShopifyCheckoutSheetKit.configure(configuration -> {
6060
configuration.setPlatform(Platform.REACT_NATIVE);
6161
checkoutConfig = configuration;
6262
});
@@ -65,7 +65,7 @@ public ShopifyCheckoutKitModule(ReactApplicationContext reactContext) {
6565
@Override
6666
protected Map<String, Object> getTypedExportedConstants() {
6767
final Map<String, Object> constants = new HashMap<>();
68-
constants.put("version", ShopifyCheckoutKit.version);
68+
constants.put("version", ShopifyCheckoutSheetKit.version);
6969
return constants;
7070
}
7171

@@ -85,7 +85,7 @@ public void present(String checkoutURL) {
8585
if (currentActivity instanceof ComponentActivity) {
8686
checkoutEventProcessor = new CustomCheckoutEventProcessor(currentActivity, this.reactContext);
8787
currentActivity.runOnUiThread(() -> {
88-
checkoutSheet = ShopifyCheckoutKit.present(checkoutURL, (ComponentActivity) currentActivity,
88+
checkoutSheet = ShopifyCheckoutSheetKit.present(checkoutURL, (ComponentActivity) currentActivity,
8989
checkoutEventProcessor);
9090
});
9191
}
@@ -104,13 +104,13 @@ public void preload(String checkoutURL) {
104104
Activity currentActivity = getCurrentActivity();
105105

106106
if (currentActivity instanceof ComponentActivity) {
107-
ShopifyCheckoutKit.preload(checkoutURL, (ComponentActivity) currentActivity);
107+
ShopifyCheckoutSheetKit.preload(checkoutURL, (ComponentActivity) currentActivity);
108108
}
109109
}
110110

111111
@ReactMethod
112112
public void invalidateCache() {
113-
ShopifyCheckoutKit.invalidate();
113+
ShopifyCheckoutSheetKit.invalidate();
114114
}
115115

116116
@ReactMethod(isBlockingSynchronousMethod = true)
@@ -128,7 +128,7 @@ public WritableMap getConfig() {
128128
public void setConfig(ReadableMap config) {
129129
Context context = getReactApplicationContext();
130130

131-
ShopifyCheckoutKit.configure(configuration -> {
131+
ShopifyCheckoutSheetKit.configure(configuration -> {
132132
if (config.hasKey("preloading")) {
133133
configuration.setPreloading(new Preloading(config.getBoolean("preloading")));
134134
}

sample/android/app/src/test/java/com/shopify/checkoutkitreactnative/ShopifyCheckoutKitModuleTest.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
import com.facebook.react.bridge.ReactApplicationContext;
99
import com.facebook.react.bridge.WritableMap;
1010
import com.facebook.react.modules.core.DeviceEventManagerModule;
11-
import com.shopify.checkoutkit.CheckoutException;
12-
import com.shopify.checkoutkit.CheckoutExpiredException;
13-
import com.shopify.checkoutkit.CheckoutKitException;
14-
import com.shopify.checkoutkit.ClientException;
15-
import com.shopify.checkoutkit.ConfigurationException;
16-
import com.shopify.checkoutkit.HttpException;
17-
import com.shopify.checkoutkit.ShopifyCheckoutKit;
18-
import com.shopify.checkoutkit.Preloading;
19-
import com.shopify.checkoutkit.ColorScheme;
20-
import com.shopify.checkoutkit.LogLevel;
21-
import com.shopify.checkoutkit.pixelevents.PixelEvent;
22-
import com.shopify.checkoutkit.pixelevents.StandardPixelEvent;
23-
import com.shopify.checkoutkit.pixelevents.CustomPixelEvent;
24-
import com.shopify.checkoutkit.pixelevents.EventType;
25-
import com.shopify.checkoutkit.lifecycleevents.CheckoutCompletedEvent;
26-
import com.shopify.checkoutkit.lifecycleevents.OrderDetails;
27-
import com.shopify.checkoutkit.lifecycleevents.CartInfo;
28-
import com.shopify.checkoutkit.lifecycleevents.Price;
11+
import com.shopify.checkoutsheetkit.CheckoutException;
12+
import com.shopify.checkoutsheetkit.CheckoutExpiredException;
13+
import com.shopify.checkoutsheetkit.CheckoutSheetKitException;
14+
import com.shopify.checkoutsheetkit.ClientException;
15+
import com.shopify.checkoutsheetkit.ConfigurationException;
16+
import com.shopify.checkoutsheetkit.HttpException;
17+
import com.shopify.checkoutsheetkit.ShopifyCheckoutSheetKit;
18+
import com.shopify.checkoutsheetkit.Preloading;
19+
import com.shopify.checkoutsheetkit.ColorScheme;
20+
import com.shopify.checkoutsheetkit.LogLevel;
21+
import com.shopify.checkoutsheetkit.pixelevents.PixelEvent;
22+
import com.shopify.checkoutsheetkit.pixelevents.StandardPixelEvent;
23+
import com.shopify.checkoutsheetkit.pixelevents.CustomPixelEvent;
24+
import com.shopify.checkoutsheetkit.pixelevents.EventType;
25+
import com.shopify.checkoutsheetkit.lifecycleevents.CheckoutCompletedEvent;
26+
import com.shopify.checkoutsheetkit.lifecycleevents.OrderDetails;
27+
import com.shopify.checkoutsheetkit.lifecycleevents.CartInfo;
28+
import com.shopify.checkoutsheetkit.lifecycleevents.Price;
2929
import com.shopify.reactnative.checkoutkit.ShopifyCheckoutKitModule;
3030
import com.shopify.reactnative.checkoutkit.CustomCheckoutEventProcessor;
3131

@@ -110,7 +110,7 @@ public void tearDown() {
110110
}
111111

112112
// Reset configuration to initial state after each test
113-
ShopifyCheckoutKit.configure(configuration -> {
113+
ShopifyCheckoutSheetKit.configure(configuration -> {
114114
configuration.setPreloading(initialPreloading);
115115
configuration.setColorScheme(initialColorScheme);
116116
configuration.setLogLevel(initialLogLevel);
@@ -124,29 +124,29 @@ public void tearDown() {
124124

125125
@Test
126126
public void testCanPresentCheckout() {
127-
try (MockedStatic<ShopifyCheckoutKit> mockedShopifyCheckoutKit = Mockito
128-
.mockStatic(ShopifyCheckoutKit.class)) {
127+
try (MockedStatic<ShopifyCheckoutSheetKit> mockedShopifyCheckoutKit = Mockito
128+
.mockStatic(ShopifyCheckoutSheetKit.class)) {
129129
String checkoutUrl = "https://shopify.com";
130130
shopifyCheckoutKitModule.present(checkoutUrl);
131131

132132
verify(mockComponentActivity).runOnUiThread(runnableCaptor.capture());
133133
runnableCaptor.getValue().run();
134134

135135
mockedShopifyCheckoutKit.verify(() -> {
136-
ShopifyCheckoutKit.present(eq(checkoutUrl), any(), any());
136+
ShopifyCheckoutSheetKit.present(eq(checkoutUrl), any(), any());
137137
});
138138
}
139139
}
140140

141141
@Test
142142
public void testCanPreloadCheckout() {
143-
try (MockedStatic<ShopifyCheckoutKit> mockedShopifyCheckoutKit = Mockito
144-
.mockStatic(ShopifyCheckoutKit.class)) {
143+
try (MockedStatic<ShopifyCheckoutSheetKit> mockedShopifyCheckoutKit = Mockito
144+
.mockStatic(ShopifyCheckoutSheetKit.class)) {
145145
String checkoutUrl = "https://shopify.com";
146146
shopifyCheckoutKitModule.preload(checkoutUrl);
147147

148148
mockedShopifyCheckoutKit.verify(() -> {
149-
ShopifyCheckoutKit.preload(eq(checkoutUrl), any());
149+
ShopifyCheckoutSheetKit.preload(eq(checkoutUrl), any());
150150
});
151151
}
152152
}

sample/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ PODS:
25782578
- ReactCommon/turbomodule/core
25792579
- SocketRocket
25802580
- Yoga
2581-
- RNShopifyCheckoutSheetKit (4.0.0):
2581+
- RNShopifyCheckoutKit (4.0.0):
25822582
- boost
25832583
- DoubleConversion
25842584
- fast_float
@@ -2730,7 +2730,7 @@ DEPENDENCIES:
27302730
- RNGestureHandler (from `../../node_modules/react-native-gesture-handler`)
27312731
- RNReanimated (from `../../node_modules/react-native-reanimated`)
27322732
- RNScreens (from `../../node_modules/react-native-screens`)
2733-
- "RNShopifyCheckoutSheetKit (from `../../modules/@shopify/checkout-sheet-kit`)"
2733+
- "RNShopifyCheckoutKit (from `../../modules/@shopify/checkout-kit`)"
27342734
- RNVectorIcons (from `../../node_modules/react-native-vector-icons`)
27352735
- SocketRocket (~> 0.7.1)
27362736
- Yoga (from `../../node_modules/react-native/ReactCommon/yoga`)
@@ -2906,8 +2906,8 @@ EXTERNAL SOURCES:
29062906
:path: "../../node_modules/react-native-reanimated"
29072907
RNScreens:
29082908
:path: "../../node_modules/react-native-screens"
2909-
RNShopifyCheckoutSheetKit:
2910-
:path: "../../modules/@shopify/checkout-sheet-kit"
2909+
RNShopifyCheckoutKit:
2910+
:path: "../../modules/@shopify/checkout-kit"
29112911
RNVectorIcons:
29122912
:path: "../../node_modules/react-native-vector-icons"
29132913
Yoga:
@@ -2996,12 +2996,12 @@ SPEC CHECKSUMS:
29962996
RNGestureHandler: eeb622199ef1fb3a076243131095df1c797072f0
29972997
RNReanimated: 237d420b7bb4378ef1dacc7d7a5c674fddb4b5d2
29982998
RNScreens: 3fc29af06302e1f1c18a7829fe57cbc2c0259912
2999-
RNShopifyCheckoutSheetKit: 2a8c97d7780466538843d4cb1368c7ed76a33689
2999+
RNShopifyCheckoutKit: 68b0b757093fdc6fc26282d4482cf7806c126359
30003000
RNVectorIcons: be4d047a76ad307ffe54732208fb0498fcb8477f
30013001
ShopifyCheckoutSheetKit: 5253ca4da4c4f31069286509693930d02b4150d8
30023002
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
30033003
Yoga: a742cc68e8366fcfc681808162492bc0aa7a9498
30043004

3005-
PODFILE CHECKSUM: 3606e2ca8922c8312d4d68801864023c36cbc5d4
3005+
PODFILE CHECKSUM: 849bbad0d694841db0d0cddc61c69bcdd6ee98fa
30063006

30073007
COCOAPODS: 1.15.2

0 commit comments

Comments
 (0)