Skip to content

Align onDeferredPurchaseCompleted param name with iOS (purchaseResult)#319

Merged
NickSxti merged 1 commit into
developfrom
nch/align-deferred-purchase-param-name
Jun 11, 2026
Merged

Align onDeferredPurchaseCompleted param name with iOS (purchaseResult)#319
NickSxti merged 1 commit into
developfrom
nch/align-deferred-purchase-param-name

Conversation

@NickSxti

@NickSxti NickSxti commented May 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Rename the supertype param from `transaction` to `purchaseResult` in `QonversionEventsListener.onDeferredPurchaseCompleted`. Aligns with iOS naming (`RNQonversion.mm` uses `purchaseResult`) and the param name already chosen by the override in react-native-sdk and flutter-sdk.

Without this rename, both react-native-sdk and flutter-sdk emit a Kotlin compiler warning on every build:

```
warning: the corresponding parameter in the supertype 'QonversionEventsListener' is named 'transaction'. This may cause problems when calling this function with named arguments.
```

(See react-native-sdk #439 for the original report.)

Compatibility

  • The only call site inside sandwich-sdk (`QonversionSandwich.kt:512`) passes a positional argument, so this is purely a metadata change.
  • No named-argument callers exist across the Qonversion repos (verified with `grep -rn 'onDeferredPurchaseCompleted(transaction =' .`).
  • Java consumers (cordova-plugin, unity-sdk) do not use Kotlin named arguments and are unaffected.
  • Kotlin consumers (react-native-sdk, flutter-sdk) override with `purchaseResult` already, so the rename eliminates their warning instead of introducing a new one.

Follow-up after release

Once a sandwich version containing this change is published, two follow-up PRs will bump the dep:

  • react-native-sdk: `android/build.gradle` line 83 - `io.qonversion:sandwich:7.9.0` -> next.
  • flutter-sdk: `android/build.gradle` line 54 - same bump.

Single-line change, +1/-1.

Rename the supertype param from `transaction` to `purchaseResult` in
`QonversionEventsListener.onDeferredPurchaseCompleted`. Aligns with iOS
naming (RNQonversion.mm uses `purchaseResult`) and the param naming
already chosen in react-native-sdk and flutter-sdk overrides.

Without this rename, both react-native-sdk and flutter-sdk emit a
Kotlin compiler warning on every build:

  warning: the corresponding parameter in the supertype
  'QonversionEventsListener' is named 'transaction'. This may cause
  problems when calling this function with named arguments.

(See react-native-sdk #439 for the original report.)

The only call site within sandwich-sdk (QonversionSandwich.kt:512)
passes a positional argument, so this is purely a metadata change for
existing Java/Kotlin callers. No named-argument callers exist in the
Qonversion repos.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@NickSxti NickSxti merged commit 5f39a25 into develop Jun 11, 2026
1 check passed
@NickSxti NickSxti deleted the nch/align-deferred-purchase-param-name branch June 11, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants