@loyalytics/swan-react-native-sdk 2.7.1-beta.1 → 2.7.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1919,9 +1919,18 @@ class SwanSDK {
1919
1919
  this.sendNotificationAck(messageId, 'clicked');
1920
1920
  }
1921
1921
 
1922
+ // Normalize route: strip custom URL schemes (e.g., "swanexample://offer/999" → "offer/999")
1923
+ // iOS carousel routes must be full URLs for Content Extension's extensionContext.open(),
1924
+ // but host apps expect consistent relative routes across all platforms and notification types.
1925
+ // Preserve http:// and https:// — those are web links the host app may open in a browser.
1926
+ let normalizedRoute = route;
1927
+ if (normalizedRoute && normalizedRoute.includes('://') && !normalizedRoute.startsWith('http://') && !normalizedRoute.startsWith('https://')) {
1928
+ normalizedRoute = normalizedRoute.split('://').slice(1).join('://');
1929
+ }
1930
+
1922
1931
  // Emit NOTIFICATION_OPENED event (same as Notifee click handler)
1923
1932
  const deepLinkPayload = {
1924
- route: route || undefined,
1933
+ route: normalizedRoute || undefined,
1925
1934
  title: title || undefined,
1926
1935
  body: body || undefined,
1927
1936
  keyValuePairs: {}