Skip to content

Commit

Permalink
Merge pull request #23 from AppsFlyerSDK/releases/2.x.x/2.0.x/2.1.1-rc1
Browse files Browse the repository at this point in the history
v2.1.1
  • Loading branch information
af-vero authored Feb 26, 2025
2 parents ea45314 + 595ff6d commit 7949f55
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AppsFlyerConnector

public class AppsFlyerPurchaseConnector : MonoBehaviour {

public static readonly string kAppsFlyerPurchaseConnectorVersion = "2.1.0";
public static readonly string kAppsFlyerPurchaseConnectorVersion = "2.1.1";

#if UNITY_ANDROID && !UNITY_EDITOR
private static AndroidJavaClass appsFlyerAndroidConnector = new AndroidJavaClass("com.appsflyer.unity.afunitypurchaseconnector.AppsFlyerAndroidWrapper");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</androidPackages>

<iosPods>
<iosPod name="PurchaseConnector" version="6.15.2" minTargetSdk="12.0">
<iosPod name="PurchaseConnector" version="6.15.3" minTargetSdk="12.0">
</iosPod>
</iosPods>

Expand Down
80 changes: 41 additions & 39 deletions Assets/AppsFlyer/ProductPurchase.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#nullable enable

using System.Collections;
using System.Collections.Generic;
using System;
Expand All @@ -9,33 +11,33 @@ class InAppPurchaseValidationResult : EventArgs
public bool success;
public ProductPurchase? productPurchase;
public ValidationFailureData? failureData;
public string token;
public string? token;
}

[System.Serializable]
class ProductPurchase
{
public string kind;
public string purchaseTimeMillis;
public string? kind;
public string? purchaseTimeMillis;
public int purchaseState;
public int consumptionState;
public string developerPayload;
public string orderId;
public string? developerPayload;
public string? orderId;
public int purchaseType;
public int acknowledgementState;
public string purchaseToken;
public string productId;
public string? purchaseToken;
public string? productId;
public int quantity;
public string obfuscatedExternalAccountId;
public string obfuscatedExternalProfil;
public string regionCode;
public string? obfuscatedExternalAccountId;
public string? obfuscatedExternalProfil;
public string? regionCode;
}

[System.Serializable]
class ValidationFailureData
{
public int status;
public string description;
public string? description;
}

[System.Serializable]
Expand All @@ -44,24 +46,24 @@ class SubscriptionValidationResult
public bool success;
public SubscriptionPurchase? subscriptionPurchase;
public ValidationFailureData? failureData;
public string token;
public string? token;
}

[System.Serializable]
class SubscriptionPurchase
{
public string acknowledgementState;
public string? acknowledgementState;
public CanceledStateContext? canceledStateContext;
public ExternalAccountIdentifiers? externalAccountIdentifiers;
public string kind;
public string latestOrderId;
public List<SubscriptionPurchaseLineItem> lineItems;
public string? kind;
public string? latestOrderId;
public List<SubscriptionPurchaseLineItem>? lineItems;
public string? linkedPurchaseToken;
public PausedStateContext? pausedStateContext;
public string regionCode;
public string startTime;
public string? regionCode;
public string? startTime;
public SubscribeWithGoogleInfo? subscribeWithGoogleInfo;
public string subscriptionState;
public string? subscriptionState;
public TestPurchase? testPurchase;
}

Expand All @@ -78,36 +80,36 @@ class CanceledStateContext
[System.Serializable]
class ExternalAccountIdentifiers
{
public string externalAccountId;
public string obfuscatedExternalAccountId;
public string obfuscatedExternalProfileId;
public string? externalAccountId;
public string? obfuscatedExternalAccountId;
public string? obfuscatedExternalProfileId;
}

[System.Serializable]
class SubscriptionPurchaseLineItem
{
public AutoRenewingPlan? autoRenewingPlan;
public DeferredItemReplacement? deferredItemReplacement;
public string expiryTime;
public string? expiryTime;
public OfferDetails? offerDetails;
public PrepaidPlan? prepaidPlan;
public string productId;
public string? productId;
}

[System.Serializable]
class PausedStateContext
{
public string autoResumeTime;
public string? autoResumeTime;
}

[System.Serializable]
class SubscribeWithGoogleInfo
{
public string emailAddress;
public string familyName;
public string givenName;
public string profileId;
public string profileName;
public string? emailAddress;
public string? familyName;
public string? givenName;
public string? profileId;
public string? profileName;
}

[System.Serializable]
Expand All @@ -126,7 +128,7 @@ class SystemInitiatedCancellation{}
class UserInitiatedCancellation
{
public CancelSurveyResult? cancelSurveyResult;
public string cancelTime;
public string? cancelTime;
}

[System.Serializable]
Expand All @@ -139,14 +141,14 @@ class AutoRenewingPlan
[System.Serializable]
class DeferredItemReplacement
{
public string productId;
public string? productId;
}

[System.Serializable]
class OfferDetails
{
public List<string>? offerTags;
public string basePlanId;
public string? basePlanId;
public string? offerId;
}

Expand All @@ -159,23 +161,23 @@ class PrepaidPlan
[System.Serializable]
class CancelSurveyResult
{
public string reason;
public string reasonUserInput;
public string? reason;
public string? reasonUserInput;
}

[System.Serializable]
class SubscriptionItemPriceChangeDetails
{
public string expectedNewPriceChargeTime;
public string? expectedNewPriceChargeTime;
public Money? newPrice;
public string priceChangeMode;
public string priceChangeState;
public string? priceChangeMode;
public string? priceChangeState;
}

[System.Serializable]
class Money
{
public string currencyCode;
public string? currencyCode;
public long nanos;
public long units;
}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Versions
## v2.1.1
* Update iOS PurchaseConnector to 6.15.3
* Warnings fix

## v2.1.0
* Update Android PurchaseConnector to 2.1.0

Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions deploy/build_appsflyer_unity_purchase-connector_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "Start build for appsflyer-unity-purchase-connector.unitypackage"

DEPLOY_PATH=output
UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
PACKAGE_NAME="appsflyer-unity-purchase-connector-2.1.0.unitypackage"
PACKAGE_NAME="appsflyer-unity-purchase-connector-2.1.1.unitypackage"
mkdir -p $DEPLOY_PATH

#move external dependency manager
Expand All @@ -23,7 +23,7 @@ mv external-dependency-manager-1.2.144.unitypackage ..
Assets \
$PWD/$DEPLOY_PATH/$PACKAGE_NAME \
-quit \
&& echo "Package exported successfully to output/appsflyer-unity-purchase-connector-2.1.0.unitypackage" \
&& echo "Package exported successfully to output/appsflyer-unity-purchase-connector-2.1.1.unitypackage" \
|| echo "Failed to export package. See create_unity_core.log for more info"

if [ "$1" == "-p" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "Start build for appsflyer-unity-purchase-connector.unitypackage - Strict M

DEPLOY_PATH=output
UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
PACKAGE_NAME="appsflyer-unity-purchase-connector-strict-mode-2.1.0.unitypackage"
PACKAGE_NAME="appsflyer-unity-purchase-connector-strict-mode-2.1.1.unitypackage"
mkdir -p $DEPLOY_PATH

#move external dependency manager
Expand All @@ -27,7 +27,7 @@ echo "Changing PurchaseConnector to Strict Mode. Done."
Assets \
$PWD/$DEPLOY_PATH/$PACKAGE_NAME \
-quit \
&& echo "Package exported successfully to output/appsflyer-unity-purchase-connector-strict-mode-2.1.0.unitypackage" \
&& echo "Package exported successfully to output/appsflyer-unity-purchase-connector-strict-mode-2.1.1.unitypackage" \
|| echo "Failed to export package. See create_unity_core.log for more info"

if [ "$1" == "-p" ]; then
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 7949f55

Please sign in to comment.