Skip to content

Commit

Permalink
Merge pull request #45 from albilaga/fix-4.39.0.9
Browse files Browse the repository at this point in the history
Update to 4.39.0.9
  • Loading branch information
thisisthekap authored Apr 17, 2024
2 parents b607f5e + d44ef2b commit f2dbccc
Show file tree
Hide file tree
Showing 8 changed files with 2,430 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<IsPackable>true</IsPackable>
<PackageId>Xamarin.RevenueCat.iOS.Extensions</PackageId>
<Description>Contains convenience methods and async extensions for Xamarin.RevenueCat.iOS</Description>
<Version>4.39.0.8</Version>
<Version>4.39.0.9</Version>
<Authors>Christian Kapplmüller, Albilaga Linggra Pradana</Authors>
<Company>fun.music IT GmbH</Company>
<PackageOutputPath>nugetoutput</PackageOutputPath>
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.RevenueCat.iOS/Xamarin.RevenueCat.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Xamarin.RevenueCat.iOS</PackageId>
<Version>4.39.0.8</Version>
<Version>4.39.0.9</Version>
<Description>Contains bindings for https://docs.revenuecat.com/docs/ios</Description>
<Authors>Christian Kapplmüller, Albilaga Linggra Pradana</Authors>
<Company>fun.music IT GmbH</Company>
Expand Down
16 changes: 10 additions & 6 deletions Xamarin.RevenueCatUI.iOS.Extensions/Paywall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Xamarin.RevenueCatUI.iOS.Extensions
public static class Paywall
{
public static Task<RCCustomerInfo> PresentPaywallAsync(this UIViewController topVc, RCOffering offering,
CancellationToken cancellationToken = default)
bool animate = false, CancellationToken cancellationToken = default)
{
var tcs = new TaskCompletionSource<RCCustomerInfo>();
cancellationToken.Register(() => tcs.TrySetCanceled());
Expand All @@ -21,12 +21,12 @@ public static Task<RCCustomerInfo> PresentPaywallAsync(this UIViewController top

controller.Delegate = paywallDelegate;

topVc.InvokeOnMainThread(() => { topVc.PresentViewController(controller, true, null); });
topVc.InvokeOnMainThread(() => { topVc.PresentViewController(controller, animate, null); });
return tcs.Task;
}

public static Task<RCCustomerInfo> PushPaywallAsync(this UINavigationController navigationController,
RCOffering offering, CancellationToken cancellationToken = default)
RCOffering offering, bool animate = false, CancellationToken cancellationToken = default)
{
var tcs = new TaskCompletionSource<RCCustomerInfo>();
cancellationToken.Register(() => tcs.TrySetCanceled());
Expand All @@ -39,7 +39,7 @@ public static Task<RCCustomerInfo> PushPaywallAsync(this UINavigationController
controller.Delegate = paywallDelegate;

navigationController.InvokeOnMainThread(
() => { navigationController.PushViewController(controller, true); });
() => { navigationController.PushViewController(controller, animate); });
return tcs.Task;
}

Expand All @@ -52,8 +52,12 @@ public DelegatedPaywallViewControllerDelegate(Action<RCCustomerInfo> callback)
_callback = callback ?? throw new ArgumentNullException(nameof(callback));
}

public override void PaywallViewControllerDidFinishRestoringWithCustomerInfo(
RCPaywallViewController controller, RCCustomerInfo customerInfo)
public override void DidFinishRestoring(RCPaywallViewController controller, RCCustomerInfo customerInfo)
{
_callback?.Invoke(customerInfo);
}

public override void DidFinishPurchasing(RCPaywallViewController controller, RCCustomerInfo customerInfo)
{
_callback?.Invoke(customerInfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Xamarin.RevenueCatUI.iOS.Extensions</PackageId>
<Version>4.39.0.8</Version>
<Version>4.39.0.9</Version>
<Description>Contains bindings for https://docs.revenuecat.com/docs/ios</Description>
<Authors>Christian Kapplmüller, Albilaga Linggra Pradana</Authors>
<Company>fun.music IT GmbH</Company>
Expand Down
22 changes: 11 additions & 11 deletions Xamarin.RevenueCatUI.iOS/ApiDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,48 +79,48 @@ interface RCPaywallViewControllerDelegate
{
// @optional -(void)paywallViewControllerDidStartPurchase:(RCPaywallViewController * _Nonnull)controller;
[Export("paywallViewControllerDidStartPurchase:")]
void PaywallViewControllerDidStartPurchase(RCPaywallViewController controller);
void DidStartPurchase(RCPaywallViewController controller);

// @optional -(void)paywallViewController:(RCPaywallViewController * _Nonnull)controller didStartPurchaseWithPackage:(RCPackage * _Nonnull)package;
[Export("paywallViewController:didStartPurchaseWithPackage:")]
void PaywallViewController(RCPaywallViewController controller, RCPackage package);
void DidStartPurchase(RCPaywallViewController controller, RCPackage package);

// @optional -(void)paywallViewController:(RCPaywallViewController * _Nonnull)controller didFinishPurchasingWithCustomerInfo:(RCCustomerInfo * _Nonnull)customerInfo;
[Export("paywallViewController:didFinishPurchasingWithCustomerInfo:")]
void PaywallViewController(RCPaywallViewController controller, RCCustomerInfo customerInfo);
void DidFinishPurchasing(RCPaywallViewController controller, RCCustomerInfo customerInfo);

// @optional -(void)paywallViewController:(RCPaywallViewController * _Nonnull)controller didFinishPurchasingWithCustomerInfo:(RCCustomerInfo * _Nonnull)customerInfo transaction:(RCStoreTransaction * _Nullable)transaction;
[Export("paywallViewController:didFinishPurchasingWithCustomerInfo:transaction:")]
void PaywallViewController(RCPaywallViewController controller, RCCustomerInfo customerInfo,
void DidFinishPurchasing(RCPaywallViewController controller, RCCustomerInfo customerInfo,
[NullAllowed] RCStoreTransaction transaction);

// @optional -(void)paywallViewControllerDidCancelPurchase:(RCPaywallViewController * _Nonnull)controller;
[Export("paywallViewControllerDidCancelPurchase:")]
void PaywallViewControllerDidCancelPurchase(RCPaywallViewController controller);
void DidCancelPurchase(RCPaywallViewController controller);

// @optional -(void)paywallViewController:(RCPaywallViewController * _Nonnull)controller didFailPurchasingWithError:(NSError * _Nonnull)error;
[Export("paywallViewController:didFailPurchasingWithError:")]
void PaywallViewController(RCPaywallViewController controller, NSError error);
void DidFailPurchasing(RCPaywallViewController controller, NSError error);

// @optional -(void)paywallViewControllerDidStartRestore:(RCPaywallViewController * _Nonnull)controller;
[Export("paywallViewControllerDidStartRestore:")]
void PaywallViewControllerDidStartRestore(RCPaywallViewController controller);
void DidStartRestore(RCPaywallViewController controller);

// @optional -(void)paywallViewController:(RCPaywallViewController * _Nonnull)controller didFinishRestoringWithCustomerInfo:(RCCustomerInfo * _Nonnull)customerInfo;
[Export("paywallViewController:didFinishRestoringWithCustomerInfo:")]
void PaywallViewControllerDidFinishRestoringWithCustomerInfo(RCPaywallViewController controller,
void DidFinishRestoring(RCPaywallViewController controller,
RCCustomerInfo customerInfo);

// @optional -(void)paywallViewController:(RCPaywallViewController * _Nonnull)controller didFailRestoringWithError:(NSError * _Nonnull)error;
[Export("paywallViewController:didFailRestoringWithError:")]
void PaywallViewControllerDidFailRestoringWithError(RCPaywallViewController controller, NSError error);
void DidFailRestoring(RCPaywallViewController controller, NSError error);

// @optional -(void)paywallViewControllerWasDismissed:(RCPaywallViewController * _Nonnull)controller;
[Export("paywallViewControllerWasDismissed:")]
void PaywallViewControllerWasDismissed(RCPaywallViewController controller);
void WasDismissed(RCPaywallViewController controller);

// @optional -(void)paywallViewController:(RCPaywallViewController * _Nonnull)controller didChangeSizeTo:(CGSize)size;
[Export("paywallViewController:didChangeSizeTo:")]
void PaywallViewController(RCPaywallViewController controller, CGSize size);
void DidChangeSizeTo(RCPaywallViewController controller, CGSize size);
}
}
2 changes: 1 addition & 1 deletion Xamarin.RevenueCatUI.iOS/Xamarin.RevenueCatUI.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Xamarin.RevenueCatUI.iOS</PackageId>
<Version>4.39.0.8</Version>
<Version>4.39.0.9</Version>
<Description>Contains bindings for https://docs.revenuecat.com/docs/ios</Description>
<Authors>Christian Kapplmüller, Albilaga Linggra Pradana</Authors>
<Company>fun.music IT GmbH</Company>
Expand Down
Loading

0 comments on commit f2dbccc

Please sign in to comment.