Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from namiml/develop
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
acantarero authored Mar 18, 2021
2 parents 5a852b7 + 5e6a175 commit e40109f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
10 changes: 10 additions & 0 deletions NamiSDKComboBinding/NamiSDKComboBinding/ApiDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,16 @@ interface NamiPaywallManager
[Export("canRaisePaywall")]
bool CanRaisePaywall { get; }

// +(void)preparePaywallForDisplay:(NSString *)developerPaywallID backgroundImageRequired: (Bool) backgroundImageRequired imageFetchTimeout: (Double) imageFetchTimeout :(void (^ _Nonnull)(Bool, NSerror*))prepareHandler;
[Static]
[Export("preparePaywallForDisplayWithBackgroundImageRequired:imageFetchTimeout:prepareHandler:")]
void PreparePaywallForDisplay(bool backgroundImageRequired, double imageFetchTimeout, Action<bool, NSError> prepareHandler);

// +(void)preparePaywallForDisplay: (Bool) backgroundImageRequired imageFetchTimeout: (Double) imageFetchTimeout :(void (^ _Nonnull)(Bool, NSerror*))prepareHandler;
[Static]
[Export("preparePaywallForDisplayWithDeveloperPaywallID:backgroundImageRequired:imageFetchTimeout:prepareHandler:")]
void PreparePaywallForDisplayByDeveloperPaywallID(string developerPaywallID, bool backgroundImageRequired, double imageFetchTimeout, Action<bool, NSError> prepareHandler);

// +(void)raisePaywallFromVC:(UIViewController * _Nullable)fromVC;
[Static]
[Export("raisePaywallFromVC:")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<PackOnBuild>true</PackOnBuild>
<PackageId>NamiML.SDK</PackageId>
<PackageVersion>1.0.0</PackageVersion>
<PackageVersion>1.1.0</PackageVersion>
<Authors>Nami ML</Authors>
<Copyright>2021</Copyright>
<PackageIconUrl>https://nami-brand.s3.amazonaws.com/images/Nami.SDK.2.0.120x137.png</PackageIconUrl>
Expand All @@ -23,6 +23,12 @@
<Summary>Nami SDK Xamarin iOS Binding Library</Summary>
<Title>Nami SDK Xamarin iOS Binding Library</Title>
<Description>Xamarin iOS Binding Library for Nami SDK. Subscription and In-App Purchases Marketing Platform. Create no-code purchase journies, subscription management and customer CRM, and analytics. Simple integration. Monetize your App.</Description>
<PackageReleaseNotes>Added

- Improved control over displaying paywalls and more clear errors when paywall cannot display with new preparePaywallForDisplay and preparePaywallForDisplayByDeveloperPaywallID methods

SDK Version
- nami-apple SDK v2.6.0</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,18 @@ private void LogActiveEntitlements(List<NamiEntitlement> activeEntitlements)

private void OnSubscribeClicked(object sender, EventArgs e)
{
if (NamiPaywallManager.CanRaisePaywall)
{
NamiPaywallManager.RaisePaywall(this);
}
NamiPaywallManager.PreparePaywallForDisplay(true, 10.0, (success, error) =>
{
if (success)
{
NamiPaywallManager.RaisePaywall(this);
}
else
{
Console.WriteLine($"Error preparing paywall for display: {error.LocalizedDescription}");
}
});

}

private void OnAboutClicked(object sender, EventArgs e)
Expand Down

0 comments on commit e40109f

Please sign in to comment.