Skip to content

Commit

Permalink
Merge commit '58990de155c37f42d662c33f2eff9b3d7984b3c6' into pba
Browse files Browse the repository at this point in the history
* commit '58990de155c37f42d662c33f2eff9b3d7984b3c6': (26 commits)
  Update VERSIONS.md
  Version bump for 7.3.0
  Adds docs to `StoreProduct` (RevenueCat#521)
  Fix metadata values types (RevenueCat#523)
  [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.7.0 (RevenueCat#524)
  support displaying deferred win-back StoreKit messages
  Bump rexml from 3.3.8 to 3.3.9 (RevenueCat#520)
  Bump danger from 9.5.0 to 9.5.1 (RevenueCat#518)
  Bump fastlane from 2.224.0 to 2.225.0 (RevenueCat#517)
  [AUTOMATIC] Release/7.2.1 (RevenueCat#514)
  [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.5.0 (RevenueCat#513)
  Bump fastlane from 2.223.1 to 2.224.0 (RevenueCat#512)
  [AUTOMATIC] Release/7.2.0 (RevenueCat#511)
  Add visionOS support (RevenueCat#471)
  Bump fastlane from 2.222.0 to 2.223.1 (RevenueCat#509)
  [AUTOMATIC] Release/7.1.2 (RevenueCat#508)
  [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.3.0 (RevenueCat#507)
  [AUTOMATIC] Release/7.1.1 (RevenueCat#506)
  Bump fastlane-plugin-revenuecat_internal from 5140dbc to 55a0455 (RevenueCat#505)
  update allowSharingAppStoreAccount deprecation message
  ...

# Conflicts:
#	.version
#	CHANGELOG.latest.md
#	CHANGELOG.md
#	RevenueCat/Plugins/Android/PurchasesWrapper.java
#	RevenueCat/Plugins/iOS/PurchasesUnityHelper.m
#	RevenueCat/package.json
#	VERSIONS.md
  • Loading branch information
kaushikpaperboat committed Oct 30, 2024
2 parents 2934f91 + 58990de commit 72cac1e
Show file tree
Hide file tree
Showing 20 changed files with 246 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.0
7.3.0
18 changes: 14 additions & 4 deletions CHANGELOG.latest.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
### New Features
* Add SyncPurchases method overload that accepts a callback as parameter (#493) via Mark Villacampa (@MarkVillacampa)
### Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.0.1 (#491) via RevenueCat Git Bot (@RCGitBot)
## RevenueCat SDK
### 🐞 Bugfixes
* Fix metadata values types (#523) via Cesar de la Vega (@vegaro)
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.7.0 (#524) via RevenueCat Git Bot (@RCGitBot)
* Bump rexml from 3.3.8 to 3.3.9 (#520) via dependabot[bot] (@dependabot[bot])
* Bump danger from 9.5.0 to 9.5.1 (#518) via dependabot[bot] (@dependabot[bot])
* Bump fastlane from 2.224.0 to 2.225.0 (#517) via dependabot[bot] (@dependabot[bot])
### Win-back Offers
#### ✨ New Features
* Support displaying deferred win-back StoreKit messages (#522) via Will Taylor (@fire-at-will)

### 🔄 Other Changes
* Adds docs to `StoreProduct` (#521) via Cesar de la Vega (@vegaro)
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
## 7.3.0
## RevenueCat SDK
### 🐞 Bugfixes
* Fix metadata values types (#523) via Cesar de la Vega (@vegaro)
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.7.0 (#524) via RevenueCat Git Bot (@RCGitBot)
* Bump rexml from 3.3.8 to 3.3.9 (#520) via dependabot[bot] (@dependabot[bot])
* Bump danger from 9.5.0 to 9.5.1 (#518) via dependabot[bot] (@dependabot[bot])
* Bump fastlane from 2.224.0 to 2.225.0 (#517) via dependabot[bot] (@dependabot[bot])
### Win-back Offers
#### ✨ New Features
* Support displaying deferred win-back StoreKit messages (#522) via Will Taylor (@fire-at-will)

### 🔄 Other Changes
* Adds docs to `StoreProduct` (#521) via Cesar de la Vega (@vegaro)

## 7.2.1
## RevenueCat SDK
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.5.0 (#513) via RevenueCat Git Bot (@RCGitBot)
* Bump fastlane from 2.223.1 to 2.224.0 (#512) via dependabot[bot] (@dependabot[bot])

## 7.2.0
## RevenueCat SDK
### ✨ New Features
* Add visionOS support (#471) via Andy Boedo (@aboedo)
### 📦 Dependency Updates
* Bump fastlane from 2.222.0 to 2.223.1 (#509) via dependabot[bot] (@dependabot[bot])

## 7.1.2
## RevenueCat SDK
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.3.0 (#507) via RevenueCat Git Bot (@RCGitBot)

## 7.1.1
## RevenueCat SDK
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.2.1 (#504) via RevenueCat Git Bot (@RCGitBot)
* Bump rexml from 3.3.3 to 3.3.6 (#496) via dependabot[bot] (@dependabot[bot])

### 🔄 Other Changes
* Bump fastlane-plugin-revenuecat_internal from 5140dbc to 55a0455 (#505) via Cesar de la Vega (@vegaro)
* Update allowSharingAppStoreAccount Deprecation Message (#503) via Will Taylor (@fire-at-will)
* Update fastlane-plugin-revenuecat_internal (#501) via Cesar de la Vega (@vegaro)
* Update VERSIONS.md to remove compatibility with Unity IAP for BC7 (#500) via Cesar de la Vega (@vegaro)
* [PurchaseTester] Add button to test the GetAmazonLWAConsentStatus method (#498) via Mark Villacampa (@MarkVillacampa)

## 7.1.0
### New Features
* Add SyncPurchases method overload that accepts a callback as parameter (#493) via Mark Villacampa (@MarkVillacampa)
Expand Down
64 changes: 39 additions & 25 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
GIT
remote: https://github.com/RevenueCat/fastlane-plugin-revenuecat_internal
revision: d5f07426f7779470e535aeba7a98a662842d8fa5
revision: 55a045588e724ea7717423daac11b85718044174
specs:
fastlane-plugin-revenuecat_internal (0.1.0)
nokogiri
rest-client

GEM
Expand All @@ -17,20 +18,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.958.0)
aws-sdk-core (3.201.3)
aws-partitions (1.992.0)
aws-sdk-core (3.210.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (1.95.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.156.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-s3 (1.169.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.9.0)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand All @@ -45,7 +46,8 @@ GEM
highline (~> 2.0.0)
cork (0.3.0)
colored2 (~> 3.1)
danger (9.5.0)
danger (9.5.1)
base64 (~> 0.2)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand All @@ -56,15 +58,16 @@ GEM
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
octokit (>= 4.0)
pstore (~> 0.1)
terminal-table (>= 1, < 4)
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.111.0)
faraday (1.10.3)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand Down Expand Up @@ -92,10 +95,10 @@ GEM
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.222.0)
fastlane (2.225.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand All @@ -111,6 +114,7 @@ GEM
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
Expand All @@ -136,6 +140,8 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
gh_inspector (1.1.3)
git (1.19.1)
addressable (~> 2.8)
Expand All @@ -156,7 +162,7 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.7.0)
google-cloud-core (1.7.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
Expand All @@ -178,20 +184,20 @@ GEM
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-accept (1.7.0)
http-cookie (1.0.6)
http-cookie (1.0.7)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.2)
jwt (2.8.2)
jwt (2.9.3)
base64
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0702)
mime-types-data (3.2024.0903)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
Expand All @@ -201,14 +207,22 @@ GEM
naturally (2.2.1)
netrc (0.11.0)
nkf (0.2.0)
octokit (9.1.0)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
octokit (9.2.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
optparse (0.5.0)
os (1.1.4)
plist (3.7.1)
pstore (0.1.3)
public_suffix (6.0.1)
racc (1.8.1)
rake (13.2.1)
rchardet (1.8.0)
representable (3.2.0)
Expand All @@ -221,8 +235,7 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.3.3)
strscan
rexml (3.3.9)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand All @@ -238,7 +251,7 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
strscan (3.1.0)
sysrandom (1.0.5)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand All @@ -248,14 +261,15 @@ GEM
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.19.0)
xcodeproj (1.25.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ private void Start()
case Purchases.InAppMessageType.BillingIssue:
case Purchases.InAppMessageType.PriceIncreaseConsent:
case Purchases.InAppMessageType.Generic:
case Purchases.InAppMessageType.WinBackOffer:
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/Assets/APITests/PurchasesAPITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private void Start()
purchases.SyncAmazonPurchase("product_id", "receipt_id", "amazon_user_id", "iso_currency_code", 1.99);

purchases.ShowInAppMessages(new Purchases.InAppMessageType[] { Purchases.InAppMessageType.BillingIssue,
Purchases.InAppMessageType.PriceIncreaseConsent, Purchases.InAppMessageType.Generic });
Purchases.InAppMessageType.PriceIncreaseConsent, Purchases.InAppMessageType.Generic, Purchases.InAppMessageType.WinBackOffer });
purchases.ShowInAppMessages();
}
}
2 changes: 1 addition & 1 deletion RevenueCat/Editor/RevenueCatPostInstall.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#if UNITY_EDITOR && UNITY_IOS
#if UNITY_EDITOR && (UNITY_IOS || UNITY_VISIONOS)

using System.IO;
using UnityEngine;
Expand Down
2 changes: 1 addition & 1 deletion RevenueCat/Plugins/Android/PurchasesWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class PurchasesWrapper {
private static final String HANDLE_LOG = "_handleLog";

private static final String PLATFORM_NAME = "unity";
private static final String PLUGIN_VERSION = "7.1.0";
private static final String PLUGIN_VERSION = "7.3.0";

private static String gameObject;

Expand Down
4 changes: 2 additions & 2 deletions RevenueCat/Plugins/Editor/RevenueCatDependencies.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<dependencies>
<androidPackages>
<androidPackage spec="com.revenuecat.purchases:purchases-hybrid-common:[13.0.1]" />
<androidPackage spec="com.revenuecat.purchases:purchases-hybrid-common:[13.7.0]" />
<androidPackage spec="androidx.annotation:annotation:[1.2.0]" />
</androidPackages>
<iosPods>
<iosPod name="PurchasesHybridCommon" version="13.0.1" minTargetSdk="13.0"/>
<iosPod name="PurchasesHybridCommon" version="13.7.0" minTargetSdk="13.0"/>
</iosPods>
</dependencies>
2 changes: 1 addition & 1 deletion RevenueCat/Plugins/iOS/PurchasesUnityHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ - (NSString *)platformFlavor {
}

- (NSString *)platformFlavorVersion {
return @"7.1.0";
return @"7.3.0";
}

@end
Expand Down
4 changes: 4 additions & 0 deletions RevenueCat/Scripts/InAppMessageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ public enum InAppMessageType

/// iOS-only. StoreKit generic messages.
Generic = 2,

// iOS-only. This message will show if the subscriber is eligible for an iOS win-back
// offer and will allow the subscriber to redeem the offer.
WinBackOffer = 3,
}
}
37 changes: 34 additions & 3 deletions RevenueCat/Scripts/Offering.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ public Offering(JSONNode response)
Metadata = new Dictionary<string, object>();
if (response["metadata"] != null && !response["metadata"].IsNull)
{
foreach(var metadataEntry in response["metadata"]) {
Metadata.Add(metadataEntry.Key, metadataEntry.Value);
foreach(var metadataEntry in response["metadata"])
{
object value = ParseJsonValue(metadataEntry.Value);
Metadata.Add(metadataEntry.Key, value);
}
}
}
Expand All @@ -80,7 +82,7 @@ public override string ToString()
{
return $"{nameof(Identifier)}: {Identifier}\n" +
$"{nameof(ServerDescription)}: {ServerDescription}\n" +
$"{nameof(AvailablePackages)}: {AvailablePackages}\n" +
$"{nameof(AvailablePackages)}: {string.Join(", ", AvailablePackages)}\n" +
$"{nameof(Metadata)}: {DictToString(Metadata)}\n" +
$"{nameof(Lifetime)}: {Lifetime}\n" +
$"{nameof(Annual)}: {Annual}\n" +
Expand All @@ -90,5 +92,34 @@ public override string ToString()
$"{nameof(Monthly)}: {Monthly}\n" +
$"{nameof(Weekly)}: {Weekly}";
}

private object ParseJsonValue(JSONNode jsonValue)
{
if (jsonValue.IsString) return jsonValue.Value;
if (jsonValue.IsNumber) return jsonValue.AsFloat;
if (jsonValue.IsBoolean) return jsonValue.AsBool;

if (jsonValue.IsObject)
{
var dict = new Dictionary<string, object>();
foreach (var kvp in jsonValue.AsObject)
{
dict[kvp.Key] = ParseJsonValue(kvp.Value);
}
return dict;
}

if (jsonValue.IsArray)
{
var list = new List<object>();
foreach (var item in jsonValue.AsArray)
{
list.Add(ParseJsonValue(item));
}
return list;
}

return null;
}
}
}
Loading

0 comments on commit 72cac1e

Please sign in to comment.