Skip to content

Commit

Permalink
Release 4.1.0 (#216)
Browse files Browse the repository at this point in the history
* bumped version number and dependencies

* added setSimulatesAskToBuyInSandbox for iOS

* bumped common version to 1.6.1

* updated changelog to reflect the WeatherApp Example and CI fixes

* re-added 4.0.1 changelog, it was accidentally removed

* updated pods and project

* updated test runner xcode version

* update xcode version again

* added step to set architectures for simulators to fix build issues on Xcode 12 in CI

* update Podfile.lock

* fixed copy/paste in changelog

* more copy/paste issue fixes

* removed flipper which in turn fixes many issues with dependencies
  • Loading branch information
aboedo authored Mar 16, 2021
1 parent 37f932a commit 3d5b2e6
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 103 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
ios:
executor:
name: rn/macos
xcode_version: 11.4.0
xcode_version: 12.4.0
steps:
- attach_workspace:
at: .
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 4.1.0

- Added a new sample project available at `/Examples/WeatherApp`
https://github.com/RevenueCat/react-native-purchases/pull/212
- iOS:
- Added a new method `setSimulatesAskToBuyInSandbox`, that allows developers to test deferred purchases easily.
- Bumped purchases-hybrid-common to 1.6.1 [Changelog here](https://github.com/RevenueCat/purchases-hybrid-common/releases/1.6.1)
- Bumped purchases-ios to 3.10.6 [Changelog here](https://github.com/RevenueCat/purchases-ios/releases/3.10.6)
- Bumped purchases-android to 4.0.4 [Changelog here](https://github.com/RevenueCat/purchases-hybrid-common/releases/4.0.4)
https://github.com/RevenueCat/react-native-purchases/pull/216
- Fixed issues with CI builds in Android
https://github.com/RevenueCat/react-native-purchases/pull/214

## 4.0.1

- Update npm description for better discoverability
Expand Down
2 changes: 1 addition & 1 deletion RNPurchases.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ Pod::Spec.new do |spec|
]

spec.dependency "React-Core"
spec.dependency "PurchasesHybridCommon", '1.5.0'
spec.dependency "PurchasesHybridCommon", '1.6.1'
spec.swift_version = '5.0'
end
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| Version | iOS version | Android version | Common files version |
|---------|-------------|-----------------|----------------------|
| 4.1.0 | 3.10.6 | 4.0.4 | 1.6.1 |
| 4.0.1 | 3.9.2 | 4.0.1 | 1.5.0 |
| 4.0.0 | 3.9.2 | 4.0.1 | 1.5.0 |
| 3.4.3 | 3.7.5 | 3.5.2 | 1.4.5 |
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ android {
minSdkVersion 16
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
versionCode 1
versionName '4.0.1'
versionName '4.1.0'
}

buildTypes {
Expand Down Expand Up @@ -123,6 +123,6 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
dependencies {
//noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
implementation 'com.revenuecat.purchases:purchases-hybrid-common:1.5.0'
implementation 'com.revenuecat.purchases:purchases-hybrid-common:1.6.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
4 changes: 2 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ if (os.type() === "Linux") {
console.log("Skipping iOS Dependencies");
} else if (os.type() === "Darwin") {
const downloadProcess = exec(
"./scripts/download-purchases-framework.sh 3.9.2"
"./scripts/download-purchases-framework.sh 3.10.6"
);
downloadProcess.stdout.pipe(process.stdout);
const downloadProcessCommon = exec(
"./scripts/download-purchases-common.sh 1.5.0"
"./scripts/download-purchases-common.sh 1.6.1"
);
downloadProcessCommon.stdout.pipe(process.stdout);
} else if (os.type() === "Windows_NT") {
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ target 'ReactNativeSample' do
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
add_flipper_pods!
# add_flipper_pods!
post_install do |installer|
flipper_post_install(installer)
# flipper_post_install(installer)
set_deployment_target_for_all_pods(installer)
end

Expand Down
106 changes: 13 additions & 93 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
PODS:
- boost-for-react-native (1.63.0)
- CocoaAsyncSocket (7.6.5)
- CocoaLibEvent (1.0.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.62.2)
- FBReactNativeSpec (0.62.2):
Expand All @@ -11,52 +9,6 @@ PODS:
- React-Core (= 0.62.2)
- React-jsi (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- Flipper (0.33.1):
- Flipper-Folly (~> 2.1)
- Flipper-RSocket (~> 1.0)
- Flipper-DoubleConversion (1.1.7)
- Flipper-Folly (2.3.0):
- boost-for-react-native
- CocoaLibEvent (~> 1.0)
- Flipper-DoubleConversion
- Flipper-Glog
- OpenSSL-Universal (= 1.0.2.20)
- Flipper-Glog (0.3.6)
- Flipper-PeerTalk (0.0.4)
- Flipper-RSocket (1.1.0):
- Flipper-Folly (~> 2.2)
- FlipperKit (0.33.1):
- FlipperKit/Core (= 0.33.1)
- FlipperKit/Core (0.33.1):
- Flipper (~> 0.33.1)
- FlipperKit/CppBridge
- FlipperKit/FBCxxFollyDynamicConvert
- FlipperKit/FBDefines
- FlipperKit/FKPortForwarding
- FlipperKit/CppBridge (0.33.1):
- Flipper (~> 0.33.1)
- FlipperKit/FBCxxFollyDynamicConvert (0.33.1):
- Flipper-Folly (~> 2.1)
- FlipperKit/FBDefines (0.33.1)
- FlipperKit/FKPortForwarding (0.33.1):
- CocoaAsyncSocket (~> 7.6)
- Flipper-PeerTalk (~> 0.0.4)
- FlipperKit/FlipperKitHighlightOverlay (0.33.1)
- FlipperKit/FlipperKitLayoutPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutTextSearchable
- YogaKit (~> 1.18)
- FlipperKit/FlipperKitLayoutTextSearchable (0.33.1)
- FlipperKit/FlipperKitNetworkPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/FlipperKitReactPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/SKIOSNetworkPlugin (0.33.1):
- FlipperKit/Core
- FlipperKit/FlipperKitNetworkPlugin
- Folly (2018.10.22.00):
- boost-for-react-native
- DoubleConversion
Expand All @@ -67,14 +19,11 @@ PODS:
- DoubleConversion
- glog
- glog (0.3.5)
- OpenSSL-Universal (1.0.2.20):
- OpenSSL-Universal/Static (= 1.0.2.20)
- OpenSSL-Universal/Static (1.0.2.20)
- Purchases (3.9.2):
- PurchasesCoreSwift (= 3.9.2)
- PurchasesCoreSwift (3.9.2)
- PurchasesHybridCommon (1.5.0):
- Purchases (= 3.9.2)
- Purchases (3.10.6):
- PurchasesCoreSwift (= 3.10.6)
- PurchasesCoreSwift (3.10.6)
- PurchasesHybridCommon (1.6.1):
- Purchases (= 3.10.6)
- RCTRequired (0.62.2)
- RCTTypeSafety (0.62.2):
- FBLazyVector (= 0.62.2)
Expand Down Expand Up @@ -299,24 +248,17 @@ PODS:
- ReactCommon/callinvoker (= 0.62.2)
- RNGestureHandler (1.4.0):
- React
- RNPurchases (4.0.1):
- PurchasesHybridCommon (= 1.5.0)
- RNPurchases (4.1.0):
- PurchasesHybridCommon (= 1.6.1)
- React-Core
- RNScreens (1.0.0-alpha.23):
- React
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)

DEPENDENCIES:
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
- FlipperKit (~> 0.33.1)
- FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1)
- FlipperKit/FlipperKitReactPlugin (~> 0.33.1)
- FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1)
- FlipperKit/SKIOSNetworkPlugin (~> 0.33.1)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
Expand Down Expand Up @@ -349,20 +291,9 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- boost-for-react-native
- CocoaAsyncSocket
- CocoaLibEvent
- Flipper
- Flipper-DoubleConversion
- Flipper-Folly
- Flipper-Glog
- Flipper-PeerTalk
- Flipper-RSocket
- FlipperKit
- OpenSSL-Universal
- Purchases
- PurchasesCoreSwift
- PurchasesHybridCommon
- YogaKit

EXTERNAL SOURCES:
DoubleConversion:
Expand Down Expand Up @@ -424,24 +355,14 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245
FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e
Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: e4493b013c02d9347d5e0cb4d128680239f6c78a
Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
OpenSSL-Universal: ff34003318d5e1163e9529b08470708e389ffcdd
Purchases: d8a798c9c7552fe66b550bf314a143e94ffa70c8
PurchasesCoreSwift: ea4eabae180416e580ac60366f41aa1fefec0693
PurchasesHybridCommon: d9bfb34309db4c9ba82a6f7f3a6275c13befdca7
Purchases: 520fdb59140fed96932a30d02a3ec04858cb541c
PurchasesCoreSwift: 31c2a3d7394432abbe64d46f0933835de0b33033
PurchasesHybridCommon: 013c8072b73e752a206779747e88c068fbf999ec
RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035
RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce
React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3
Expand All @@ -462,11 +383,10 @@ SPEC CHECKSUMS:
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
RNGestureHandler: 71871d4792db2a73f70204483d30350ec9384cbd
RNPurchases: b0f86f23b23cf238a2dd9bb174b1c9f0aa91f499
RNPurchases: e438e025eeeee2c37f3ef6e7c224a92ed7caa85f
RNScreens: f28b48b8345f2f5f39ed6195518291515032a788
Yoga: 3ebccbdd559724312790e7742142d062476b698e
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 34518ddc1e6677f3da5d9ae40f3fbb4bca62ad47
PODFILE CHECKSUM: ec0f3492084e5e6347cedff06687bdd2107f3417

COCOAPODS: 1.10.0
COCOAPODS: 1.10.1
6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,12 @@ export default class Purchases {
* @param {Boolean} finishTransactions Set finishTransactions to false if you aren't using Purchases SDK to make the purchase
*/
static setFinishTransactions(finishTransactions: boolean): void;
/**
* iOS only.
* @param {Boolean} simulatesAskToBuyInSandbox Set this property to true *only* when testing the ask-to-buy / SCA purchases flow.
* More information: http://errors.rev.cat/ask-to-buy
*/
static setSimulatesAskToBuyInSandbox(simulatesAskToBuyInSandbox: boolean): void;
/**
* Sets a function to be called on updated purchaser info
* @param {PurchaserInfoUpdateListener} purchaserInfoUpdateListener PurchaserInfo update listener
Expand Down
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ var Purchases = /** @class */ (function () {
Purchases.setFinishTransactions = function (finishTransactions) {
RNPurchases.setFinishTransactions(finishTransactions);
};
/**
* iOS only.
* @param {Boolean} simulatesAskToBuyInSandbox Set this property to true *only* when testing the ask-to-buy / SCA purchases flow.
* More information: http://errors.rev.cat/ask-to-buy
*/
Purchases.setSimulatesAskToBuyInSandbox = function (simulatesAskToBuyInSandbox) {
if (react_native_1.Platform.OS === "ios") {
RNPurchases.setSimulatesAskToBuyInSandbox(simulatesAskToBuyInSandbox);
}
};
/**
* Sets a function to be called on updated purchaser info
* @param {PurchaserInfoUpdateListener} purchaserInfoUpdateListener PurchaserInfo update listener
Expand Down
7 changes: 6 additions & 1 deletion ios/RNPurchases.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ - (dispatch_queue_t)methodQueue
[RCCommonFunctionality setDebugLogsEnabled:enabled];
}

RCT_EXPORT_METHOD(setSimulatesAskToBuyInSandbox:(BOOL)simulatesAskToBuyInSandbox)
{
[RCCommonFunctionality setSimulatesAskToBuyInSandbox:simulatesAskToBuyInSandbox];
}

RCT_REMAP_METHOD(getPurchaserInfo,
purchaserInfoWithResolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject) {
Expand Down Expand Up @@ -359,7 +364,7 @@ - (NSString *)platformFlavor {
}

- (NSString *)platformFlavorVersion {
return @"4.0.1";
return @"4.1.0";
}

@end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-purchases",
"title": "React Native Purchases",
"version": "4.0.1",
"version": "4.1.0",
"description": "React Native in-app purchases and subscriptions made easy. Supports iOS and Android. ",
"main": "index.js",
"types": "index.d.ts",
Expand Down
11 changes: 11 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,17 @@ export default class Purchases {
RNPurchases.setFinishTransactions(finishTransactions);
}

/**
* iOS only.
* @param {Boolean} simulatesAskToBuyInSandbox Set this property to true *only* when testing the ask-to-buy / SCA purchases flow.
* More information: http://errors.rev.cat/ask-to-buy
*/
public static setSimulatesAskToBuyInSandbox(simulatesAskToBuyInSandbox: boolean) {
if (Platform.OS === "ios") {
RNPurchases.setSimulatesAskToBuyInSandbox(simulatesAskToBuyInSandbox);
}
}

/**
* Sets a function to be called on updated purchaser info
* @param {PurchaserInfoUpdateListener} purchaserInfoUpdateListener PurchaserInfo update listener
Expand Down

0 comments on commit 3d5b2e6

Please sign in to comment.