Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Release 8.0 #919

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

[WIP] Release 8.0 #919

wants to merge 9 commits into from

Conversation

MarkVillacampa
Copy link
Member

Version 8.0.0 of react-native-purchases bumps PHC to 10.0.0.

NOTE: PHC 10.0 has not been released yet. These changes are pending updating the dependency version where appropriate.

@@ -1,7 +1,7 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, min_ios_version_supported
platform :ios, "13.0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, min_ios_version_supported of React Native is 12.4 but we only support 13+ in the new iOS SDK

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment, looks good otherwise!

public static async handleObserverModeTransaction(productID: string): Promise<PurchasesStoreTransaction> {
await Purchases.throwIfAndroidPlatform();
await Purchases.throwIfNotConfigured();
return RNPurchases.handleObserverModeTransactionForProductID(productID);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm something I'm noticing is that this may return a null value in iOS <15... We either need to make the return type nullable or return an error (I don't think we can return a transaction).

I think returning an error might make more sense in this case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to returning an error

*
* You only need to use this method with *new* purchases. Subscription updates are observed automatically.
*
* Important: This should only be used if you have enabled observer mode during SDK configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't do this in all methods... But we should document that this will fail if called on android or iOS <15

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added clarification in the docs

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one more comment but looks good!

ios/RNPurchases.m Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked pr:breaking Changes that are breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants