Expand DangerousSettings API tester coverage#6810
Merged
Merged
Conversation
Adds explicit property-read and constructor coverage for `DangerousSettings`
in both the Swift and Obj-C API testers so future refactors of the type
(e.g. moving stored properties into an internal value-type backing) are
guaranteed to remain source- and ABI-compatible for SDK consumers.
Swift (SwiftAPITester/DangerousSettingsAPI.swift):
- Exercise `DangerousSettings()` and `DangerousSettings(autoSyncPurchases:)`
in addition to the existing `DangerousSettings(uiPreviewMode:)` case.
- Read all three publicly exposed properties (`autoSyncPurchases`,
`customEntitlementComputation`, `uiPreviewMode`).
Obj-C (ObjcAPITester/RCDangerousSettingsAPI.{h,m}):
- New file mirroring the `RCConfigurationAPI` pattern (one
`+ (void)checkAPI` per public type), wired into `main.m` and the
`AllAPITests.xcodeproj` project file.
- Covers `-init`, `-initWithAutoSyncPurchases:`, and reads of the two
Obj-C-exposed properties (`autoSyncPurchases`, `customEntitlementComputation`).
`uiPreviewMode` is intentionally omitted since it is `@_spi(Internal)` and
not bridged to Obj-C.
These additions are landed first so we can verify the existing public
surface compiles on `main`, before any refactor of `DangerousSettings`
internals is layered on top.
Co-authored-by: Cursor <cursoragent@cursor.com>
DangerousSettings API tester coverage
2 tasks
This was referenced May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
purchases-androidand hybridsMotivation
Establish a safety net for the public surface of
DangerousSettingsbefore #6811, which backs it (andConfiguration,PlatformInfo) with internalHashablevalue-type storage. Lands first, on its own, so we can prove the tests pass against today'smainrather than only after the refactor.Description
DangerousSettings(),DangerousSettings(autoSyncPurchases:), and read all three public properties.RCDangerousSettingsAPI.{h,m}mirroring theRCConfigurationAPIpattern, wired intomain.mand theAllAPITests.xcodeproj. Covers-init,-initWithAutoSyncPurchases:, and reads of the two Obj-C-bridged properties (uiPreviewModeis@_spi(Internal)and not bridged).Verified by building
All API Testsagainst this branch:Made with Cursor
Note
Low Risk
Low risk: changes are confined to API surface compile-time testers and Xcode project wiring, with no production runtime behavior modified.
Overview
Adds broader API-surface coverage for
DangerousSettingsin the API tester suite.Updates the Swift tester to exercise additional initializers and property reads, and introduces a new Objective-C tester (
RCDangerousSettingsAPI) that instantiatesRCDangerousSettingsand verifies bridged properties; the Obj-C tester is wired intomain.mand theAllAPITests.xcodeprojsources.Reviewed by Cursor Bugbot for commit 3766319. Bugbot is set up for automated code reviews on this repo. Configure here.