Skip to content

chore(ios): drop dead Swift stubs and namespace React header imports - #1906

Merged
ajpallares merged 1 commit into
mainfrom
pallares/spm-ios-source-hygiene
Aug 20, 2026
Merged

chore(ios): drop dead Swift stubs and namespace React header imports#1906
ajpallares merged 1 commit into
mainfrom
pallares/spm-ios-source-hygiene

Conversation

@ajpallares

@ajpallares ajpallares commented Aug 19, 2026

Copy link
Copy Markdown
Member

Motivation

Small cleanup PR in preparation for adding SwiftPM support in #1907.

React Native 0.87 added experimental SwiftPM support for iOS. Its tooling refuses react-native-purchases-ui outright ("mixed Swift + Objective-C/C++ sources") solely because of an empty PurchasesPlugin.swift stub, and #import "UIView+React.h" only resolves through CocoaPods' header map.

Summary

  • The deleted Swift stubs and bridging headers are empty and nothing references them.
  • <React/UIView+React.h> is the canonical spelling. React-Core.podspec sets header_dir = "React", so CocoaPods resolves it identically.

Notes

No behavior change, and no test changes: the affected code is Obj-C glue with no unit test coverage.


Note

Low Risk
Build and import-path cleanup with no purchase, auth, or JS API changes; intended behavior is unchanged under CocoaPods.

Overview
Prepares the iOS native targets for upcoming SwiftPM work by removing unused Swift scaffolding and aligning React header imports with the canonical CocoaPods/SwiftPM spelling.

Empty Swift removed: Deletes stub PurchasesPlugin.swift, bridging headers, and Xcode references from RNPurchases and react-native-purchases-ui so the UI package is no longer classified as mixed Swift + Obj-C for RN 0.87’s experimental SwiftPM tooling. AGENTS.md now documents iOS as Obj-C only (RNPurchases.h / RNPurchases.m).

React imports: CustomerCenterViewWrapper.m and PaywallViewWrapper.m switch from #import "UIView+React.h" to #import <React/UIView+React.h>, matching React-Core’s header_dir and avoiding header-map-only resolution.

No runtime or public API changes; Obj-C glue only.

Reviewed by Cursor Bugbot for commit 94e7085. Bugbot is set up for automated code reviews on this repo. Configure here.

The `PurchasesPlugin.swift` stub and the `*-Bridging-Header.h` placeholders
have been empty since 2020 and no longer serve any purpose, but their presence
makes the Obj-C targets look mixed-language to tooling that inspects sources.

`#import "UIView+React.h"` only resolves through CocoaPods' header map; the
namespaced `<React/UIView+React.h>` spelling is the canonical one and works
under any integration method.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ajpallares ajpallares added the pr:other A code change that improves performance label Aug 19, 2026
@ajpallares
ajpallares marked this pull request as ready for review August 20, 2026 05:58
@ajpallares
ajpallares requested a review from a team as a code owner August 20, 2026 05:58
@ajpallares
ajpallares requested a review from a team August 20, 2026 05:58
@ajpallares
ajpallares merged commit 78f9f7f into main Aug 20, 2026
10 checks passed
@ajpallares
ajpallares deleted the pallares/spm-ios-source-hygiene branch August 20, 2026 06:54
RCGitBot added a commit that referenced this pull request Aug 25, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* feat(ads): ad reward tracking support (#1890) via Peter Porfy
(@peterporfy)
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 18.32.1 (#1913)
via RevenueCat Git Bot (@RCGitBot)
* [Android
10.18.1](https://github.com/RevenueCat/purchases-android/releases/tag/10.18.1)
* [Android
10.18.0](https://github.com/RevenueCat/purchases-android/releases/tag/10.18.0)
* [iOS
5.85.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.85.0)
* [Web
1.53.1](https://github.com/RevenueCat/purchases-js/releases/tag/1.53.1)
* [Web
1.53.0](https://github.com/RevenueCat/purchases-js/releases/tag/1.53.0)

## RevenueCatUI SDK
### 🐞 Bugfixes
* [EXTERNAL] Fix RN interop mode crash for Paywalls (#1916) via
@TheRogue76 (#1917) via Cesar de la Vega (@vegaro)

### 🔄 Other Changes
* Update sdks-common-config orb to v4.6.1 (#1914) via Antonio Pallares
(@ajpallares)
* Match native SDKs text for simulated store purchase alert (#1724) via
Antonio Pallares (@ajpallares)
* fix: web purchases report SDK version 9.1.0 instead of the real one
(#1910) via Antonio Pallares (@ajpallares)
* Bump js-yaml from 4.3.0 to 4.3.1 in /examples/adsTester (#1911) via
dependabot[bot] (@dependabot[bot])
* feat: rewarded ad sample app (#1897) via Peter Porfy (@peterporfy)
* chore(ios): drop dead Swift stubs and namespace React header imports
(#1906) via Antonio Pallares (@ajpallares)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> This PR is mostly version and changelog updates; functional risk comes
from the bundled prior releases (native SDK bumps, ads tracking, paywall
interop fix), not from new logic in this diff.
> 
> **Overview**
> **Automatic release** that ships **10.8.0** by aligning version
constants and package metadata across the monorepo
(`react-native-purchases`, `react-native-purchases-ui`,
`react-native-purchases-store-galaxy`), Android/iOS plugin version
strings, web `packageVersion`, docs redirect, `VERSIONS.md`, and
lockfile/example deps.
> 
> The changelog for this release (not new code in this diff) highlights
**ad reward tracking** (#1890), **purchases-hybrid-common 18.32.1**
(Android 10.18.x, iOS 5.85.0, Web 1.53.x), a **RevenueCatUI** fix for
Paywalls crashing in RN interop mode (#1916/#1917), plus fixes for web
SDK version reporting (#1910) and related sample/CI/iOS cleanup entries.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
53ae8fd. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: RevenueCat CI <dev+ci@revenuecat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:other A code change that improves performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants