Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/workflows/manual_minor_prerelease.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/manual_patch_prerelease.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/prerelease_github.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Publish release

on:
pull_request:
types: [closed]
branches:
- main

jobs:
publish_release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') && contains(github.event.pull_request.labels.*.name, 'one-click-release')
uses: qonversion/shared-sdk-workflows/.github/workflows/publish_release.yml@main
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
workflow_dispatch:
inputs:
bump:
description: 'Version part to bump'
required: true
type: choice
options:
- patch
- minor
- major
default: patch
version:
description: 'Explicit release version like 5.13.2 (overrides bump)'
required: false
type: string
release_notes:
description: 'Release notes markdown (empty — auto-generated from pull requests)'
required: false
type: string

jobs:
release:
uses: qonversion/shared-sdk-workflows/.github/workflows/release.yml@main
with:
bump: ${{ inputs.bump }}
version: ${{ inputs.version }}
release_notes: ${{ inputs.release_notes }}
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
9 changes: 0 additions & 9 deletions .github/workflows/release_pull_requests.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Editor/QonversionDependencies.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<dependencies>
<androidPackages>
<androidPackage spec="io.qonversion:sandwich:7.9.0" />
<androidPackage spec="io.qonversion:sandwich:7.10.1" />
<androidPackage spec="com.fasterxml.jackson.core:jackson-databind:2.11.1" />
<androidPackage spec="org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.61" />
</androidPackages>
<iosPods>
<iosPod name="QonversionSandwich" version="7.9.0" />
<iosPod name="QonversionSandwich" version="7.10.1" />
</iosPods>
</dependencies>
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.databind.node.ObjectNode;

import io.qonversion.sandwich.NoCodesEventListener;
import io.qonversion.sandwich.NoCodesPurchaseDelegateBridge;
import io.qonversion.sandwich.NoCodesSandwich;
import io.qonversion.sandwich.ResultListener;
import io.qonversion.sandwich.SandwichError;

public class NoCodesWrapper {
private static final String TAG = "NoCodesWrapper";
Expand All @@ -28,6 +32,9 @@ public class NoCodesWrapper {
private static final String EVENT_ACTION_FINISHED = "OnNoCodesActionFinished";
private static final String EVENT_FINISHED = "OnNoCodesFinished";
private static final String EVENT_SCREEN_FAILED_TO_LOAD = "OnNoCodesScreenFailedToLoad";
private static final String EVENT_CUSTOM_ACTION = "OnNoCodesCustomAction";
private static final String EVENT_SCREEN_LOADED = "OnNoCodesScreenLoaded";
private static final String EVENT_SCREEN_LOAD_FAILED = "OnNoCodesScreenLoadFailed";
private static final String EVENT_PURCHASE = "OnNoCodesPurchase";
private static final String EVENT_RESTORE = "OnNoCodesRestore";

Expand Down Expand Up @@ -112,6 +119,27 @@ public static synchronized void showScreen(String contextKey, String customVaria
noCodesSandwich.showScreen(contextKey, customVariables);
}

public static synchronized void loadScreen(final String contextKey) {
if (noCodesSandwich == null) {
Log.e(TAG, "NoCodesSandwich is not initialized");
return;
}

noCodesSandwich.loadScreen(contextKey, new ResultListener() {
@Override
public void onSuccess(@NonNull Map<String, ?> data) {
sendMessageToUnity(data, EVENT_SCREEN_LOADED);
}

@Override
public void onError(@NonNull SandwichError error) {
ObjectNode payload = Utils.createErrorNode(error);
payload.put("contextKey", contextKey);
sendMessageToUnity(payload, EVENT_SCREEN_LOAD_FAILED);
}
});
}

public static synchronized void close() {
if (noCodesSandwich == null) {
Log.e(TAG, "NoCodesSandwich is not initialized");
Expand Down Expand Up @@ -208,6 +236,9 @@ public void onNoCodesEvent(@NonNull Event event, @Nullable Map<String, ?> data)
case ScreenFailedToLoad:
methodName = EVENT_SCREEN_FAILED_TO_LOAD;
break;
case CustomAction:
methodName = EVENT_CUSTOM_ACTION;
break;
default:
return;
}
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Internal/QonversionInternal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal class QonversionInternal : MonoBehaviour, IQonversion
private const string OnIsFallbackFileAccessibleMethodName = "OnIsFallbackFileAccessible";
private const string OnPromotionalOfferMethodName = "OnPromotionalOffer";

private const string SdkVersion = "9.6.0";
private const string SdkVersion = "9.7.0";
private const string SdkSource = "unity";

private const string DefaultRemoteConfigContextKey = "";
Expand Down
5 changes: 5 additions & 0 deletions Runtime/Scripts/NoCodes/Android/NoCodesWrapperAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public void ShowScreen(string contextKey, string customVariablesJson)
CallNoCodes("showScreen", contextKey, customVariablesJson ?? "");
}

public void LoadScreen(string contextKey)
{
CallNoCodes("loadScreen", contextKey);
}

public void Close()
{
CallNoCodes("close");
Expand Down
1 change: 1 addition & 0 deletions Runtime/Scripts/NoCodes/Dto/NoCodesError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ private static NoCodesErrorCode ParseErrorCode(string code)
case "RateLimitExceeded": return NoCodesErrorCode.RateLimitExceeded;
case "ScreenLoadingFailed": return NoCodesErrorCode.ScreenLoadingFailed;
case "SDKInitializationError": return NoCodesErrorCode.SdkInitializationError;
case "ClientError": return NoCodesErrorCode.ClientError;
default: return NoCodesErrorCode.Unknown;
}
}
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Scripts/NoCodes/Dto/NoCodesErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public enum NoCodesErrorCode
ProductsLoadingFailed,
RateLimitExceeded,
ScreenLoadingFailed,
SdkInitializationError
SdkInitializationError,
ClientError
}
}
Loading